-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"TypeError: testcase.testcase[0]._attr.time.toFixed is not a function" error happens often in CI pipeline #18970
Comments
Requesting additional information via Support ticket. |
Can not express how annoying this is, especially for repos with tests that take long to run just to fail like this. Happens both on |
We've seen this in 9.5.2 - it just happened once, with no code changes, and then passed after that. Feels like a bug in mocha-junit-reporter - in various places it assigns |
@halfninja This issue can be fixed if you turn on the debugging mode in Cypress. I was trying to report this as a bug to Cypress, but the issue is gone whenever I turn on the debugging mode. |
I can reproduce on Cypress 10.3.1. |
@ryanborhoo said:
what do you mean by "debugging mode"? |
@DamienCassou If you are running Cypress in continue integration environment you will use command line to run your test, such as |
Looking at the reporter source code, I think it would only run over this code twice (causing it to call |
I've raised a PR in the reporter to make it a bit more resilient: michaelleeallen/mocha-junit-reporter#172 |
Should be fixed in mocha-junit-reporter 2.1.0 |
I'm also seeing the mocha-junit-reporter fixed on the cypress side here. Any idea when cypress will coordinate a new release with the fix? |
@troygibb this should be included in next week's release. Thanks @halfninja for getting this into the reporter! |
thanks @marktnoonan! great to see fixes coming in so quick I don't see this fix mentioned in the release notes here: https://docs.cypress.io/guides/references/changelog#10-10-0. Any chance you can comment? |
I'm not sure we typically list a dependency version bump in the changelog, @astone123 do you think it's worth adding this one, since it lets us close this issue? The 10.10.0 was cut this morning and includes the latest code from develop, so it will include that version bump to 2.1.0 for mocha-junit-reporter. |
@marktnoonan I made a PR to add this dependency update to the changelog cypress-io/cypress-documentation#4776 @troygibb can you try out v10.10.0 and verify that the update fixed this issue so that we can close this out? Thanks! |
will do! thank you all |
It seems the |
@astone123 @marktnoonan |
My apologies... I totally missed it in the server package :( PR has been raised to fix it. |
We would really appreciate a patch-release containing this fix since it breaks a large portion of our CI jobs. 🙏 |
I'll make a branch that does what @Turbotailz's newest PR (#24218) does, and then build a pre-release version of Cypress with the change included. You will be able to point your Cypress version to that pre-release build @albinohrn, so you can validate that it actually fixes the problem, and be unblocked. Then we can include the version bump in the next regular release of Cypress in about 2 weeks (or in a patch in-between, if there is one). When the pre-release build is completed I'll update this thread. |
That would be great, thanks @marktnoonan! |
Alright, builds are ready, for simplicity I am consolidating things in this comment so people don't have to go digging around: Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version. Here are the build install instructions per platform: linux x64: linux arm64: darwin x64: win32 x64: Please grab which ever one you need and let me know if this fixes the issue. |
Not sure if I'm doing something wrong but I can't get it to work. It seems like there's some urls that would need to be updated.
If I try to access the url in the browser i get a 404 as well but I'm redirected through a client-side redirect to download.cypress.io where the production release is downloaded. |
i think you just need to put the URL inside your package.json like instead of |
This is the end result after the npm install so that should work (and lead to the correct result in CI even if locally there are problems installing). FWIW npm install and download are both working normally for me with that url. |
working for me now! thank you for the quick update! |
I am getting the same 404 error. I will just wait until this is released. |
This seems to be an issue with newer Macs running the new architecture. When looking closer on the url I see that I'm trying to access:
vs the npm package
The difference beeing darwin-x64 (in the working npm package) and darwin-arm64 when trying to download the binary. If i replace arm64 with x64 in the binary url the file is found. |
Thanks for the feedback folks, I've approved #24218 |
The code for this is done in cypress-io/cypress#24218, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Getting below errors when running Cypress tests in CircleCI. This issues happens randomly, not able to reproduce on local environment.
Desired behavior
Cypress test run should be either pass or fail.
Test code to reproduce
Test code are saved in private repo, not able to share with Cypress team.
Cypress Version
8.4.1
Other
No response
The text was updated successfully, but these errors were encountered: