-
Notifications
You must be signed in to change notification settings - Fork 42
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
Percy server fails to respond with Cypress open #315
Comments
Prematurely transferred based on a glance. Whoops! Error stack trace that's helpful:
|
@wwilsman Let's implement what Cypress does (and what we talked about) where we just completely disable Percy if anyone uses |
@Robdel12 What cypress does is disable the snapshot method when in interactive mode. If we implemented it in the same way, it would cause empty builds to be sent to Percy — something we probably don't want. Properly disabling Percy from within an SDK is not possible currently (but will hopefully be possible soon with planned internal core queue changes). As to the actual issue, it appears as though the request to the server is taking longer than 4s to fail. It would be helpful to have debug logs using It's possible we simply need to tone down the request timeout since we are using an internal Cypress API without managing timeouts ourselves. But it's still interesting that these requests are timing out even when Percy is not running. |
After quite a bit of debugging, I've arrived at the conclusion that this isn't actually a Percy issue, but unfortunately I still don't know where the issue belongs. You can replace I'll continue to try and help debug for a little longer, but since this is no longer an issue with Percy, I can't dedicate too much of my work day to it. Closing this unless somebody can report that this is indeed somehow Percy related. |
@wwilsman thanks for all the time you spent here. is my path forward to just not use Percy until i can figure out the upstream problem? |
@jonpitch Still haven't located the issue, but I did make some progress and find a workaround for you. I tested this scenario in a fresh Cypress project and didn't seem to have any issues. There was no crash and the correct error was logged. If I had to guess, I would say this is probably a dependency resolution issue. However, I did find this open issue on the Cypress repo: cypress-io/cypress#15101 I confirmed that downgrading your reproduction to Cypress 6.4.0 works as intended. Going to open this back up until that issue is resolved upstream for others that run into this. |
thanks @wwilsman! confirmed here that |
to my issue #320 which is most likely same as this one worked also import { isPercyEnabled } from "@percy/sdk-utils";
isPercyEnabled(); this works even with Cypress in fact calling |
Thanks @MarosPistej for the workaround, it worked for me as well! This was my crash error message, I put it here, so others may find the workaround easier
|
👋🏼 We shipped an update (v3.1.0) that side steps the bug. Hopefully it's fixed upstream soon, but we should no longer do anything in interactive mode. |
Even using v3.1.0 I have the same crash as before if I remove the Calling |
i have a new gatsby project, setup with cypress and percy-cypress, where i'm experiencing some crashing that i'm trying to narrow down. you can find a reproduction repository here.
to reproduce:
npm run develop
./node_modules/.bin/cypress run
(this works)./node_modules/.bin/cypress open
-> run tests -> crashspecifically disabling percy doesn't seem to work either:
npm run develop
PERCY_ENABLE=false ./node_modules/.bin/cypress open
-> run tests -> crashmy initial thought was the percy server must be running no matter what, however if you then:
npm run develop
percy exec -- ./node_modules/.bin/cypress open
-> run tests[percy] Skipping visual tests - Missing Percy token [percy] Running "./node_modules/.bin/cypress open"
i still experience a crash. additionally, supplying a token doesn't help either. while i don't experience a crash in this particular scenario, i don't my my team uploading snapshots running tests locally. i haven't yet been able to disable percy for local development, with
PERCY_BRANCH=local
orPERCY_ENABLE=false
. and fwiw, i'm using a Mac, on BigSur, version11.2.3
.let me know if you need more information. thanks!
The text was updated successfully, but these errors were encountered: