-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
All Screen Turns White when a button on the DOM is clicked. #1049
Comments
Thanks so much for the detailed issue. I am able to reproduce this exactly as you posted. 👍 Very quickly looking at it, I don't see an obvious reason that this is happening. So, definitely needs more investigation. |
@asadcr I am seeing a few new url changes (HashChange events) after the click, I'm wondering what is triggering those and if that is the expected behavior, you can see them in the Command Log: The page loads:
Then
Then
|
@jennifer-shehane the URL changes is part of the functionality which helps us to get to the state of the application through the Hash Change. |
I was able to reproduce using the Cypress app. It gives a before/after of clicking the button with a DOM snapshot. It looks like the React application is targeting I've isolated the performance metrics of a live browser and inside Cypress: Both are of the same click event. The Cypress one is much smaller and incomplete. The selected box is where each diverge. In Cypress, all children call The React dev tools would be helpful. I tried looking at them from within Cypress, but I just get the Cypress app (it is written using React as well). |
Your code doesn't come with source maps, so I prettified the JS output. The split is here: updateChildren: function(A, t, e, g, r, u, B, C, a) {
if (t || A) {
var s, c;
for (s in t)
if (t.hasOwnProperty(s)) {
c = A && A[s];
var Q = c && c._currentElement
, E = t[s];
if (null != c && o(Q, E))
n.receiveComponent(c, E, r, C),
t[s] = c;
else {
c && (g[s] = n.getHostNode(c),
n.unmountComponent(c, !1));
var M = i(E, !0);
t[s] = M;
var l = n.mountComponent(M, r, u, B, C, a);
e.push(l)
}
}
for (s in A)
!A.hasOwnProperty(s) || t && t.hasOwnProperty(s) || (c = A[s],
g[s] = n.getHostNode(c),
n.unmountComponent(c, !1))
}
}, Right in the middle |
This is what we do in our own applications which enables us to use the React dev tools to bind to the application under test (instead of the outer Cypress application) https://github.com/cypress-io/cypress/blob/develop/packages/desktop-gui/src/index.hbs#L23 When you say: "your code doesn't come with source maps" what do you mean? That code you posted is coming from your app, not Cypress. We don't minify or obfuscate our JS specifically for this purpose. |
Sorry, I was talking about @asadcr app. I couldn't find anything that jumped out. |
so I guess we need to put a debugger and figure out what |
Wow, looks like a system of equations with 4 unknown variables |
@NicholasBoll , @brian-mann I have enabled source maps in this environment, You should be able to debug easier now. Thank you for the Help |
@asadcr If I manually comment out So that narrows down the issue to Cypress simulating the button click. Digging through the stack traces didn't reveal anything interesting. I'm not sure how to get the React dev tools hooked up to the app in an iframe - I installed the React extension in the Cypress-controlled Chrome browser but I just got Cypress's React app. The only thing I noticed that might fix the issue is the button in question (in I have a React app under Cypress tests for over a year without an issue, so there must be some weird interaction with the Watermission app and Cypress event simulation. I wasn't able to figure it out. @brian-mann might be able to give tips on getting into React dev tools in the app while running the Cypress desktop app. |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
Is there a fix to this issue? |
@srishti-mull If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Is this a Feature or Bug?
cli + headless chrome: broken
app + real chrome: broken
user interacting with the browser: working
Current behavior:
All Screen Turns White when a button on the DOM is clicked.
Desired behavior:
it shouldn't turn white, Instead the display should be normal.
How to reproduce:
To reproduce this, the following test can be used. it should reproduce the issue.
Test code:
Additional Info (images, stack traces, etc)
This is the issue snapshot.

The text was updated successfully, but these errors were encountered: