percy / percy-cypress

Visual testing with Cypress and Percy
https://percy.io
MIT License
340 stars 41 forks source link

Percy not capturing any snapshots (fails to find healthcheck) #61

Closed stijnbernards closed 5 years ago

stijnbernards commented 5 years ago

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:

describe('Magento tests', () => {
  beforeEach(() => {
    cy.visit(Cypress.env('staging-url'))
  })

  it('Should allow a product to be ordered', () => {
    cy.percySnapshot('Homepage')

    // Forcing due to sticky headers messing up the click area
    cy.get('nav.navigation > ul > li:first-of-type a')
        .click({ force: true })

    cy.percySnapshot('Category - Boxsprings')

    cy.get('.products.list.items.product-items')
        .find('li:first-of-type a.product-item-link')
        .click()

    cy.percySnapshot('Product page')
  })
})

This is my Cypress result: image

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.

Robdel12 commented 5 years ago

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?

stijnbernards commented 5 years ago

Hi, thank you for your response.

This does indeed seem to fix it. Would be nice if we're able to get error logging about this issue. I did see the part in the Percy Cypress docs about the websecurity. But I did not receive any error logging at all :(

GordonTester commented 5 years ago

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....

mapsandapps commented 5 years ago

Hi @GordonTester, I had the same issue and downgrading to version 1.0.2 fixed it for me.

Robdel12 commented 5 years ago

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

mapsandapps commented 5 years ago

@Robdel12 I did try 1.0.4, and I had the same issue as with 1.0.3.

Robdel12 commented 5 years ago

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.

ericz82 commented 5 years ago

1.0.4 works for me. Looks like the healthcheck path fix did the trick!

mapsandapps commented 5 years ago

I think that perhaps it is because we are using webpack, and require.resolve is returning a number instead of a path, similar to this issue.

Robdel12 commented 5 years ago

I believe this is safe to close now. If anyone sees any more issues with the healthcheck failing please comment and we'll reopen ๐Ÿ‘

amrwahdan3 commented 5 years ago

hello i am getting this issue. i dont get any snapshots and i get this error: 'Percy agent is not running. Skipping snapshots'

im running 3.3.2, my baseUrl in cypress.json is a https if that matters and i have the "chromeWebSecurity": false. my tests are pretty basic:

describe('desktop home page tests', function () {

    beforeEach('SetUp', function () {
        cy.visit('/?flagoverride=flag1::true,flag2::false')
    })

    context('Desktop_Homepage_LayoutCorrect', function () {
        it('The layout is correct.', function () {
            cy.percySnapshot('Desktop Homepage')
        })
    })
})

this is also is the log: [33mยป Warning: health-check is not a percy command.โ†ตDid you mean exec? [y/n]:

it happens in chrome and electron browser.

thanks

Robdel12 commented 5 years ago

Hey @amrwahdan3! It sounds like you're running an old version of @percy/agent with a new version of the Cypress SDK. Could you do an npm ls @percy/agent and post what the results of that are? v0.2.0 is when the healthcheck command was implemented: https://github.com/percy/percy-agent/blob/master/CHANGELOG.md#020-2019-04-03

Edit: I looked at one of your builds and can confirm that you're running @percy/agent 0.1.15

amrwahdan3 commented 5 years ago

thanks @Robdel12 ! that did the trick i see snapshots being taken and uploaded now after updating to 0.8.3

james-hughes-ntt commented 4 years ago

I'm seeing the same issue that @amrwahdan3 was seeing.

[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...
[percy] done.

I have the following setup:

Any help would be greatly appreciated. Thanks!

amrwahdan3 commented 4 years ago

@james-hughes-ntt i updated @percy/agent to the newest version like @Robdel12 suggested and that ended up working.

james-hughes-ntt commented 4 years ago

Thanks. So after running npm ls @percy/agent it shows that I'm using @percy/agent@0.28.1 which appears to be the newest version. Not sure what else to try ๐Ÿคทโ€โ™‚๏ธ

Robdel12 commented 4 years ago

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 cy.percySnapshot? Are there any logs around that?

james-hughes-ntt commented 4 years ago

@Robdel12 I'm running percy exec -- cypress run Here's the log from running that:

percy exec -- cypress run

[percy] created build #18 ...
[percy] percy has started.

====================================================================================================

  (Run Starting)

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Cypress:    4.9.0                                                                              โ”‚
  โ”‚ Browser:    Electron 80 (headless)                                                             โ”‚
  โ”‚ Specs:      1 found (percy.spec.js)                                                            โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

  Running:  percy.spec.js                                                                   (1 of 1)

  Visual Regression Testing with Percy and Cypress
    โœ“ should take a percy snapshot (1295ms)

  1 passing (4s)

  (Results)

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Tests:        1                                                                                โ”‚
  โ”‚ Passing:      1                                                                                โ”‚
  โ”‚ Failing:      0                                                                                โ”‚
  โ”‚ Pending:      0                                                                                โ”‚
  โ”‚ Skipped:      0                                                                                โ”‚
  โ”‚ Screenshots:  0                                                                                โ”‚
  โ”‚ Video:        false                                                                            โ”‚
  โ”‚ Duration:     3 seconds                                                                        โ”‚
  โ”‚ Spec Ran:     percy.spec.js                                                                    โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

====================================================================================================

  (Run Finished)

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ โœ”  percy.spec.js                            00:03        1        1        -        -        - โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โœ”  All specs passed!                        00:03        1        1        -        -        -  

[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...
[percy] done.
Robdel12 commented 4 years ago

Just to be 100% sure, what is the code for that test?

james-hughes-ntt commented 4 years ago

Yeah good shout @Robdel12 . Pretty standard test.

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 commented 4 years ago

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();
    });
});
james-hughes-ntt commented 4 years ago

@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

Robdel12 commented 4 years ago

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

Uraz04 commented 3 years ago

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.

cypress_snapshot@1.0.0 cy:percy percy exec -- cypress run

[percy] RequestError Error: self signed certificate in certificate chain | Wed Feb 03 2021 20:58:22 GMT+0000 (Greenwich Mean Time) [percy] stopping percy... [percy] waiting for 0 snapshots to complete... [percy] done. [percy] percy has started.

====================================================================================================

(Run Starting)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Cypress: 6.3.0 โ”‚ โ”‚ Browser: Electron 87 (headless) โ”‚ โ”‚ Specs: 3 found (percy.spec.js, percy2.spec.js, Snapshot/image.spec.js) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Running: percy.spec.js (1 of 3)

Visual Regression test with Percy and Cypress โœ“ should take percy snapshot (4559ms)

1 passing (6s)

(Results)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Tests: 1 โ”‚ โ”‚ Passing: 1 โ”‚ โ”‚ Failing: 0 โ”‚ โ”‚ Pending: 0 โ”‚ โ”‚ Skipped: 0 โ”‚ โ”‚ Screenshots: 0 โ”‚ โ”‚ Video: false โ”‚ โ”‚ Duration: 6 seconds โ”‚ โ”‚ Spec Ran: percy.spec.js โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Running: percy2.spec.js (2 of 3)

Visual Regression test with Percy and Cypress โœ“ should take percy snapshot (3277ms)

1 passing (4s)

(Results)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Tests: 1 โ”‚ โ”‚ Passing: 1 โ”‚ โ”‚ Failing: 0 โ”‚ โ”‚ Pending: 0 โ”‚ โ”‚ Skipped: 0 โ”‚ โ”‚ Screenshots: 0 โ”‚ โ”‚ Video: false โ”‚ โ”‚ Duration: 4 seconds โ”‚ โ”‚ Spec Ran: percy2.spec.js โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Running: Snapshot/image.spec.js (3 of 3)

0 passing (0ms)

(Results)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Tests: 0 โ”‚ โ”‚ Passing: 0 โ”‚ โ”‚ Failing: 0 โ”‚ โ”‚ Pending: 0 โ”‚ โ”‚ Skipped: 0 โ”‚ โ”‚ Screenshots: 0 โ”‚ โ”‚ Video: false โ”‚ โ”‚ Duration: 0 seconds โ”‚ โ”‚ Spec Ran: Snapshot/image.spec.js โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

====================================================================================================

(Run Finished)

   Spec                                              Tests  Passing  Failing  Pending  Skipped  

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โœ” percy.spec.js 00:06 1 1 - - - โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โœ” percy2.spec.js 00:04 1 1 - - - โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โœ” Snapshot/image.spec.js 2ms - - - - - โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โœ” All specs passed! 00:10 2 2 - - -

[percy] stopping percy... [percy] waiting for 0 snapshots to complete... [percy] done.

Robdel12 commented 3 years ago

Hey @Uraz04, it looks like you're running on a network with a self signed cert (this won't work with Percy)

[percy] RequestError Error: self signed certificate in certificate chain

tinganho commented 3 years ago

@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:

image

tinganho commented 3 years ago

image

Robdel12 commented 3 years ago

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.

Robdel12 commented 3 years ago

Also, the log there suggests Percy isn't running. Are you using percy exec -- cypress run with a PERCY_TOKEN set?

tinganho commented 3 years ago

I'm running with these versions: image

image

tinganho commented 3 years ago

You disregard that font log. It doesnt work with a proper font as well.

Robdel12 commented 3 years ago

Can you set --verbose (npx percy exec --verbose -- ...) for debug logs? Looks like the network request to http://localhost:5338/percy/snapshot is failing for some reason. Curious if it's related to Cypress's 7.x networking bug in a different flavor. ๐Ÿคจ

tinganho commented 3 years ago

@Robdel12 I cannot add that flag?

image

I tried before exec command as well

Robdel12 commented 3 years ago

which percy? Smells like you have @percy/agent hanging around somewhere. --verbose is a new @percy/cli flag (and @percy/agent is replaced by @percy/cli)

tinganho commented 3 years ago

Seems to work now. Just deleted node_modules and reinstalled everything. Thanks!

stuthib commented 2 years ago

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. Cypress: 6.9.1 "@percy/cli": "^1.0.0-beta.63" "@percy/cypress": "^3.1.1"


     [percy:core] Error: Navigation failed: Timeout of 30000ms exceeded.
    at Timeout.check [as _onTimeout] (/node_modules/@percy/core/dist/utils.js:103:17)
    at listOnTimeout (node:internal/timers:559:11)
    at processTimers (node:internal/timers:500:7) (0ms)```

Any help would be much appreciated! 
Robdel12 commented 2 years ago

Hey @stuthib! That doesn't appear to be related to what this issue was about. Can you try upgrading @percy/cli to the latest (beta.68) and if that still is a problem open a new discussion on @percy/cli?

stuthib commented 2 years ago

@Robdel12 Thank you for the quick response. I updated @percy/cli and also set the timeout in percy config to 60000, while the default was 30000 and it was timing out on page navigation. The last few builds have not errored out and seems to be consistent. If I run into this issue again, I will open a new discussion on @percy/cli.

skareemu commented 2 years ago

@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) [percy:cypress] Error: Missing required URL for snapshot at request (https://customer.nintex.com/__cypress/tests?p=cypress\support\index.js:784:28) at async Object.postSnapshot (https://customer.nintex.com/__cypress/tests?p=cypress\support\index.js:895:6) (5ms)

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------------------ npx percy exec --verbose -- cypress run [percy:config] Config file not found (0ms) [percy:client] Creating a new build... (27ms) [percy:core:browser] Launching browser (491ms) [percy:core:browser] Browser connected: HeadlessChrome/92.0.4515.0 (117ms) [percy:core] Percy has started! (3ms) [percy:cli:exec] Running "cypress run" (0ms)

====================================================================================================

(Run Starting)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Cypress: 9.1.0 โ”‚ โ”‚ Browser: Electron 94 (headless) โ”‚ โ”‚ Node Version: v16.13.1 (C:\Program Files\nodejs\node.exe) โ”‚ โ”‚ Specs: 1 found (visual_testing/purek2.spec.js) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Running: visual_testing/purek2.spec.js (1 of 1) Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db

Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

Customer Central-Visual Testing [percy:cypress] Could not take DOM snapshot "Dashboard Page" (36154ms) [percy:cypress] Error: Missing required URL for snapshot at request (https://customer.nintex.com/__cypress/tests?p=cypress\support\index.js:784:28) at async Object.postSnapshot (https://customer.nintex.com/__cypress/tests?p=cypress\support\index.js:895:6) (5ms) โˆš Pure K2 Permission checks - Dashboard Page (27854ms)

1 passing (28s)

(Results)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Tests: 1 โ”‚ โ”‚ Passing: 1 โ”‚ โ”‚ Failing: 0 โ”‚ โ”‚ Pending: 0 โ”‚ โ”‚ Skipped: 0 โ”‚ โ”‚ Screenshots: 0 โ”‚ โ”‚ Video: true โ”‚ โ”‚ Duration: 27 seconds โ”‚ โ”‚ Spec Ran: visual_testing/purek2.spec.js โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

(Video)

====================================================================================================

(Run Finished)

   Spec                                              Tests  Passing  Failing  Pending  Skipped  

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โˆš visual_testing/purek2.spec.js 00:27 1 1 - - - โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โˆš All specs passed! 00:27 1 1 - - -

[percy:core:browser] Closing browser (4392ms) [percy:client] Finalizing build 14402721... (135ms) [percy:core] Finalized build #13: https://percy.io/3f3a16fc/ncc_automation/builds/14402721

Robdel12 commented 2 years ago

Hey @skareemu! Upgrade Cypress from 9.1 to 9.1.1: https://github.com/percy/percy-cypress/discussions/437#discussioncomment-1759828 v9.1 has missing patched dependencies, which makes for some wonky bugs.

skareemu commented 2 years ago

Thank you so much @Robdel12, much appreciated . Issue is resolved with 9.1.1

NikitaSheff commented 1 month ago

Same issue with Cypress v13.13