You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
💡 I can provide enough details to reproduce my issue on local environment.
Environment
Synpress version: 3.7.1
Node.js version: 18.16.0
Operating system: Windows 10 Pro x64
Run mode: Cypress + Synpress (as plugin)
CI platform: none
Are you running your tests inside docker? No, I'm not using docker, so this issue is not related to it.
What happened?
After suffering the poorly reproducible ReferenceError: process is not defined problems here and there, I've finally found the culprit.
The thing seems to be, the Synpress tries to retrieve the FAIL_ON_ERROR variable on frontend:
Its only usages are here and here in support/index.js;
Through analysing the sources in Dev Tools (*), I've found that one process is not defined error that had bothered me without any particular problem source were from a line containing process.env.FAIL_ON_ERROR. I've found the fragments referenced above, commented out lines 8 and 10 – and the problem was gone! (I won't be able to reconstruct that particular problem in a reproducible way and with a small piece of code, so I'm just describing the way I've researched it).
On another step of my long scenario for a complex app, I've got problems with confirmMetamaskPermisionToApproveAll, and commenting out 17-19 in the file above fixed that, too! Well, not fixed exactly: instead, I've got helpful error messages that are to be handled separately.
Finally, I've moved to the well-known problem with the watch mode and found that now I'm getting other, more helpful errors in the watch mode (again, to be researched separately).
so that the browser is not closed once the failure happens.
What is your expected behavior?
I've expected no such process is not defined errors in the first place. At times they are not reproducible (that's not a surprise as basically any frontend exception is converted into this non-informative process is not defined) and they complicate debugging tremendously
How to reproduce the bug
The easiest way to reproduce this is to use cypress open (again, see here)
PS
I'm not sure why this got to production, as the whole FAIL_ON_ERROR feature doesn't work. To check: any autotests for it? In what environments could it still work?
I'm not creating a PR since I don't know the history of the feature and the hack of commenting those bits out doesn't look like a proper solution. @drptbl git blame suggests that it was you who introduced that issue, do you remember any context?
The text was updated successfully, but these errors were encountered:
Environment
What happened?
After suffering the poorly reproducible
ReferenceError: process is not defined
problems here and there, I've finally found the culprit.The thing seems to be, the Synpress tries to retrieve the
FAIL_ON_ERROR
variable on frontend:process is not defined
error that had bothered me without any particular problem source were from a line containingprocess.env.FAIL_ON_ERROR
. I've found the fragments referenced above, commented out lines 8 and 10 – and the problem was gone! (I won't be able to reconstruct that particular problem in a reproducible way and with a small piece of code, so I'm just describing the way I've researched it).confirmMetamaskPermisionToApproveAll
, and commenting out 17-19 in the file above fixed that, too! Well, not fixed exactly: instead, I've got helpful error messages that are to be handled separately.(*) to be able to do that, I'm using this:
so that the browser is not closed once the failure happens.
What is your expected behavior?
I've expected no such
process is not defined
errors in the first place. At times they are not reproducible (that's not a surprise as basically any frontend exception is converted into this non-informativeprocess is not defined
) and they complicate debugging tremendouslyHow to reproduce the bug
The easiest way to reproduce this is to use
cypress open
(again, see here)PS
I'm not sure why this got to production, as the whole
FAIL_ON_ERROR
feature doesn't work. To check: any autotests for it? In what environments could it still work?I'm not creating a PR since I don't know the history of the feature and the hack of commenting those bits out doesn't look like a proper solution. @drptbl git blame suggests that it was you who introduced that issue, do you remember any context?
The text was updated successfully, but these errors were encountered: