-
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
Chromium Devtools bug when using Electron #15932
Comments
Worth mentioning that this bug is still an issue and will be much more problematic if we ship Electron as our default browser for Cy Component Testing. |
Video of this occurring: 15932.repro.mp4This occurs at least as far back as Cypress 3.8.3 (I'm not able to run an older version). Does not occur if you use Chrome 96. If you use If I remove the cypress/packages/runner/src/iframe/iframes.jsx Lines 151 to 168 in a64b72a
If I re-add a simple iframe, it comes right back: _loadIframes (specPath) {
const $container = $(this.refs.container).empty()
$('<iframe/>', {
src: 'http://example.com',
})
.appendTo($container)
// .appendTo(document.body) // also fails
} Using plain DOM APIs doesn't avoid the issue: const i = document.createElement('iframe')
i.src = 'http://example.com'
document.body.appendChild(i) However, if we return early on I tried to add a I wanted to test to see what happens if I added an iframe via the DevTools Console, and I got extremely weird behavior where it reloaded this iframe over and over and over and over and over: weirdness.when.adding.iframe.from.console.mp4This also does not happen if I follow the same steps in Chrome 96. The error text is "TypeError: Cannot read properties of undefined (reading 'requestContent')". I found this bug which seems related: https://bugs.chromium.org/p/chromium/issues/detail?id=1267237 However, I'm not sure it's the same since this doesn't actually happen in Chrome. It also doesn't happen in a vanilla Electron app. If I try to remove all event listeners from the document before adding the iframe, it still does this craziness. If I log the stack trace, it seems like this causes |
Using the protocol monitor, you can see I opened an issue on the Electron repo requesting guidance as to how to debug this further: electron/electron#32423 |
Can confirm this is still occurring in develop with Electron bumped to 18.0.4. |
I'm sad. The electron browser is basically dead on arrival for anything other than running in CI. I'm guessing if we ever want this fixed we will need to go deep in electron's code base. |
I can no longer reproduce this in the latest version of Cypress (Electron 21.0.0). @lmiller1990 are you able to reproduce? |
Devtools still seems completely "frozen" and not updating for me, I am on Cypress 11.0.1 using component testing. 🤔 Edit: on macos, I will try linux later and see if it's happening there, too. Also, I did not try e2e yet. |
This is still an issue with Cypress 12.9.0. I've only tested on E2E testing. Running on OSX. |
This is fixed by #26573! |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Repro:
runner-ct
with electronFirst discovered and noted here: #15777
Desired behavior
Can use devtools with electron.
Test code to reproduce
Versions
This issue also occurs in E2E, running against [email protected] . For me, this is occurring on every spec run.
The text was updated successfully, but these errors were encountered: