seeking advice on why the page under test fails to...
# help
p
seeking advice on why the page under test fails to load in headless chrome, but succeeds in electron and headed chrome: https://github.com/constantlyk/cypress-program-guide-demo
(i put as much information about the issue as i could in the readme, but let me know if i can clarify anything else)
updated readme to include debug logs, which i'll also post here * headless: https://pastebin.com/HSJJjxDi * headed: https://pastebin.com/HnAiRbqf
n
Hi, I tried it but didn't manage to find anything useful. I just notice that I'm getting the same whitescreen running in cypress open if I block
api.asco.org
p
@nutritious-honey-65632 thanks for taking a look! when you say "block", do you mean blocking that domain/url in the browser, or intercepting it through cypress, or something else?
n
I blocked the domain using /etc/hosts file on Linux. You could probably do the same with cypress
I would double check can I get the response from that request using headless browser
p
and also to confirm, you are able to replicate the original bug when you clone the repo? it's not just on my machine?
n
yes, I see white screen when running in run mode and flaky test in open mode, but it pass most of the time
p
flaky in open mode -- i hadn't been seeing it flake, but if true then that suggests a dreaded race condition, especially considering one of the few differences in headless mode is that it's faster..... i did try increasing the timeout before, but that didn't resolve the white screen
n
I tried the same, increasing timeout and still failed in run mode
I tried to wait for
graphql
and it failed in run mode, if I remember correctly. You could try that
p
yes, in fact, the original version of this test was actually waiting on the graphql request (i changed it to a dom element check for this example)
n
it would be nice if you could see the network log somehow, then you will see the response code from that request
let me see something
This is the flakines that I can see sometimes in open mode
p
ah yes this thing
it causes a very specific type of flake: it seems that the first test that is run in open mode will always fail due to that, but subsequent tests always succeed
i believe that setting chromeWebSecurity: false gets around it, but in my experience setting that had no effect on the current white screen issue. perhaps they are related, perhaps not
there may also be a MIME-related error which at least in headed/open mode could be surmounted by setting modifyObstructiveCode: false, but again that didn't seem to fix the headless/run white screen
n
could be, everything else is beyond my domain of knowledge. I would try to find the tool that can capture full network log coming from the headless browser and check the responses. Then you can isolate which request is not succeeding
p
thanks so much for investigating with me! good to know i'm not alone
2 Views