I have some strange issue in Cypress. When I go to the Cypress automation toll, click Settings and then try to click Project settings, I get the following error:
Invalid character in header content ["x-cypress-file-path"] TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["x-cypress-file-path"] at ServerResponse.setHeader (node:_http_outgoing:666:3) at j (:4526:1236) at Server. (:4526:1875) at Server.emit (node:events:513:28) at parserOnIncoming (node:_http_server:1072:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
My Cypress version in 13.3.3 (the last one) but the issue appears in the oldest versions as well. Here is the screenshot of the problem. What could be the issue?
I have tried to use different versions of Cypress. I expect to resolve the issue and be able to click see Project settings.
This may be a problem in the configuration file
cypress.config.js
, specifically the fileServerFolder - root project folder setting.This is used when the Cypress proxy handles a response, using this code:
The other external value is the request URL, which you can check in the Network tab of devtools for anything suspicious (i.e odd characters)