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

"RangeError: Invalid time value" while upgrading to Debian 12 #27869

Closed
kakuzei opened this issue Sep 21, 2023 · 19 comments
Closed

"RangeError: Invalid time value" while upgrading to Debian 12 #27869

kakuzei opened this issue Sep 21, 2023 · 19 comments

Comments

@kakuzei
Copy link

kakuzei commented Sep 21, 2023

Current behavior

Cypress test execution randomly failed with the following error:

Invalid time value
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at <embedded>:3215:1041876
    at a (<embedded>:3215:1041943)
    at <embedded>:3215:1045471
    at Array.forEach (<anonymous>)
    at <embedded>:3215:1045428
    at <embedded>:3215:1045489
    at ChildProcess.exithandler (node:child_process:422:7)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:322:12)
Error: Process completed with exit code 1.

Desired behavior

No response

Test code to reproduce

I did not create an example to reproduce the issue yet.

Cypress Version

13.2.0

Node version

18.18.0

Operating System

Debian GNU/Linux 12 (bookworm)

Debug Logs

[...]
  cypress:server:server-base Got CONNECT request from www.google.com:443 +4s
  cypress:https-proxy Writing browserSocket connection headers { url: 'www.google.com:443', headLength: 0, headers: { host: 'www.google.com:443', 'proxy-connection': 'keep-alive', 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' } } +4s
  cypress:https-proxy Got first head bytes { url: 'www.google.com:443', head: '\x16\x03\x01\x02\x00\x01\x00\x01�\x03\x03�+�Yht��2-f�\x0FwqJT�d\x04�a�l��Y���\x17\x16 G����cR>�,\x15\fO\x15�^���\x02' } +1ms
  cypress:https-proxy Making intercepted connection to 45575 +153ms
  cypress:network:connect successfully connected { opts: { port: 45575, host: 'localhost', getDelayMsForRetry: [Function: h] }, iteration: 0 } +4s
  cypress:https-proxy received upstreamSocket callback for request { port: 45575, hostname: 'localhost', err: undefined } +6ms
  cypress:server:util:socket_allowed allowing socket { localPort: 40836 } +4s
  cypress:launcher:browsers chrome stderr: [742:761:0921/095003.709925:ERROR:cert_verify_proc_builtin.cc(701)] CertVerifyProcBuiltin for www.google.com failed:
----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=www.google.com) -----
ERROR: No matching issuer found +5s
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 40790 } +891ms
  cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 40802 } +50ms
Invalid time value
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at <embedded>:3215:1041876
    at a (<embedded>:3215:1041943)
    at <embedded>:3215:1045471
    at Array.forEach (<anonymous>)
    at <embedded>:3215:1045428
    at <embedded>:3215:1045489
    at ChildProcess.exithandler (node:child_process:422:7)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:322:12)
  cypress:server:cloud:api request to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"RangeError","message":"Invalid time value","stack":"RangeError: Invalid time value\n    at Date.toISOString (<anonymous>)\n    at <embedded>:3215:1041876\n    at a (<embedded>:3215:1041943)\n    at <embedded>:3215:1045471\n    at Array.forEach (<anonymous>)\n    at <embedded>:3215:1045428\n    at <embedded>:3215:1045489\n    at ChildProcess.exithandler (node:child_process:422:7)\n    at ChildProcess.emit (node:events:513:28)\n    at maybeClose (node:internal<stripped-path>child_process:1091:16)\n    at Socket.<anonymous> (node:internal<stripped-path>child_process:449:11)\n    at Socket.emit (node:events:513:28)\n    at Pipe.<anonymous> (node:net:322:12)"},"version":"13.2.0","osName":"linux","osVersion":"Debian - ","osCpus":[{"model":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","speed":2793,"times":{"user":219800,"nice":60,"sys":33850,"idle":597240,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","speed":2793,"times":{"user":250590,"nice":60,"sys":34730,"idle":610040,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","speed":2793,"times":{"user":273100,"nice":0,"sys":33370,"idle":591510,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","speed":2793,"times":{"user":263550,"nice":60,"sys":34060,"idle":599640,"irq":0}}],"osMemory":{"free":22449184768,"total":29447667712}},"headers":{"x-os-name":"linux","x-cypress-version":"13.2.0"}} and token: undefined +0ms
  cypress:network:agent addRequest called { isHttps: true, href: 'https://api.cypress.io/exceptions' } +6s
  cypress:network:connect beginning getAddress { hostname: 'api.cypress.io', port: 443 } +2s
  cypress:server:browsers killing browser process +7s
  cypress:server:browsers:chrome closing remote interface client { options: { gracefulShutdown: true } } +7s
  cypress:server:browsers:cri-client closing cri client { closed: false, target: 'FDB37F27C7B2495A33FD0DDD73FC937D' } +7s
  cypress:server:browsers:chrome closing chrome +1ms
  cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 23, proxyRequestsReceived: 2, immediatelyMatchedRequests: 0, unmatchedRequests: 2, unmatchedPreRequests: 0 } +0ms
  cypress:server:browsers:cri-client closed cri client { closed: true, target: 'FDB37F27C7B2495A33FD0DDD73FC937D' } +3ms
  cypress:server:browsers:cri-client closing cri client { closed: false, target: 'ws://127.0.0.1:37431/devtools/browser/25b75542-324c-4311-a413-58dbc4a948f7' } +0ms
  cypress:server:browsers:cri-client closed cri client { closed: true, target: 'ws://127.0.0.1:37431/devtools/browser/25b75542-324c-4311-a413-58dbc4a948f7' } +8ms
2023-09-21T09:50:06.066Z cypress:cli child event fired { event: 'exit', code: 1, signal: null }
2023-09-21T09:50:06.067Z cypress:cli Stopping Xvfb
Error: Process completed with exit code 1.

Other

I'm having this issue since I upgraded my Docker image used to execute the Cypress tests from Debian 11 to Debian 12.
This issue occurred randomly and quite often (like 30% of the time).
When I downgrade to Debian 11 without changing anything else, I don't have this issue anymore.
I don't think the debug log can help as this issue could randomly occurs at different stage of the execution of the tests.

Does anyone have any idea what is causing this problem?

@MikeMcC399

This comment was marked as outdated.

@Gamer1120
Copy link

Gamer1120 commented Sep 25, 2023

I'm running a custom Cypress docker image based on the node 18 image, and got the same error in my Gitlab CI pipeline last night:

cypress           | $ /app/node_modules/.bin/cypress run '' --spec cypress/e2e/XXXXXXX.cy.ts --reporter cypress-multi-reporters --reporter-options configFile=/app/multi-reporter-config.json --browser edge
cypress           | It looks like this is your first time using Cypress: 13.2.0
cypress           | 
cypress           | [STARTED] Task without title.
cypress           | [SUCCESS] Task without title.
cypress           | 
cypress           | Opening Cypress...
cypress           | [263:0925/033716.750874:ERROR:node_bindings.cc(300)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
cypress           | 
cypress           | DevTools listening on ws://127.0.0.1:42151/devtools/browser/e3994de5-68a8-43f8-bbfc-51838cda4615
cypress           | Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
cypress           | 
cypress           | tput: No value for $TERM and no -T specified
cypress           | ====================================================================================================
cypress           | 
cypress           |   (Run Starting)
cypress           | 
cypress           |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
cypress           |   │ Cypress:        13.2.0                                                                         │
cypress           |   │ Browser:        Edge 117 (headless)                                                            │
cypress           |   │ Node Version:   v18.18.0 (/usr/local/bin/node)                                                 │
cypress           |   │ Specs:          1 found (XXXXXXX.cy.ts)                                                  │
cypress           |   │ Searched:       cypress/e2e/XXXXXXX.cy.ts                               │
cypress           |   │ Experiments:    experimentalMemoryManagement=true                                              │
cypress           |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
cypress           | 
cypress           | 
cypress           | ────────────────────────────────────────────────────────────────────────────────────────────────────
cypress           |                                                                                                     
cypress           |   Running:  XXXXXXX.cy.ts                                                             (1 of 1)
cypress           | Invalid time value
cypress           | RangeError: Invalid time value
cypress           |     at Date.toISOString (<anonymous>)
cypress           |     at <embedded>:3215:1041876
cypress           |     at a (<embedded>:3215:1041943)
cypress           |     at <embedded>:3215:1045471
cypress           |     at Array.forEach (<anonymous>)
cypress           |     at <embedded>:3215:1045428
cypress           |     at <embedded>:3215:1045489
cypress           |     at ChildProcess.exithandler (node:child_process:422:7)
cypress           |     at ChildProcess.emit (node:events:513:28)
cypress           |     at maybeClose (node:internal/child_process:1091:16)
cypress           |     at Socket.<anonymous> (node:internal/child_process:449:11)
cypress           |     at Socket.emit (node:events:513:28)
cypress           |     at Pipe.<anonymous> (node:net:322:12)
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cypress           | Thread 0 likely finished with failure count: 1
cypress           | ┌──────────────────────────────────────────────────┬────────┬───────┬─────────┬─────────┬─────────┐
cypress           | │ Spec                                             │ Time   │ Tests │ Passing │ Failing │ Pending │
cypress           | ├──────────────────────────────────────────────────┼────────┼───────┼─────────┼─────────┼─────────┤
cypress           | │ Results                                          │ 0s     │ 0     │ 0       │ 0       │ 0       │
cypress           | └──────────────────────────────────────────────────┴────────┴───────┴─────────┴─────────┴─────────┘
cypress           | Found test suites does not match results.
cypress           | Test suites found: 1
cypress           | Test suite results: 0
cypress           | Some test suites likely terminated without passing on results, exit with error
cypress           | The following test suites are missing results: cypress/e2e/XXXXXXX.cy.ts
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cypress exited with code 1

It also happened in one of my Chrome pipelines for the same test:

cypress           | $ /app/node_modules/.bin/cypress run '' --spec cypress/e2e/01_XXXXXXX/XXXXXXX.cy.ts --reporter cypress-multi-reporters --reporter-options configFile=/app/multi-reporter-config.json --browser chrome
cypress           | It looks like this is your first time using Cypress: 13.2.0
cypress           | 
cypress           | [STARTED] Task without title.
cypress           | [SUCCESS] Task without title.
cypress           | 
cypress           | Opening Cypress...
cypress           | [289:0925/040733.449656:ERROR:node_bindings.cc(300)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
cypress           | 
cypress           | DevTools listening on ws://127.0.0.1:34995/devtools/browser/031fd3de-e401-4f04-9f92-7e1f4f70baf2
cypress           | Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
cypress           | 
cypress           | tput: No value for $TERM and no -T specified
cypress           | ====================================================================================================
cypress           | 
cypress           |   (Run Starting)
cypress           | 
cypress           |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
cypress           |   │ Cypress:        13.2.0                                                                         │
cypress           |   │ Browser:        Chrome 117 (headless)                                                          │
cypress           |   │ Node Version:   v18.18.0 (/usr/local/bin/node)                                                 │
cypress           |   │ Specs:          1 found (XXXXXXX.cy.ts)                                                  │
cypress           |   │ Searched:       cypress/e2e/01_XXXXXXX/XXXXXXX.cy.ts                               │
cypress           |   │ Experiments:    experimentalMemoryManagement=true                                              │
cypress           |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
cypress           | 
cypress           | 
cypress           | ────────────────────────────────────────────────────────────────────────────────────────────────────
cypress           |                                                                                                     
cypress           |   Running:  XXXXXXX.cy.ts                                                             (1 of 1)
cypress           | Invalid time value
cypress           | RangeError: Invalid time value
cypress           |     at Date.toISOString (<anonymous>)
cypress           |     at <embedded>:3215:1041876
cypress           |     at a (<embedded>:3215:1041943)
cypress           |     at <embedded>:3215:1045471
cypress           |     at Array.forEach (<anonymous>)
cypress           |     at <embedded>:3215:1045428
cypress           |     at <embedded>:3215:1045489
cypress           |     at ChildProcess.exithandler (node:child_process:422:7)
cypress           |     at ChildProcess.emit (node:events:513:28)
cypress           |     at maybeClose (node:internal/child_process:1091:16)
cypress           |     at Socket.<anonymous> (node:internal/child_process:449:11)
cypress           |     at Socket.emit (node:events:513:28)
cypress           |     at Pipe.<anonymous> (node:net:322:12)
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cypress           | Thread 0 likely finished with failure count: 1
cypress           | ┌──────────────────────────────────────────────────┬────────┬───────┬─────────┬─────────┬─────────┐
cypress           | │ Spec                                             │ Time   │ Tests │ Passing │ Failing │ Pending │
cypress           | ├──────────────────────────────────────────────────┼────────┼───────┼─────────┼─────────┼─────────┤
cypress           | │ Results                                          │ 0s     │ 0     │ 0       │ 0       │ 0       │
cypress           | └──────────────────────────────────────────────────┴────────┴───────┴─────────┴─────────┴─────────┘
cypress           | Found test suites does not match results.
cypress           | Test suites found: 1
cypress           | Test suite results: 0
cypress           | Some test suites likely terminated without passing on results, exit with error
cypress           | The following test suites are missing results: cypress/e2e/01_XXXXXXX/XXXXXXX.cy.ts
cypress           | error Command failed with exit code 1.
cypress           | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My Dockerfile for the Cypress container is as follows:

FROM node:18

ARG CYPRESS_BROWSER
ENV CYPRESS_BROWSER=$CYPRESS_BROWSER
ARG CYPRESS_SPEC_FILES
ENV CYPRESS_SPEC_FILES=$CYPRESS_SPEC_FILES
ARG CYPRESS_PARALLEL_THREADS
ENV CYPRESS_PARALLEL_THREADS=$CYPRESS_PARALLEL_THREADS
ENV NODE_OPTIONS=--max_old_space_size=4096
ENV CI=true

WORKDIR /app

# Install Cypress dependencies
RUN apt-get update \
    && apt-get install -y \
       git libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
    && if [ "$CYPRESS_BROWSER" = "chrome" ]; then \
      apt-get update && apt-get install -y gnupg wget && \
      wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
      echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
      apt-get update && \
      apt-get install -y --no-install-recommends google-chrome-stable && \
      rm -rf /var/lib/apt/lists/*; \
    fi \
    && if [ "$CYPRESS_BROWSER" = "edge" ]; then \
      curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg && \
      install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ && \
      echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list && \
      rm microsoft.gpg && \
      apt update && apt install -y microsoft-edge-stable; \
    fi

COPY ./ ./

RUN yarn install

CMD yarn run cypress-parallel -v -s cy:run -t $CYPRESS_PARALLEL_THREADS -d "${CYPRESS_SPEC_FILES}" -a "'--browser ${CYPRESS_BROWSER}'"

The bug happens on versions 13.0.0, 13.1.0 and 13.2.0. So far it looks like it doesn't happen on 12.17.4.

EDIT: Never mind, also happens on 12.17.4.

@Romond
Copy link

Romond commented Sep 29, 2023

I also encounter this error on 12.17.4 while running Cypress under docker. But only then DEBUG=cypress:*

@MikeMcC399
Copy link
Contributor

@Romond

I also encounter this error on 12.17.4 while running Cypress under docker. But only then DEBUG=cypress:*

Which Docker image are you using and which version of Debian is it based on?

If it is not a Cypress one, can you use one of the current Cypress Docker images?

@Vitalii4as
Copy link

I have the same error on ubuntu 23.04.

And also another one

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Full log:

cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
  cypress:server:util:process_profiler ┌─────────┬───────────────────┬──────────────┬──────────────────────────────────┬────────────┬────────────────┬──────────┬──────────────┬─────────────┐
  cypress:server:util:process_profiler │ (index) │       group       │ processCount │               pids               │ cpuPercent │ meanCpuPercent │ memRssMb │ meanMemRssMb │ maxMemRssMb │
  cypress:server:util:process_profiler ├─────────┼───────────────────┼──────────────┼──────────────────────────────────┼────────────┼────────────────┼──────────┼──────────────┼─────────────┤
  cypress:server:util:process_profiler │    0    │     'plugin'      │      1       │             '266549'             │   25.18    │     17.14      │ 2219.85  │   1127.18    │   2219.85   │
  cypress:server:util:process_profiler │    1    │     'cypress'     │      1       │             '266143'             │    1.52    │      3.39      │  478.81  │    450.29    │    486.3    │
  cypress:server:util:process_profiler │    2    │ 'electron-shared' │      4       │ '266145, 266301, 266146, 266780' │    0.51    │      0.39      │  335.81  │    276.33    │   342.11    │
  cypress:server:util:process_profiler │    3    │    'Electron'     │      1       │             '267657'             │    2.67    │      1.5       │  262.97  │    233.7     │   262.97    │
  cypress:server:util:process_profiler │    4    │    'launchpad'    │      2       │         '266791, 267651'         │    0.37    │      0.22      │  247.38  │    215.18    │   247.38    │
  cypress:server:util:process_profiler │    5    │      'other'      │      2       │         '268573, 268574'         │    100     │       40       │   6.25   │     6.2      │    6.25     │
  cypress:server:util:process_profiler │    6    │      'TOTAL'      │      11      │               '-'                │   130.25   │     58.57      │ 3551.07  │   1946.92    │   3551.07   │
  cypress:server:util:process_profiler └─────────┴───────────────────┴──────────────┴──────────────────────────────────┴────────────┴────────────────┴──────────┴──────────────┴─────────────┘ +10s
  cypress-verbose:proxy:http:util:prerequests timed out unmatched pre-request: { requestId: '9E2ACC8AAEAE5F079BA3825235D1118E', method: 'GET', url: 'http://localhost:8080/__cypress/iframes//home/vitalii/apps/project/app/license/licenseStatus/components/LicenseData/LicenseData.spec.jsx', headers: { Referer: 'http://localhost:8080/__/', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.17.4 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36' }, resourceType: 'other', originalResourceType: 'Document' } +8s
  cypress-verbose:proxy:http:util:prerequests timed out unmatched pre-request: { requestId: '267657.82', method: 'GET', url: 'http://localhost:8080/__cypress/src/runtime.js', headers: { 'sec-ch-ua': '"Not;A=Brand";v="99", "Chromium";v="106"', Referer: 'http://localhost:8080/__cypress/iframes//home/vitalii/apps/project/app/license/licenseStatus/components/LicenseData/LicenseData.spec.jsx', 'sec-ch-ua-mobile': '?0', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.17.4 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36', 'sec-ch-ua-platform': '"Linux"' }, resourceType: 'script', originalResourceType: 'Script' } +0ms
  cypress-verbose:proxy:http:util:prerequests timed out unmatched pre-request: { requestId: '267657.83', method: 'GET', url: 'http://localhost:8080/__cypress/src/vendors.js', headers: { 'sec-ch-ua': '"Not;A=Brand";v="99", "Chromium";v="106"', Referer: 'http://localhost:8080/__cypress/iframes//home/vitalii/apps/project/app/license/licenseStatus/components/LicenseData/LicenseData.spec.jsx', 'sec-ch-ua-mobile': '?0', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.17.4 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36', 'sec-ch-ua-platform': '"Linux"' }, resourceType: 'script', originalResourceType: 'Script' } +0ms
  cypress-verbose:proxy:http:util:prerequests timed out unmatched pre-request: { requestId: '267657.84', method: 'GET', url: 'http://localhost:8080/__cypress/src/main.js', headers: { 'sec-ch-ua': '"Not;A=Brand";v="99", "Chromium";v="106"', Referer: 'http://localhost:8080/__cypress/iframes//home/vitalii/apps/project/app/license/licenseStatus/components/LicenseData/LicenseData.spec.jsx', 'sec-ch-ua-mobile': '?0', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.17.4 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36', 'sec-ch-ua-platform': '"Linux"' }, resourceType: 'script', originalResourceType: 'Script' } +0ms
  cypress-verbose:proxy:http:util:prerequests timed out unmatched pre-request: { requestId: '267657.85', method: 'GET', url: 'http://localhost:8080/__cypress/src/vendors.css', headers: { 'sec-ch-ua': '"Not;A=Brand";v="99", "Chromium";v="106"', Referer: 'http://localhost:8080/__cypress/iframes//home/vitalii/apps/project/app/license/licenseStatus/components/LicenseData/LicenseData.spec.jsx', 'sec-ch-ua-mobile': '?0', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/12.17.4 Chrome/106.0.5249.51 Electron/21.0.0 Safari/537.36', 'sec-ch-ua-platform': '"Linux"' }, resourceType: 'stylesheet', originalResourceType: 'Stylesheet' } +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/packages/server/lib/errors.ts" (cache | exports) -> moduleCache: 837, exportsCache: 3780, loaded: 836 +13s
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/chalk/index.js" (cache | exports) -> moduleCache: 837, exportsCache: 3780, loaded: 836 +30ms
Invalid time value
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at <embedded>:3215:958922
    at a (<embedded>:3215:958989)
    at <embedded>:3215:962517
    at Array.forEach (<anonymous>)
    at <embedded>:3215:962474
    at <embedded>:3215:962535
    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)
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/bluebird.js" (module:node | Module._load) -> moduleCache: 837, exportsCache: 3780, loaded: 836 +3ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/bluebird.js" (cache | Counted already) -> moduleCache: 837, exportsCache: 3780, loaded: 836 +1ms
  cypress-verbose:packherd:trace Module._load "os" +10s
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/getos/index.js" (cache | exports) -> moduleCache: 838, exportsCache: 3780, loaded: 837 +0ms
  cypress-verbose:packherd:trace Module._load "os" +1ms
  cypress-verbose:packherd:trace Module._load "fs" +0ms
  cypress-verbose:server:util:file get values from /home/vitalii/.config/Cypress/cy/production/cache +33s
  cypress-verbose:server:util:file attempt to get lock on /home/vitalii/.config/Cypress/cy/production/cache +0ms
  cypress-verbose:server:util:file getting lock succeeded or failed for /home/vitalii/.config/Cypress/cy/production/cache +1ms
  cypress-verbose:server:util:file read /home/vitalii/.config/Cypress/cy/production/cache +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/async/dist/async.js" (cache | definitions) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +5ms
  cypress:snapshot:error TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
  cypress:snapshot:error     at new NodeError (node:internal/errors:372:5)
  cypress:snapshot:error     at validateString (node:internal/validators:120:11)
  cypress:snapshot:error     at Object.resolve (node:path:1098:7)
  cypress:snapshot:error     at Object.resolve (evalmachine.<anonymous>:1:762464)
  cypress:snapshot:error     at resolvePathsAndParent (<embedded>:4568:1078715)
  cypress:snapshot:error     at customRequire (<embedded>:4568:1077771)
  cypress:snapshot:error     at c (<embedded>:2885:300648)
  cypress:snapshot:error     at <embedded>:2885:301438
  cypress:snapshot:error     at <embedded>:2333:117799
  cypress:snapshot:error     at A (<embedded>:2333:109759)
  cypress:snapshot:error     at <embedded>:2333:109853
  cypress:snapshot:error     at <embedded>:2333:107330
  cypress:snapshot:error     at Object.<anonymous> (<embedded>:2333:117839)
  cypress:snapshot:error     at Object.<anonymous> (<embedded>:2333:107330)
  cypress:snapshot:error     at <embedded>:2885:301372
  cypress:snapshot:error     at <embedded>:4568:18500
  cypress:snapshot:error     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) +0ms
  cypress:snapshot:error TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
  cypress:snapshot:error     at new NodeError (node:internal/errors:372:5)
  cypress:snapshot:error     at validateString (node:internal/validators:120:11)
  cypress:snapshot:error     at Object.resolve (node:path:1098:7)
  cypress:snapshot:error     at Object.resolve (evalmachine.<anonymous>:1:762464)
  cypress:snapshot:error     at resolvePathsAndParent (<embedded>:4568:1078743)
  cypress:snapshot:error     at customRequire (<embedded>:4568:1077771)
  cypress:snapshot:error     at c (<embedded>:2885:300648)
  cypress:snapshot:error     at <embedded>:2885:301438
  cypress:snapshot:error     at <embedded>:2333:117799
  cypress:snapshot:error     at A (<embedded>:2333:109759)
  cypress:snapshot:error     at <embedded>:2333:109853
  cypress:snapshot:error     at <embedded>:2333:107330
  cypress:snapshot:error     at Object.<anonymous> (<embedded>:2333:117839)
  cypress:snapshot:error     at Object.<anonymous> (<embedded>:2333:107330)
  cypress:snapshot:error     at <embedded>:2885:301372
  cypress:snapshot:error     at <embedded>:4568:18500
  cypress:snapshot:error     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) +0ms
  cypress-verbose:server:util:file read succeeded or failed for /home/vitalii/.config/Cypress/cy/production/cache +6ms
  cypress-verbose:server:util:file attempt to unlock /home/vitalii/.config/Cypress/cy/production/cache +0ms
  cypress-verbose:server:util:file unlock succeeded or failed for /home/vitalii/.config/Cypress/cy/production/cache +1ms
  cypress-verbose:packherd:trace Module._load "./routes" +8ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/packages/server/lib/cloud/routes.ts" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +5ms
  cypress-verbose:packherd:trace Resolved "./routes" via module-fullpath:node (packages/server/lib/cloud/routes.ts | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/packages/server/lib/cloud/routes.ts) +1ms
  cypress-verbose:packherd:trace Module._load "lodash" +1ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/lodash/lodash.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +2ms
  cypress-verbose:packherd:trace Resolved "lodash" via module-fullpath:node (node_modules/lodash/lodash.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/lodash/lodash.js) +1ms
  cypress-verbose:packherd:trace Module._load "@packages/network" +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/packages/network/index.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +0ms
  cypress-verbose:packherd:trace Resolved "@packages/network" via module-fullpath:node (packages/network/index.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/packages/network/index.js) +0ms
  cypress-verbose:packherd:trace Module._load "os" +0ms
  cypress-verbose:packherd:trace Module._load "debug" +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/debug/src/index.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +1ms
  cypress-verbose:packherd:trace Resolved "debug" via module-fullpath:node (node_modules/debug/src/index.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/debug/src/index.js) +1ms
  cypress:server:cloud:api request to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"RangeError","message":"Invalid time value","stack":"RangeError: Invalid time value\n    at Date.toISOString (<anonymous>)\n    at <embedded>:3215:958922\n    at a (<embedded>:3215:958989)\n    at <embedded>:3215:962517\n    at Array.forEach (<anonymous>)\n    at <embedded>:3215:962474\n    at <embedded>:3215:962535\n    at ChildProcess.exithandler (node:child_process:399:7)\n    at ChildProcess.emit (node:events:527:28)\n    at maybeClose (node:internal<stripped-path>child_process:1092:16)\n    at Socket.<anonymous> (node:internal<stripped-path>child_process:451:11)\n    at Socket.emit (node:events:527:28)\n    at Pipe.<anonymous> (node:net:709:12)"},"version":"12.17.4","osName":"linux","osVersion":"Ubuntu - ","osCpus":[{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":4100,"times":{"user":2124630,"nice":2620,"sys":928320,"idle":65369490,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":4101,"times":{"user":2125730,"nice":1190,"sys":728050,"idle":65568210,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":4072,"times":{"user":2035380,"nice":1610,"sys":688940,"idle":65684970,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":3163,"times":{"user":2028060,"nice":3320,"sys":693700,"idle":65710340,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":4100,"times":{"user":1952100,"nice":1460,"sys":609470,"idle":65868110,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":4054,"times":{"user":1936620,"nice":320,"sys":621530,"idle":65831830,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":2178,"times":{"user":2013620,"nice":1600,"sys":629740,"idle":65795840,"irq":0}},{"model":"11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz","speed":3306,"times":{"user":2048910,"nice":2520,"sys":624210,"idle":65763820,"irq":0}}],"osMemory":{"free":13368389632,"total":33315381248}},"headers":{"x-os-name":"linux","x-cypress-version":"12.17.4"}} and token: undefined +0ms
  cypress-verbose:packherd:trace Module._load "bluebird" +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/bluebird.js" (module:node | Module._load) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +1ms
  cypress-verbose:packherd:trace Resolved "bluebird" via module:node (node_modules/bluebird/js/release/bluebird.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/bluebird.js) +1ms
  cypress-verbose:packherd:trace Loaded "bluebird" via Module._load resolved as (node_modules/bluebird/js/release/bluebird.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/bluebird.js) +0ms
  cypress-verbose:packherd:trace Module._load "./lib/querystring" +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/@cypress/request/lib/querystring.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +0ms
  cypress-verbose:packherd:trace Resolved "./lib/querystring" via module-fullpath:node (node_modules/@cypress/request/lib/querystring.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/@cypress/request/lib/querystring.js) +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/uuid/dist/index.js" (cache | exports) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +1ms
  cypress-verbose:packherd:trace Module._load "./lib/helpers" +1ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/@cypress/request/lib/helpers.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +1ms
  cypress-verbose:packherd:trace Resolved "./lib/helpers" via module-fullpath:node (node_modules/@cypress/request/lib/helpers.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/@cypress/request/lib/helpers.js) +1ms
  cypress-verbose:packherd:trace Module._load "url" +0ms
  cypress-verbose:packherd:trace Module._load "stream" +1ms
  cypress-verbose:packherd:trace Module._load "safe-buffer" +0ms
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/safe-buffer/index.js" (module-fullpath:node | Module._cache) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +1ms
  cypress-verbose:packherd:trace Resolved "safe-buffer" via module-fullpath:node (node_modules/safe-buffer/index.js | /home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/safe-buffer/index.js) +0ms
  cypress-verbose:packherd:trace Module._load "http" +0ms
  cypress-verbose:packherd:trace Module._load "https" +0ms
  cypress:network:agent addRequest called { isHttps: true, href: 'https://api.cypress.io/exceptions' } +13s
  cypress:network:connect beginning getAddress { hostname: 'api.cypress.io', port: 443 } +14s
  cypress:server:browsers:electron closed event fired +38s
  cypress:server:windows error removing all extensions { err: TypeError: Object has been destroyed at Object.j (<embedded>:4489:80391) at BrowserWindow.<anonymous> (<embedded>:4489:92897)     at Object.onceWrapper (node:events:642:26)     at BrowserWindow.emit (node:events:539:35) at <embedded>:4495:18318 at tryCatcher (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at _drainQueueStep (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/async.js:147:5) at Immediate._onImmediate (/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/bluebird/js/release/async.js:17:14)     at process.processImmediate (node:internal/timers:466:21), extensions: undefined } +51s
  cypress-verbose:packherd:trace Loaded "/home/vitalii/.cache/Cypress/12.17.4/Cypress/resources/app/node_modules/chrome-remote-interface/node_modules/ws/lib/constants.js" (cache | exports) -> moduleCache: 839, exportsCache: 3781, loaded: 838 +6ms
  cypress:server:browsers browsers.kill called with no active instance +37s
  cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 45, proxyRequestsReceived: 11, immediatelyMatchedRequests: 0, unmatchedRequests: 11, unmatchedPreRequests: 34 } +0ms
  cypress:network:connect got addresses { hostname: 'api.cypress.io', port: 443, addresses: [ { address: '104.22.10.239', family: 4 }, { address: '172.67.25.250', family: 4 }, { address: '104.22.11.239', family: 4 }, { address: '2606:4700:10::6816:bef', family: 6 }, { address: '2606:4700:10::ac43:19fa', family: 6 }, { address: '2606:4700:10::6816:aef', family: 6 } ] } +11ms
  cypress:cli child event fired { event: 'exit', code: 1, signal: null } +53s

@Gamer1120
Copy link

For everyones information: what returned a stable environment for me was downgrading to Node 16 and Cypress 12.17.4.

@MikeMcC399
Copy link
Contributor

@Gamer1120

For everyones information: what returned a stable environment for me was downgrading to Node 16 and Cypress 12.17.4.

What operating system are you running under?
Debian GNU/Linux 12 (bookworm) as in the original post or something else?

@Gamer1120
Copy link

A Docker image that is based on the node:16 image.

@Vitalii4as
Copy link

I'm using node v16.20.2 and cypress 12.17.4 and still have that problem. @Gamer1120 what exact version of node fixed the issue?

@MikeMcC399
Copy link
Contributor

@Gamer1120

A Docker image that is based on the node:16 image.

Thanks for filling in that information. Node.js 16 has already passed into end-of-life so that can only be a short-term workaround.

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Oct 9, 2023

@Vitalii4as

I ran https://github.com/cypress-io/cypress-example-kitchensink on Ubuntu 23.04 with Cypress 13.2.0 and 13.3.0 under Node.js 20.8.0 and there were no errors.

It seems that the biggest challenge for this issue is to find a shareable reproducible example and then to find a bug which can be fixed.

@kakuzei
Copy link
Author

kakuzei commented Oct 9, 2023

@MikeMcC399 regarding the stack trace, is there any change I can apply to the Cypress source code to get more information when the issue occurs ? I'm able to reproduce it quite easily but using a private repository.

@MikeMcC399
Copy link
Contributor

@kakuzei

regarding the stack trace, is there any change I can apply to the Cypress source code to get more information when the issue occurs ? I'm able to reproduce it quite easily but using a private repository.

I guess we need some involvement from the Cypress engineering team to make any further progress. Perhaps @jennifer-shehane can suggest as she seems to be handling incoming issues these days.

@Vitalii4as
Copy link

@MikeMcC399 Cypress 13.3.0 works fine for me. Thank you!

@MikeMcC399
Copy link
Contributor

@kakuzei

I can run https://github.com/cypress-io/cypress-example-kitchensink successfully on Debian GNU/Linux 12 (bookworm) so it is not just a simple incompatibility. There is more to it than that, especially since you originally said it's only happening 30% of the time.

@BillyTom
Copy link

I have the same error. Sometimes Cypress crashes with:

Invalid time value
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at <embedded>:3098:919712
    at a (<embedded>:3098:919779)
    at <embedded>:3098:923307
    at Array.forEach (<anonymous>)
    at <embedded>:3098:923264
    at <embedded>:3098:923325
    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)
error Command failed with exit code 1.

Cypress 12.17.3
Node 16.20.0
Ubuntu 23.04

@Vitalii4as
Copy link

@BillyTom Try cypress 13

@BillyTom
Copy link

i upgraded to Cypress 13.3.2 about a week ago, and I did not have any problem since.

For posterity:
Cypress 13.3.2
Node 16.20.0
Ubuntu 23.04

@kakuzei
Copy link
Author

kakuzei commented Jan 5, 2024

Thank you for your help regarding this issue.
I am closing it as we are now using the latest version of Cypress on Debian 12 and it works very well.

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

6 participants