question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Percy server fails to respond with Cypress open

See original GitHub issue

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:

  • start the gatsby site: npm run develop
  • in a new tab:
    • ./node_modules/.bin/cypress run (this works)
    • ./node_modules/.bin/cypress open -> run tests -> crash

specifically disabling percy doesn’t seem to work either:

  • start the gatsby site: npm run develop
  • in a new tab:
    • PERCY_ENABLE=false ./node_modules/.bin/cypress open -> run tests -> crash

my initial thought was the percy server must be running no matter what, however if you then:

  • start the gatsby site: npm run develop
  • in a new tab:
    • percy exec -- ./node_modules/.bin/cypress open -> run tests
    • i see as output:
[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 or PERCY_ENABLE=false. and fwiw, i’m using a Mac, on BigSur, version 11.2.3.

let me know if you need more information. thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
cassuscommented, Apr 13, 2021

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

RangeError: Maximum call stack size exceeded
    at _deconstructPacket (<...>node_modules/socket.io-parser/dist/binary.js:21:28)
    at _deconstructPacket (<...>node_modules/socket.io-parser/dist/binary.js:40:32)

    <15k lines of the same message>

    at _deconstructPacket (<...>node_modules/socket.io-parser/dist/binary.js:32:26)
    at Object.deconstructPacket (<...>node_modules/socket.io-parser/dist/binary.js:16:17)
    at Encoder.encodeAsBinary (<...>node_modules/socket.io-parser/dist/index.js:81:41)
    at Encoder.encode (<...>node_modules/socket.io-parser/dist/index.js:43:29)
    at Client._packet (<...>node_modules/socket.io/dist/client.js:167:44)
    at Socket.packet (<...>node_modules/socket.io/dist/socket.js:161:21)
    at <...>node_modules/socket.io/dist/socket.js:270:18
    at <...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/lib/socket-base.js:325:28
    at tryCatcher (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (<...>/7.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
3reactions
MarosPistejcommented, Apr 13, 2021

to my issue #320 which is most likely same as this one worked also modifying cypress/support/index.js file and include code bellow

import { isPercyEnabled } from "@percy/sdk-utils";
isPercyEnabled();

this works even with Cypress 7.1.0

in fact calling isPercyEnabled() anytime but before invoking cy.percySnapshot() work…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress - Percy Docs
Sometimes snapshots fail to be taken while running in CI and it's difficult to debug what's going on in a remote environment. In...
Read more >
Cypress - Error: Could not find browser revision 756035. Run ...
npx percy exec -- cypress run. I am met with the message: Error: Could not find browser revision 756035. Run "npm install" or...
Read more >
How to handle Errors in Cypress | BrowserStack
An Exception or an Error is an abnormal event, which may break the normal flow of test script execution, in turn causing the...
Read more >
Painlessly setup Cypress & Percy with Github Actions in minutes
Grab the PERCY_TOKEN . This has to be an environment variable for the machine, bash or CI. Mind that it is not a...
Read more >
Using Cypress - Cypress Documentation
Will Cypress fail the test when an application has unhandled rejected promise? ... How do I run the server and tests together and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found