-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite 3rd party JS code to enforce that parent + top references are always correct #1467
Comments
Usually when there is an error like this, And indeed, there is a Network Request on your end for a I guess there is the unanswered question of why this error appears this way instead of indicating that there was an error in your application code. 🤔 |
Hi Jennifer, thanks for your answer. Is it possible to know which request is actually causing the error? I had a look at all of them and they look all fine to me now. |
Yeah, I haven't been able to figure out why this error is not bubbling up correctly in Cypress. There is definitely an error being thrown in our runner. I logged out all of the data for the test run. Edited: removed logs because it was just noise that just distracts from real issue |
Ok thanks for the update. Any idea on how I can prevent the error (workaround) or why the problem suddently appeared while my tests were running fine since yesterday morning? |
We investigated the problem - and its being caused exclusively by The reason is partly Cypress' fault - when the When it's evaluated outside of Cypress the WorkaroundYou can simply workaround this problem by blacklisting the 3rd party sidecar code from loading, which will instantly make everything work. To do that, read about blacklisting. You'll need to blacklist Here are my notes / thoughts just for internal reference on rewriting 3rd party JS code to enforce that ["parent"] ['parent] .parent getters => {
(window.parent && window.parent.__Cypress__ ? window : window.parent)
} |
Hi Brian. |
I believe I have reproduced similar behavior with an internal application. I cannot block the 3rd party JS code that is being evaluated. Is there another workaround I can use? |
Any update on this issue please, i am also facing same issue, please suggest if we have any workaround |
The code for this is done in cypress-io/cypress#5273, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
This fix is available starting in {
"experimentalSourceRewriting": true
} The fix is experimental, so there may be some situations where the this is not fixed. If you're still this issue while setting the |
Current behavior:
I setup a very simple test that searches for a link in a web page (given an id) and clicks it. Than it checks the content of another element to check it's correct.
What happens is that selectors are found but the test fails. In fact the web page is behaving correctly.
I can see an error in the inspector:
Uncaught SyntaxError: Unexpected token <
And another one:
Unhandled rejection TypeError: Cannot read property 'currentRetry' of undefined
Desired behavior:
The test to pass.
How to reproduce:
Just run the test below.
Test code:
Additional Info (images, stack traces, etc)
The text was updated successfully, but these errors were encountered: