Closed NimmLor closed 11 months ago
I also have an issue upgrading TypeScript to 5.3.2
, but I get a different error. Again, downgrading to 5.2.2
is ok.
Your configFile is invalid: /path/to/repo/cypress.config.ts
It threw an error when required, check the stack trace below:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /path/to/repo/cypress.config.ts
at new NodeError (node:internal/errors:405:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11)
at defaultGetFormat (node:internal/modules/esm/get_format:124:36)
at defaultLoad (node:internal/modules/esm/load:89:20)
at nextLoad (node:internal/modules/esm/loader:163:28)
at ESMLoader.load (node:internal/modules/esm/loader:603:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
at new ModuleJob (node:internal/modules/esm/module_job:64:26)
at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:480:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Also receiving this on our Cypress tests (TypeScript config file, TypeScript tests) on GitHub actions (using cypress-io/github-action
):
The tests will just hang there for hours. (maybe Cypress / the GitHub action could at least crash if this happens?). Eg. using setUncaughtExceptionCaptureCallback
from node:process
It looks like this is your first time using Cypress: 13.6.0
[STARTED] Task without title.
[SUCCESS] Task without title.
Opening Cypress...
DevTools listening on ws://127.0.0.1:43529/devtools/browser/6f2e81cc-a284-4431-b152-7da6459b867f
[6301:1124/111613.793079:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
[Object: null prototype] {
[Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}
Node.js v20.8.1
cc @MikeMcC399
As for root cause, maybe this is related to the ts-node
failures with TypeScript 5.3:
@lmiller1990 would it be possible to upgrade ts-node
version once the PR fixing this is merged?
Because the node:internal/process/esm_loader:40 internalBinding('errors').triggerUncaughtException( ... nodejs.util.inspect.custom ...
from the error message doesn't provide much context, @alpharder also mentioned here that you can also patch ts-node
using patch-package
:
@karlhorky
The tests will just hang there for hours. (maybe Cypress / the GitHub action could at least crash if this happens?). Eg. using
setUncaughtExceptionCaptureCallback
fromnode:process
To prevent GitHub Actions from hanging until it reaches the GitHub job limit of 6 hours, GitHub Actions offers a timeout for steps and for jobs. Cypress GitHub Actions could look at whether any error-handling enhancement is needed, but the main focus should be on getting Cypress to work according to expectations.
To prevent GitHub Actions from hanging until it reaches the GitHub job limit of 6 hours, GitHub Actions offers a timeout for steps and for jobs.
I'm aware of this, but that's not something most users will do, and Cypress and the GitHub Action should crash on errors, not hang.
In my personal case, even though I'm aware of these configuration options, I didn't have this configured for all my workflows, and automatic bot upgrades to TypeScript 5.3.2 ended up with Cypress hangs burning through my whole GitHub Actions quota for the month.
@karlhorky
Cypress and the GitHub Action should crash on errors, not hang.
I agree that it is a bad thing for anything to hang without returning an error. It would be really useful, if this is a reproducible condition, to have an example repo available which consistently hangs so this could be investigated.
In my personal case, even though I'm aware of these configuration options, I didn't have this configured for all my workflows, and automatic bot upgrades to TypeScript 5.3.2 ended up with Cypress hangs burning through my whole GitHub Actions quota for the month.
That is very unfortunate and annoying!
Any updates? Get the exact same error, downgrading to 5.2.2 did not fix this for me. :/
Another TypeScript v5 issue: https://github.com/cypress-io/cypress/issues/27731
I also have an issue upgrading TypeScript to
5.3.2
, but I get a different error. Again, downgrading to5.2.2
is ok.Your configFile is invalid: /path/to/repo/cypress.config.ts It threw an error when required, check the stack trace below: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /path/to/repo/cypress.config.ts at new NodeError (node:internal/errors:405:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11) at defaultGetFormat (node:internal/modules/esm/get_format:124:36) at defaultLoad (node:internal/modules/esm/load:89:20) at nextLoad (node:internal/modules/esm/loader:163:28) at ESMLoader.load (node:internal/modules/esm/loader:603:26) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22) at new ModuleJob (node:internal/modules/esm/module_job:64:26) at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:480:17) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34) at processTicksAndRejections (node:internal/process/task_queues:95:5)
We had the same. Changing the file extension from cypress.config.ts
to cypress.config.mjs
is a possible workaround for this, although it's sad to have to lose types from this file.
@jennifer-shehane @cacieprins @mschile seems like ts-node
resolved their problem with TypeScript 5.3.x in ts-node@10.9.2
Maybe upgrading to this version will also stop Cypress from hanging with TypeScript 5.3.x?
Maybe upgrading to this version will also stop Cypress from hanging with TypeScript 5.3.x?
No even with that update of ts-node cypress still fails to start with Typescript 5.3:
DevTools listening on ws://127.0.0.1:44343/devtools/browser/4a70e88f-1707-4213-a759-439d9e96341b
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
[Object: null prototype] {
[Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}
Node.js v20.8.1
BTW this also happens if you use a .mjs
or .js
config file but .cy.ts
test cases. It would be bad but ok to use JS config files, but using JS test cases for TS code seems odd.
Downgrading to typescript 5.2.2 fixed my issue, cypress version is 13.6.1
I'm going to try to bump ts-node https://github.com/cypress-io/cypress/pull/28528.
@NimmLor Could you provide your package.json? I'm not able to reproduce the issue to confirm if this will fix it...
Or if someone else can provide a repo that will reproduce the issue, that'd be helpful.
Hi @jennifer-shehane,
just run cypress open
, in my case it crashes before startup up, so there is no need to run a webserver.
Using the ts.config.json from the issue description.
This would be the most minimal setup that crashes for me:
{
"name": "web",
"version": "0.0.0",
"private": true,
"license": "none",
"type": "module",
"scripts": {
"cypress:open": "cypress open"
},
"devDependencies": {
"cypress": "^13.6.1",
"typescript": "5.3.2"
},
"engines": {
"node": "20.9.0"
}
}
@NimmLor I'm still not able to reproduce π Maybe you can provide a repo?
@jennifer-shehane it needs a Cypress config in TypeScript and also Cypress test in TypeScript - do you have both of those in your reproduction?
I'll check to see if we have a public repo with the problem...
I have a public reproduction here (make sure you use the solution
branch):
Here is an example of a failing pull request which upgrades to TypeScript 5.3.3:
The failing GitHub Actions CI PR run:
Output of the run:
Run cypress-io/github-action@v6
/usr/local/bin/yarn --frozen-lockfile
yarn install v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > eslint-config-upleveled@7.3.4" has unmet peer dependency "@types/eslint@^8.44.8".
warning " > eslint-config-upleveled@7.3.4" has unmet peer dependency "globals@^13.23.0".
warning "eslint-config-upleveled > @babel/eslint-parser@7.23.3" has unmet peer dependency "@babel/core@^7.11.0".
warning "stylelint-config-upleveled > postcss-styled-syntax@0.5.0" has unmet peer dependency "postcss@^8.4.21".
warning "stylelint-config-upleveled > stylelint-config-recommended-scss > postcss-scss@4.0.[9](https://github.com/upleveled/sad-machine-codealong/actions/runs/7135572923/job/19432583585?pr=412#step:4:10)" has unmet peer dependency "postcss@^8.4.29".
[4/4] Building fresh packages...
Done in 35.71s.
/opt/hostedtoolcache/node/20.[10](https://github.com/upleveled/sad-machine-codealong/actions/runs/7135572923/job/19432583585?pr=412#step:4:11).0/x64/bin/npx cypress cache list
βββββββββββ¬βββββββββββββ
β version β last used β
βββββββββββΌβββββββββββββ€
β 13.6.1 β 2 days ago β
βββββββββββ΄βββββββββββββ
/opt/hostedtoolcache/node/20.10.0/x64/bin/npx cypress verify
[STARTED] Task without title.
[SUCCESS] Task without title.
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/sad-machine-codealong/sad-machine-codealong --files-from manifest.txt --use-compress-program zstdmt
Cache Size: ~717 MB (751617267 B)
Cache saved successfully
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/sad-machine-codealong/sad-machine-codealong --files-from manifest.txt --use-compress-program zstdmt
Cache Size: ~157 MB (164565942 B)
Cache saved successfully
start server command "yarn dev"
current working directory "/home/runner/work/sad-machine-codealong/sad-machine-codealong"
/usr/local/bin/yarn dev
yarn run v1.22.21
$ next dev
DevTools listening on ws://[12](https://github.com/upleveled/sad-machine-codealong/actions/runs/7135572923/job/19432583585?pr=412#step:4:13)7.0.0.1:36645/devtools/browser/4f1c9e83-ac5e-49f9-af5a-835bdf8688d5
[2237:1208/001517.825693:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:
β² Next.js [14](https://github.com/upleveled/sad-machine-codealong/actions/runs/7135572923/job/19432583585?pr=412#step:4:15).0.4
- Local: http://localhost:3000
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
[Object: null prototype] {
[Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}
Node.js v[20](https://github.com/upleveled/sad-machine-codealong/actions/runs/7135572923/job/19432583585?pr=412#step:4:21).8.1
β Ready in 2.5s
Error: The operation was canceled.
Downgrading to typescript@5.2.2
was the resolution that I used before merging the PR.
@jennifer-shehane I've successfully replicated it and found a fix for it.
The solution for me involved modifying the extends field in the tsconfig.json file to directly reference the file, rather than using the shared configuration package name.
I've created a public repo to replicate it: https://github.com/NimmLor/cypress-ts-demo
"extends": "@atws/tsconfig/node20/react",
// β changed to
"extends": "../../node_modules/@atws/tsconfig/node20/react",
PS: I'm wondering how i got this error using the tsconfig.json
when I've created this issue π€
@NimmLor this is exactly the bug described in the original issue leading to the ts-node@10.9.2
fix:
Both of these issues led to this PR, which led to ts-node@10.9.2
being released:
@jennifer-shehane if you're investigating here, another thing that you may run into in your research is another buggy behavior in ts-node
/ Node.js itself, which is related to the Object: null prototype
... nodejs.util.inspect.custom
part of the output I posted above.
This seems to be related to this problem here:
This does have workarounds in the ts-node
2026 issue above.
However, in my understanding this will not actually resolve the problem, but rather avoid the obscure message and allow you to see the real error message.
Gut feel says the real error message will be "tsconfig file not found", as described in https://github.com/TypeStrong/ts-node/issues/2076, the issue leading up to ts-node@10.9.2
fix, something like this:
TSError: β¨― Unable to compile TypeScript:
error TS6053: File '@tsconfig/node-lts/tsconfig.json' not found.
@jennifer-shehane one other thing that I have run into in poking around in the Cypress architecture in the past is that there are multiple versions of ts-node
in Cypress packages.
The one that is "harder" to upgrade for a normal user is the one that is inside the Cypress binary (the Electron app).
Maybe the problem is in there?
@karlhorky I've tested your example repo and it works for me as soon as i change the extends property to use the base config directly:
- "start": "next start"
+ "start": "next start",
+ "cypress:run": "cypress run"
- "typescript": "5.2.2"
+ "typescript": "5.3.3"
- "extends": "eslint-config-upleveled/tsconfig.base.json",
+ "extends": "./node_modules/eslint-config-upleveled/tsconfig.base.json",
@NimmLor yes, this is a workaround that is also in those issues I mentioned above.
This is not a solution, just a workaround.
It is a bug that ts-node
fails with tsconfig.json
files specified like that, which is resolved by ts-node@10.9.2
@NimmLor yes, this is a workaround that is also in those issues I mentioned above.
This is not a solution, just a workaround.
Yeah I see, but it will probably be my go to setup, the bun
runtime doesn't support those imports too.
I've personally stopped using ts-node in favor of tsx
Ok this is getting pretty off topic, so let's not continue discussing these extra things here (I will reach out on Twitter/X to continue the discussion with you privately now) some last answers:
the
bun
runtime doesn't support those imports too
Hm, if this is really true, that seems like a pretty big bug in Bun too, maybe you can edit your post above to add more details. And probably you should report this as an issue to Bun, if it's really the case - I guess Bun will fix that very fast if it's really a bug.
I've personally stopped using ts-node in favor of tsx
Cypress doesn't allow for tsx
, so it's irrelevant here.
@karlhorky Thanks I can reproduce it given the repro with typescript: 5.3.3. Using Node 20.10.0
Running the project itself in cypress run
shows this error:
Running this project through cypress run
in dev mode on the repo, I get this error:
Running this project through cypress run
in dev mode on the repo with this branch (ts-node upgrade) https://github.com/cypress-io/cypress/pull/28528, the run is successful.
The error isn't exactly presented in the same way, but I have reason to believe this PR https://github.com/cypress-io/cypress/pull/28528 will likely solve this issue. I think I could verify once the binary is built after merging into develop.
Amazing news!
I'm happy to try out a test / prerelease version of Cypress in that project too, if one is available before a full Cypress release.
@karlhorky
I'm happy to try out a test / prerelease version of Cypress in that project too, if one is available before a full Cypress release.
I've verified that this PR fixes this issue from the example given using the binary on that commit as Mike mentioned. This should go out next ~Tuesday if the release goes well.
- you can follow the instructions Advanced Installation > Install pre-release version to access and download a pre-release version
I was reading through the instructions:
You should see several comments from the cypress-bot user with instructions for installing Cypress pre-releases. Pick the one that corresponds to your operating system and CPU architecture, and follow the instructions there to install the pre-release.
For the installation URLs on the merged commit, I couldn't figure out how to install different versions based on the environment (eg. macOS dev environment, darwin x64
, Linux CI environment, linux x64
).
Trying to install the linux x64
version on macOS with Yarn v1 (to get the Yarn lockfile updated for Linux on GitHub Actions CI), I received this error:
yarn install
Exit code: 1
Command: node index.js --exec install
Arguments:
Directory: /Users/k/p/sad-machine-codealong/node_modules/cypress
Output:
β Warning: You are installing a pre-release build of Cypress.
Bugs may be present which do not exist in production builds.
This build was created from:
* Commit SHA: 372515829e82fc3542891cf92f83579e01f530e7
* Commit Branch: develop
* Commit Timestamp: 2023-12-14T18:28:18.000Z
Installing Cypress (version: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip)
[STARTED] Task without title.
[FAILED] The Cypress App could not be downloaded.
[FAILED]
[FAILED] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
[FAILED]
[FAILED] Otherwise, please check network connectivity and try again:
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] URL: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip
[FAILED] Error: Failed downloading the Cypress binary.
[FAILED] Response code: 404
[FAILED] Response message: Not Found
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] Platform: darwin-arm64 (23.2.0)
[FAILED] Cypress Version: 13.6.2
The Cypress App could not be downloaded.
Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
Otherwise, please check network connectivity and try again:
----------
URL: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip
Error: Failed downloading the Cypress binary.
Response code: 404
Response message: Not Found
----------
Platform: darwin-arm64 (23.2.0)
Cypress Version: 13.6.2
Installing a version that is not compatible with the current architecture doesn't work? Or maybe the problem is that there are no darwin-arm64
builds?
I guess what I could try is updating the lockfile on GitHub Actions CI as a step... π€
Ok, managed to update the Yarn v1 lockfile in a GitHub Actions CI step to the linux-x64
version from PR #28528 (see below)
I can confirm that the update has resolved the TypeScript 5.3.x update π , tests ran through in this PR:
package.json
{
"devDependencies": {
"cypress": "https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz",
}
}
yarn.lock
"cypress@https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz":
version "13.6.2"
resolved "https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz#5aeaebed58dce71eb84fd72ddf8e1725bc835ddb"
dependencies:
"@cypress/request" "^3.0.0"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^18.17.5"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
blob-util "^2.0.2"
bluebird "^3.7.2"
buffer "^5.6.0"
cachedir "^2.3.0"
chalk "^4.1.0"
check-more-types "^2.24.0"
cli-cursor "^3.1.0"
cli-table3 "~0.6.1"
commander "^6.2.1"
common-tags "^1.8.0"
dayjs "^1.10.4"
debug "^4.3.4"
enquirer "^2.3.6"
eventemitter2 "6.4.7"
execa "4.1.0"
executable "^4.1.1"
extract-zip "2.0.1"
figures "^3.2.0"
fs-extra "^9.1.0"
getos "^3.2.1"
is-ci "^3.0.0"
is-installed-globally "~0.4.0"
lazy-ass "^1.6.0"
listr2 "^3.8.3"
lodash "^4.17.21"
log-symbols "^4.0.0"
minimist "^1.2.8"
ospath "^1.2.2"
pretty-bytes "^5.6.0"
process "^0.11.10"
proxy-from-env "1.0.0"
request-progress "^3.0.0"
semver "^7.5.3"
supports-color "^8.1.1"
tmp "~0.2.1"
untildify "^4.0.0"
yauzl "^2.10.0"
This should go out next ~Tuesday if the release goes well.
@jennifer-shehane where can we watch for the progress of cypress@13.6.2
or cypress@13.7.0
? Is there maybe an issue or PR we can subscribe to?
On the npm page the latest version cypress@13.6.1
is still the old one - was released 15 days ago.
Ok, managed to update the Yarn v1 lockfile in a GitHub Actions CI step to the
linux-x64
version from PR #28528 (see below)I can confirm that the update has resolved the TypeScript 5.3.x update π , tests ran through in this PR:
package.json
{ "devDependencies": { "cypress": "https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz", } }
yarn.lock
"cypress@https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz": version "13.6.2" resolved "https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz#5aeaebed58dce71eb84fd72ddf8e1725bc835ddb" dependencies: "@cypress/request" "^3.0.0" "@cypress/xvfb" "^1.2.4" "@types/node" "^18.17.5" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" blob-util "^2.0.2" bluebird "^3.7.2" buffer "^5.6.0" cachedir "^2.3.0" chalk "^4.1.0" check-more-types "^2.24.0" cli-cursor "^3.1.0" cli-table3 "~0.6.1" commander "^6.2.1" common-tags "^1.8.0" dayjs "^1.10.4" debug "^4.3.4" enquirer "^2.3.6" eventemitter2 "6.4.7" execa "4.1.0" executable "^4.1.1" extract-zip "2.0.1" figures "^3.2.0" fs-extra "^9.1.0" getos "^3.2.1" is-ci "^3.0.0" is-installed-globally "~0.4.0" lazy-ass "^1.6.0" listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" semver "^7.5.3" supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" yauzl "^2.10.0"
Thank you so much for solving this! I encountered this issue today, using TypeScript 5.3.3 and I can confirm that changing the Cypress reference to the PR solved my issue! π π
When should we expect an official next release from Cypress?
@karlhorky
where can we watch for the progress of
cypress@13.6.2
orcypress@13.7.0
? Is there maybe an issue or PR we can subscribe to?
You can subscribe to releases via GitHub repository watch
Also the Discord channel cypress-announcements shows any new release of Cypress modules.
You can subscribe to releases via GitHub repository watch
Right, I was aware about that one - I meant to ask about a specific issue or PR which is specific to the cypress@13.6.2
or cypress@13.7.0
releases, to be able to follow along and see on a detailed level what is still left over.
But maybe there is no such issue / PR in the Cypress release process.
Doesn't work for me, locally at least. Getting this log when running yarn install
:
# This file contains the result of Yarn building a package (cypress@https://cdn.cypress.io/beta/npm/13.6.2/linux-x64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.tgz)
# Script name: postinstall
β Warning: You are installing a pre-release build of Cypress.
Bugs may be present which do not exist in production builds.
This build was created from:
* Commit SHA: 372515829e82fc3542891cf92f83579e01f530e7
* Commit Branch: develop
* Commit Timestamp: 2023-12-14T18:28:18.000Z
Installing Cypress (version: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip)
[STARTED] Task without title.
[FAILED] The Cypress App could not be downloaded.
[FAILED]
[FAILED] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
[FAILED]
[FAILED] Otherwise, please check network connectivity and try again:
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] URL: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip
[FAILED] Error: Failed downloading the Cypress binary.
[FAILED] Response code: 404
[FAILED] Response message: Not Found
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] Platform: darwin-arm64 (23.2.0)
[FAILED] Cypress Version: 13.6.2
The Cypress App could not be downloaded.
Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
Otherwise, please check network connectivity and try again:
----------
URL: https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip
Error: Failed downloading the Cypress binary.
Response code: 404
Response message: Not Found
----------
Platform: darwin-arm64 (23.2.0)
Cypress Version: 13.6.2
When running in a browser, I do get a .zip
being downloaded, which does contain a valid Cypress.app
. Having said that, the server does seem to return a 404:
curl --head https://cdn.cypress.io/beta/binary/13.6.2/darwin-arm64/develop-372515829e82fc3542891cf92f83579e01f530e7/cypress.zip
HTTP/2 404
...
@bengry it looks like Cypress is downloading the app with the darwin-arm64
platform (Apple Silicon machines), probably same issue that I reported in my message above:
[FAILED] Platform: darwin-arm64 (23.2.0) [FAILED] Cypress Version: 13.6.2 The Cypress App could not be downloaded.
The way I got around this was to run the tests only on GitHub Actions CI:
I don't think there is currently a way to run the fixed version of Cypress on Apple Silicon machines like M1, M2, M3, and the new version has not yet been released.
cc @jennifer-shehane
@bengry it looks like Cypress is downloading the app with the
darwin-arm64
platform (Apple Silicon machines), probably same issue that I reported in my message above:[FAILED] Platform: darwin-arm64 (23.2.0) [FAILED] Cypress Version: 13.6.2 The Cypress App could not be downloaded.
The way I got around this was to run the tests only on GitHub Actions CI:
I don't think there is currently a way to run the fixed version of Cypress on Apple Silicon machines like M1, M2, M3, and the new version has not yet been released.
cc @jennifer-shehane
Got it, I thought I that it was also built for macOS. I'm on an M1 Macbook, so the darwin-arm64
is expected.
Running Cypress only in CI is a no-go for us, we need to be able to run it locally as well.
This is a blocker for us for upgrading to TypeScript 5.3, so releasing a 13.6.2 version with the fix for this (which, to my understanding, was already merged) would be greatly appreciated.
Released in 13.6.2
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v13.6.2, please open a new issue.
Current behavior
The server crashes after upgrading to Typescript 5.3.2. Downgrading to 5.2.2 fixes the issue.
For me this happens only if I uses
extends
in tsconfig.json and specifying a module. As a workaround theextends
can be changed to reference the file directly:Output after running
cypress run
orcypress open
:Desired behavior
The server starts up as usual
Test code to reproduce
It fails with even the most basic config:
package.json
is using vite (react-ts) withtype: module
tsconfig.json
Cypress Version
13.6.0, 13.5.1
Node version
v20.9.0
Operating System
Win 11, Github Actions Linux Runner
Other
Worked for multiple months without issues, we have been using every typescript version since v4.9
```shell cypress:cli:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","C:\\repos\\corp-monorepo\\node_modules\\cypress\\bin\\cypress","open"] +0ms cypress:cli NODE_OPTIONS=--max_old_space_size=8192 +0ms cypress:cli:cli program parsing arguments +1ms cypress:cli:cli opening Cypress +0ms cypress:cli parsed cli options {} +97ms cypress:cli verifying Cypress app +0ms cypress:cli checking environment variables +0ms cypress:cli checking if executable exists C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress\Cypress.exe +1ms cypress:cli Binary is executable? : true +2ms cypress:cli binaryDir is C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress +0ms cypress:cli Reading binary package.json from: C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress\resources\app\package.json +0ms cypress:cli Found binary version 13.6.0 installed in: C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress +3ms cypress:cli { verified: true } +3ms cypress:cli is Verified ? true +0ms cypress:cli opening from options {"project":"C:\\repos\\corp-monorepo\\apps\\web"} +0ms cypress:cli command line arguments ["--project","C:\\repos\\corp-monorepo\\apps\\web"] +0ms cypress:cli needs to start own Xvfb? false +0ms cypress:cli spawning, should retry on display problem? false +0ms cypress:cli spawn args [ '--', '--project', 'C:\\repos\\corp-monorepo\\apps\\web', '--cwd', 'C:\\repos\\corp-monorepo\\apps\\web', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '20.9.0' ] { detached: false, stdio: 'pipe', windowsHide: false } +1ms cypress:cli spawning Cypress with executable: C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress\Cypress.exe +1ms cypress:cli piping process STDIN into child STDIN +6ms cypress:cli piping child STDOUT to process STDOUT +0ms cypress:cli piping child STDERR to process STDERR +1ms [29988:1122/092003.804:ERROR:node_bindings.cc(300)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details. cypress:snapshot:info Caching 3465, defining 4295 modules! Using cache +0ms cypress:snapshot:debug initializing packherd require +0ms cypress:server:performance-benchmark elapsed time at v8-snapshot-startup-time: 101.933ms +0ms cypress:server:appdata path: C:\Users\loren\AppData\Roaming\Cypress\cy\production\browsers +0ms cypress:server:cypress starting cypress with argv [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe', '--', '--project', 'C:\\repos\\corp-monorepo\\apps\\web', '--cwd', 'C:\\repos\\corp-monorepo\\apps\\web', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '20.9.0' ] +0ms cypress:server:args argv array: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe', '--project', 'C:\\repos\\corp-monorepo\\apps\\web', '--cwd', 'C:\\repos\\corp-monorepo\\apps\\web', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '20.9.0' ] +0ms cypress:server:args parsed argv options { options: { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0' } } +1ms cypress:server:args argv parsed: { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0', invokedFromCli: true } +2ms cypress:server:util:proxy found proxy environment variables {} +0ms cypress:server:util:proxy HTTP_PROXY is falsy, disabling HTTP_PROXY +3ms cypress:server:util:proxy setting default NO_PROXY of `` +0ms cypress:server:util:proxy <-loopback> not found, adding localhost to NO_PROXY +0ms cypress:server:util:proxy normalized proxy environment variables { NO_PROXY: '127.0.0.1,::1,localhost' } +0ms cypress:server:args options { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0', invokedFromCli: true, config: {} } +5ms cypress:server:args argv options: { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0', invokedFromCli: true, config: {}, projectRoot: 'C:\\repos\\corp-monorepo\\apps\\web' } +0ms cypress:server:cypress from argv [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe', '--project', 'C:\\repos\\corp-monorepo\\apps\\web', '--cwd', 'C:\\repos\\corp-monorepo\\apps\\web', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '20.9.0' ] got options { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0', invokedFromCli: true, config: {}, projectRoot: 'C:\\repos\\corp-monorepo\\apps\\web' } +9ms cypress:server:appdata path: C:\Users\loren\AppData\Roaming\Cypress\cy\production +39ms DevTools listening on ws://127.0.0.1:61732/devtools/browser/9d7651c6-0041-444c-9396-1007ea8227b8 cypress:server:cypress starting in mode interactive with options { _: [ 'C:\\Users\\loren\\AppData\\Local\\Cypress\\Cache\\13.6.0\\Cypress\\Cypress.exe' ], project: 'C:\\repos\\corp-monorepo\\apps\\web', cwd: 'C:\\repos\\corp-monorepo\\apps\\web', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '20.9.0', invokedFromCli: true, config: {}, projectRoot: 'C:\\repos\\corp-monorepo\\apps\\web' } +37ms cypress:server:cypress running Electron currently +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudLatestRunUpdateSpecData +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudProjectBySlug +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudProjectsBySlugs +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudSpecByPath +1ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudViewer +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.pollingIntervals +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.versions +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for CurrentProject.cloudProject +0ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RelevantRunInfo.status +1ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RemoteFetchableCloudProjectResult.data +1ms cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RemoteFetchableCloudProjectSpecResult.data +0ms cypress:server:browsers:utils getBrowsers +0ms cypress:launcher:detect detecting if the following browsers are present [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', versionRegex: /Google Chrome (\S+)/m, binary: [ 'google-chrome', 'chrome', 'google-chrome-stable' ], minSupportedVersion: 64 }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', versionRegex: /Chromium (\S+)/m, binary: [ 'chromium-browser', 'chromium' ], minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'beta', displayName: 'Chrome Beta', versionRegex: /Google Chrome (\S+) beta/m, binary: 'google-chrome-beta', minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'canary', displayName: 'Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: 64 }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', versionRegex: /^Mozilla Firefox ([^\sab]+)$/m, binary: 'firefox', minSupportedVersion: 86, validator: [Function: validator] }, { name: 'firefox', family: 'firefox', channel: 'dev', displayName: 'Firefox Developer Edition', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m, binary: [ 'firefox-developer-edition', 'firefox' ], minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'nightly', displayName: 'Firefox Nightly', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m, binary: [ 'firefox-nightly', 'firefox-trunk' ], minSupportedVersion: 86 }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', versionRegex: /Microsoft Edge (\S+)/im, binary: [ 'edge', 'microsoft-edge' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/im, binary: [ 'edge-canary', 'microsoft-edge-canary' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/im, binary: [ 'edge-beta', 'microsoft-edge-beta' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'dev', displayName: 'Edge Dev', versionRegex: /Microsoft Edge.+?(\S*(?= dev)|(?<=dev )\S*)/im, binary: [ 'edge-dev', 'microsoft-edge-dev' ], minSupportedVersion: 79 } ] +0ms cypress:server:browsers:utils WebKit is enabled, but there was an error constructing the WebKit browser: { err: Error: Cannot find module 'playwright-webkit' Require stack: - C:\Users\loren\AppData\Local\Cypress\Cache\13.6.0\Cypress\resources\app\packages\server\lib\browsers\utils.ts at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15) at n._resolveFilename (node:electron/js2c/browser_init:2:117603) at resolve (node:internal/modules/cjs/helpers:116:19) at Function.resolve (evalmachine.Debug Logs