-
Notifications
You must be signed in to change notification settings - Fork 41
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 not capturing any snapshots (fails to find healthcheck) #61
Comments
Hi there! Percy can capture HTTPS websites. This seems a lot like there's CSP or CORS issues on the page blocking us from POSTing the DOM back to our node process. Can you try disabling Cypress web security and give it another shot? |
Hi, thank you for your response. This does indeed seem to fix it. |
I'm seeing an issue with Percy not taking screenshots within my Cypress project. I've tried to point the tests to both a https and non https site and each time the tests pass in Cypress but fail within the Percy Dash as it was unable to find any screenshots. When I run via chrome (and the cy GUI opens locally) I can see that the percy agent healthcheck is failing for some reason... Any advice? I am running my test using a script, as such: "cy:run:percy": "export TEST_SUITE=foo; PERCY_TOKEN=xxx PERCY_BRANCH=test percy exec -- cypress run", I can see it running in the terminal, bookended by percy calls [percy] percy has started / ended etc.... |
Hi @GordonTester, I had the same issue and downgrading to version 1.0.2 fixed it for me. |
Hey all! We had an issue with the 1.0.3 release but it should be fixed with 1.0.4. Can you give it a try and let us know? https://github.com/percy/percy-cypress/releases/tag/v1.0.4 |
@Robdel12 I did try 1.0.4, and I had the same issue as with 1.0.3. |
Can you share a little more about your setup? I'd be curious if there's any error logs or anything we can learn from what's going on there. |
1.0.4 works for me. Looks like the healthcheck path fix did the trick! |
I think that perhaps it is because we are using webpack, and |
I believe this is safe to close now. If anyone sees any more issues with the healthcheck failing please comment and we'll reopen 👍 |
hello i am getting this issue. i dont get any snapshots and i get this error: im running 3.3.2, my baseUrl in cypress.json is a https if that matters and i have the "chromeWebSecurity": false.
this is also is the log: it happens in chrome and electron browser. thanks |
Hey @amrwahdan3! It sounds like you're running an old version of Edit: I looked at one of your builds and can confirm that you're running |
thanks @Robdel12 ! that did the trick i see snapshots being taken and uploaded now after updating to 0.8.3 |
I'm seeing the same issue that @amrwahdan3 was seeing.
I have the following setup:
Any help would be greatly appreciated. Thanks! |
@james-hughes-ntt i updated @percy/agent to the newest version like @Robdel12 suggested and that ended up working. |
Thanks. So after running |
I don't believe this is a health check issue (unless you're seeing that specific log in Cypress command log). What test is calling |
@Robdel12 I'm running
|
Just to be 100% sure, what is the code for that test? |
Yeah good shout @Robdel12 . Pretty standard test.
|
Hey @james-hughes-ntt, thanks for that! Looks like you're missing the parens to invoke the function: describe('Visual Regression Testing with Percy and Cypress', () => {
it('should take a percy snapshot', () => {
cy.visit('https://www.example.com');
cy.wait(1000);
cy.percySnapshot();
});
}); |
@Robdel12 ah thanks mate, yeah that was it! So duh of me. I was looking at all the places except for the most obvoius - where percy is actually invoked! Thanks again appreciate the help |
Ahhh, no worries! This happens to me all the time when doing support too. I get too far off in the weeds and it turns out it was something obvious :p Happy it was something easy rather than something like the health check failing :D |
Hey there. Seems like I'm having the same issue as @james-hughes-ntt and I've checked the parens etc within the code but all seems fine (to me that is)..the below is the output and I can see something about the certificate but not sure if that's the issue. Also, disabled websecurity for chrome in the cypress.json file.
[percy] RequestError Error: self signed certificate in certificate chain | Wed Feb 03 2021 20:58:22 GMT+0000 (Greenwich Mean Time) ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: percy.spec.js (1 of 3) Visual Regression test with Percy and Cypress 1 passing (6s) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: percy2.spec.js (2 of 3) Visual Regression test with Percy and Cypress 1 passing (4s) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: Snapshot/image.spec.js (3 of 3) 0 passing (0ms) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ==================================================================================================== (Run Finished)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ [percy] stopping percy... |
Hey @Uraz04, it looks like you're running on a network with a self signed cert (this won't work with Percy)
|
@Robdel12 I have tried to get Percy taking snapshot as well in Cypress. Tried all the above, and no missing parens. Also disabled web security. The only thing I can see is this: |
What version are you using? This likely isn't related to this issue. The latest version of the SDK doesn't have a health check like this anymore. |
Also, the log there suggests Percy isn't running. Are you using |
You disregard that font log. It doesnt work with a proper font as well. |
Can you set |
@Robdel12 I cannot add that flag? I tried before exec command as well |
|
Seems to work now. Just deleted node_modules and reinstalled everything. Thanks! |
Hi, I am running into a missing snapshot issue. It is not consistent and I can't figure out the cause. I ran the command with --verbose and see this error.
|
Hey @stuthib! That doesn't appear to be related to what this issue was about. Can you try upgrading |
@Robdel12 Thank you for the quick response. I updated |
@Robdel12 I am also running into the same issue. When I do --verbose, it says the below. [percy:cypress] Could not take DOM snapshot "Dashboard Page" (36154ms) When I researched further, I came to know that it is working fine in my personal laptop, however in my company laptop it is not working. It appears like from my company laptop it is failing to connect to percy server or failing to get the build url or something like that. Appreciate if you could please look into it and advise me to resolve this issue. Please see complete console log below ---------------------------Here is the complete console log------------------ ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: visual_testing/purek2.spec.js (1 of 1) Why you should do it regularly: Customer Central-Visual Testing 1 passing (28s) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ (Video)
==================================================================================================== (Run Finished)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ [percy:core:browser] Closing browser (4392ms) |
Hey @skareemu! Upgrade Cypress from 9.1 to 9.1.1: #437 (reply in thread) v9.1 has missing patched dependencies, which makes for some wonky bugs. |
Thank you so much @Robdel12, much appreciated . Issue is resolved with 9.1.1 |
Same issue with Cypress v13.13 |
Hi
I'm trying to integrate Percy and Cypress for one of my projects.
Sadly Percy doesn't seem to take any snapshots even though I'm calling cy.percySnapshot multiple times.
This is my current test:
This is my Cypress result:
UPDATE: Seems like percy is unable to capture screenshots on https websites. Is this correct?
This is quite a showstopper for the current project I'm integrating it for.
The text was updated successfully, but these errors were encountered: