You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing an issue where Cypress is sometimes crashing with a ERR_HTTP_INVALID_STATUS_CODE error:
RangeError [ERR_HTTP_INVALID_STATUS_CODE] [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0 at ServerResponse.writeHead (_http_server.js:255:11) at ServerResponse.writeHead (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/on-headers/index.js:44:26) at ServerResponse._implicitHeader (_http_server.js:246:8) at ServerResponse.end (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/compression/index.js:103:14) at Duplexify.onend (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:646:10) at Object.onceWrapper (events.js:421:28) at Duplexify.emit (events.js:315:20) at endReadableNT (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:1094:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { code: 'ERR_HTTP_INVALID_STATUS_CODE' } RangeError [ERR_HTTP_INVALID_STATUS_CODE] [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0 at ServerResponse.writeHead (_http_server.js:255:11) at ServerResponse.writeHead (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/on-headers/index.js:44:26) at ServerResponse._implicitHeader (_http_server.js:246:8) at ServerResponse.end (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/compression/index.js:103:14) at Duplexify.onend (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:646:10) at Object.onceWrapper (events.js:421:28) at Duplexify.emit (events.js:315:20) at endReadableNT (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:1094:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)
I enabled debug logging and can see that a request that the application under test is making sometimes receives a status code of 0. We then see "cypress:server:browsers killing browser process" and the test run stops.
Is there any way we can handle this 0 status code gracefully without the tests crashing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am seeing an issue where Cypress is sometimes crashing with a ERR_HTTP_INVALID_STATUS_CODE error:
RangeError [ERR_HTTP_INVALID_STATUS_CODE] [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0 at ServerResponse.writeHead (_http_server.js:255:11) at ServerResponse.writeHead (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/on-headers/index.js:44:26) at ServerResponse._implicitHeader (_http_server.js:246:8) at ServerResponse.end (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/compression/index.js:103:14) at Duplexify.onend (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:646:10) at Object.onceWrapper (events.js:421:28) at Duplexify.emit (events.js:315:20) at endReadableNT (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:1094:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { code: 'ERR_HTTP_INVALID_STATUS_CODE' } RangeError [ERR_HTTP_INVALID_STATUS_CODE] [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0 at ServerResponse.writeHead (_http_server.js:255:11) at ServerResponse.writeHead (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/on-headers/index.js:44:26) at ServerResponse._implicitHeader (_http_server.js:246:8) at ServerResponse.end (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/compression/index.js:103:14) at Duplexify.onend (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:646:10) at Object.onceWrapper (events.js:421:28) at Duplexify.emit (events.js:315:20) at endReadableNT (/main/cypress_bin/7.6.0/Cypress/resources/app/packages/server/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:1094:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)
I enabled debug logging and can see that a request that the application under test is making sometimes receives a status code of 0. We then see "cypress:server:browsers killing browser process" and the test run stops.
Is there any way we can handle this 0 status code gracefully without the tests crashing?
Any advice is greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions