cypress: Unexpected token in JSON
Current behavior
Occasionally hitting this issue when running on MacOS 12, Node v14.20.0 and Chrome 103 / Firefox 103.
================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 10.3.1 │
│ Browser: Custom Chrome 103 │
│ Node Version: v14.20.0 (/Users/chef/payload/bundle/bundle/node) │
│ Specs: 20 found (todo.cy.js, actions.cy.js, aliasing.cy.js, assertions.cy.js, connect │
│ ors.cy.js, cookies.cy.js, cypress_api.cy.js, files.cy.js, local_storage.cy.js, │
│ location.cy.js, misc.cy.js, navigation.cy.js, network_requests.cy.js, queryin │
│ g.cy.js, spies_stubs_cl...) │
│ Searched: **/*cy.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: todo.cy.js (1 of 20)
Unexpected token < in JSON at position 0
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>:null:null)
at /Users/chef/payload/bundle/bundle/Cache/10.3.1/Cypress.app/Contents/Resources/app/node_modules/chrome-remote-interface/lib/devtools.js:121:33
at IncomingMessage.<anonymous> (/Users/chef/payload/bundle/bundle/Cache/10.3.1/Cypress.app/Contents/Resources/app/node_modules/chrome-remote-interface/lib/external-request.js:32:17)
at IncomingMessage.emit (node:events:402:35)
at IncomingMessage.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Desired behavior
Error should not occur.
Test code to reproduce
Cypress kitchensink example.
Cypress Version
10.3.1
Other
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
Hey @alexplischke,
There are few different logs that might provide useful information. Unfortunately, I can’t reproduce this. I would greatly appreciate it if you had the time to try to grab the logs in the failure scenario.
DEBUG=cypress:server:browsers:cri-client*,cypress-verbose:server:browsers:cri-client*,cypress:server:browsers:browser-cri-client npx cypress run