Skip to content
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

Cypress is failing with RangeError: Invalid time value #30783

Closed
rix0rrr opened this issue Dec 18, 2024 · 3 comments
Closed

Cypress is failing with RangeError: Invalid time value #30783

rix0rrr opened this issue Dec 18, 2024 · 3 comments

Comments

@rix0rrr
Copy link

rix0rrr commented Dec 18, 2024

Current behavior

On our project, most Cypress tests are now failing with the following errror:

Invalid time value
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at <embedded>:3215:1043369
    at a (<embedded>:3215:1043436)
    at <embedded>:3215:1046964
    at Array.forEach (<anonymous>)
    at <embedded>:3215:1046921
    at <embedded>:3215:1046982
    at ChildProcess.exithandler (node:child_process:399:7)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:527:28)
    at Pipe.<anonymous> (node:net:709:12)

After printing this error, the test runner fully stops; it doesn't seem to be something in the test itself, but something about the runner.

As you can see from https://github.com/hedyorg/hedy/actions/workflows/cypresstests.yml, the tests started failing pretty consistently for us between 2024-12-16 and 2024-12-17.

Triggering incident: GitHub image update to Ubuntu 24.04 ?

This seems to correlate with a new Ubuntu image rollout from GitHub. The jobs that recently succeeded ran on:

  Image: ubuntu-22.04
  Version: 20241211.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20241211.1/images/ubuntu/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20241211.1

The jobs that recently failed ran on:

Image: ubuntu-24.04
  Version: 20241208.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20241208.1/images/ubuntu/Ubuntu2404-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20241208.1

A race condition?

Not all runs on Ubuntu 24.04 failed. From around 23 job runs on Ubuntu 24.04, 20 failed and 3 succeeded. It seems to be some sort of race condition. The last thing the runner printed before throwing the error is a test file header:


  Running:  admin_page/user_overview/visible_attributes_checkboxes.cy.js                   (5 of 63)
  Estimated: 7 seconds

The file that it prints is different every time -- so there are some runs in which the failure apparently doesn't happen at all. The larger the test suite is, the less likely the race condition doesn't happen.

Desired behavior

The desired behavior should be that the tests do complete :)

Test code to reproduce

I don't know how to reproduce this, but it seems to happen quite consistenly for us on GitHub's Ubuntu 24.04 image.

Cypress Version

13.1.0

Node version

v20.18.0

Operating System

Ubuntu 24.04

Debug Logs

No response

Other

No response

@rix0rrr
Copy link
Author

rix0rrr commented Dec 18, 2024

I notice we were not using the latest Cypress version. I'm upgrading to 13.17.0 and running again to confirm.

@rix0rrr
Copy link
Author

rix0rrr commented Dec 18, 2024

Well whatever you did somewhere in the 13.x line seems to fix it, so I guess we can close this.

@rix0rrr rix0rrr closed this as completed Dec 18, 2024
@MikeMcC399
Copy link
Contributor

@rix0rrr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants