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.

RangeError: Maximum call stack size exceeded at _deconstructPacket in CI Pipeline

See original GitHub issue

Current behavior

Upgrading to cypress version 6.5.0 and running it on Bitbucket Pipeline CI via parallel tests, the error is encountered:

RangeError: Maximum call stack size exceeded
    at _deconstructPacket (/root/.cache/Cypress/6.5.0/Cypress/resources/app/packages/socket/node_modules/socket.io-parser/dist/binary.js:21:28)
    at _deconstructPacket (/root/.cache/Cypress/6.5.0/Cypress/resources/app/packages/socket/node_modules/socket.io-parser/dist/binary.js:40:32)
...
at _deconstructPacket (/root/.cache/Cypress/6.5.0/Cypress/resources/app/packages/socket/node_modules/socket.io-The Test Runner unexpectedly exited via a exit event with signal SIGILL

I’ve checked similar issues in the past and they have been fixed by succeeding Cypress versions. Could it be on the package.json and package-lock.json having the latest version Cypress v6.5.0 while my docker image is still pointing to cypress/base:14.15.4

Desired behavior

The Test runner should not exit in the CI pipeline and continue to generate test results.

Test code to reproduce

bitbucket-pipelines.yml

image: cypress/base:14.15.4
options:
  max-time: 20

tests: &tests
  name: Run tests
  caches:
    - node
    - cypress
  script:
    - set +e # continue executing next steps regardless of errors
    - cypress_version=$HOST npx cypress run --record --key $CYPRESS_DASHBOARD_KEY --parallel --ci-build-id $BITBUCKET_BUILD_NUMBER
  artifacts:
    - cypress/screenshots/**
    - cypress/videos/**
    - cypress/test-reports/mocha/*.json
    - cypress/test-reports/junit.xml

pipelines:
  default:
  - step:
      name: Prepare dependencies
      caches:
        - npm
        - cypress
        - node
      script:
        - npm ci
        - npx @bahmutov/print-env BITBUCKET # let's see the environment variables right away
  - parallel: # run N steps in parallel
    - step:
        <<: *tests
    - step:
        <<: *tests
    - step:
        <<: *tests
definitions:
  caches:
    npm: $HOME/.npm
    cypress: $HOME/.cache/Cypress

Versions

Cypress version 6.5.0 Running locally on MacOS works fine. Running on Bitbucket pipeline CI is when the issue is encountered.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:31
  • Comments:47 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
poponutscommented, Apr 5, 2021

The issue still persists on 7.0.0

8reactions
jennifer-shehanecommented, Apr 28, 2021

This is a regression introduced in 6.5.0.

6.5.0 commits. I’ve narrowed it down to this PR where it was introduced: https://github.com/cypress-io/cypress/pull/14479 which is unfortunate because it is a gigantic commit, but hopefully this will help us track it down.

Issue not present: https://github.com/cypress-io/cypress/commit/0abb5efe90b7c573df9d509b6ebe5d4debd3dab2 Issue present: https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >
`Maximum call stack size exceeded` error when clicking ...
When clicking the "Show unchanged lines" in an MR diff for a large file, the browser hangs. In Chrome, I get a Maximum...
Read more >
Maximum call stack size exceeded on npm install
I had the "call stack size exceeded" issue in docker until I moved the WORKDIR line to near the top of the Dockerfile....
Read more >
VSTS "maximum stack size exceeded" on Chrome
VSTS is stuck in what appears to be an infinite loop (maximum call stack size exceeded). This only manifests for me in Chrome...
Read more >
How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
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