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

config file crashed in docker cypress/factory #28603

Closed
maximegheraille opened this issue Dec 28, 2023 · 6 comments
Closed

config file crashed in docker cypress/factory #28603

maximegheraille opened this issue Dec 28, 2023 · 6 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period type: unexpected behavior User expected result, but got another

Comments

@maximegheraille
Copy link

maximegheraille commented Dec 28, 2023

Current behavior

Hi,

I keep getting this error while running my custom pnpm command to run cypres tests.

Your configFile threw an error from: base.config.ts
We stopped running your tests because your config file crashed.

Initially it was a JavaScript heap out of memory issue until a added ENV NODE_OPTIONS="--max_old_space_size=8192" to my docker file, since then it crashes on the config file.

some weird things I noticed while trying to debug the issue:
If you use WORKDIR /opt/app and COPY. /opt/app it does not crash, it only crashes with COPY . .
It does not seem to be the config file itself as it works in most cases unless I have the provided docker config.

I tried with a simple Node image for instead of the cypress/factory but the issue remains the same.

my whole docker file

ARG CHROME_VERSION='120.0.6099.109-1'
ARG NODE_VERSION='20.10.0'

FROM cypress/factory:latest

WORKDIR /

RUN npm install -g pnpm

COPY package.json pnpm-lock.yaml ./

RUN pnpm install --frozen-lockfile

RUN pnpm exec playwright install --with-deps webkit

COPY . .

Desired behavior

The tests should run without crashing with COPY . .

Test code to reproduce

run cypress via my docker config and try to run tests.

Cypress Version

13.6.2

Node version

20.10.0

Operating System

github

Debug Logs

can't really add those as it contains sensitive work information

Other

No response

@maximegheraille
Copy link
Author

I did initially create this issue on the cypress-docker-image repo but as it does not seem to be related to the docker image itself, it is a Cypress issue.

@jennifer-shehane
Copy link
Member

Yah, I've seen this error in situations where it's not really a configFile issue. It's a bit of a catch all sometimes. This one is weird. I'm not sure what's happening just looking at it.

@jennifer-shehane jennifer-shehane added type: unexpected behavior User expected result, but got another stage: needs investigating Someone from Cypress needs to look at this labels Dec 28, 2023
@maximegheraille
Copy link
Author

here are some interesting things I saw in the logs (if it can help)

cypress:launcher:browsers chrome stderr: [662:681:1229/083719.271425:ERROR:cert_verify_proc_builtin.cc(705)] 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 +4s
  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    │     'cypress'     │      1       │                      '366'                      │    331     │     46.87      │  324.52  │    399.37    │   459.91    │
  cypress:server:util:process_profiler │    1    │     'Chrome'      │      9       │ '663, 667, 668, 677, 698, 678 ... 3 more items' │   57.07    │     33.24      │  319.88  │    657.12    │   773.59    │
  cypress:server:util:process_profiler │    2    │ 'electron-shared' │      4       │              '378, 539, 379, 549'               │     0      │       0        │  133.01  │    173.98    │   205.63    │
  cypress:server:util:process_profiler │    3    │      'other'      │      2       │                  '1136, 1137'                   │     0      │       0        │   4.25   │     4.25     │    4.38     │
  cypress:server:util:process_profiler │    4    │      'TOTAL'      │      16      │                       '-'                       │   388.07   │     110.5      │  781.65  │   2973.12    │   5517.25   │
  cypress:server:util:process_profiler └─────────┴───────────────────┴──────────────┴─────────────────────────────────────────────────┴────────────┴────────────────┴──────────┴──────────────┴─────────────┘ +10s
cypress:server:profilecleaner found 0 root level profile matches: [] +0ms
  cypress:server:profilecleaner found 0 profile folders: [] +0ms
  cypress:server:profilecleaner found 0 profile folders: [] +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:399:5)
  cypress:snapshot:error     at validateString (node:internal/validators:163:11)
  cypress:snapshot:error     at Object.resolve (node:path:1098:7)
  cypress:snapshot:error     at Object.resolve (evalmachine.<anonymous>:1:765419)
  cypress:snapshot:error     at resolvePathsAndParent (<embedded>:4533:1077349)
  cypress:snapshot:error     at customRequire (<embedded>:4533:1076405)
  cypress:snapshot:error     at c (<embedded>:2849:214454)
  cypress:snapshot:error     at <embedded>:2849:2[1498](https://github.com/ddd/repo/actions/runs/45646/job/12456#step:5:1499)9
  cypress:snapshot:error     at <embedded>:4533: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:399:5)
  cypress:snapshot:error     at validateString (node:internal/validators:163:11)
  cypress:snapshot:error     at Object.resolve (node:path:1098:7)
  cypress:snapshot:error     at Object.resolve (evalmachine.<anonymous>:1:765419)
  cypress:snapshot:error     at resolvePathsAndParent (<embedded>:4533:1077377)
  cypress:snapshot:error     at customRequire (<embedded>:4533:1076405)
  cypress:snapshot:error     at c (<embedded>:2849:214454)
  cypress:snapshot:error     at <embedded>:2849:214989
  cypress:snapshot:error     at <embedded>:4533:18500
  cypress:snapshot:error     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) +1ms
cypress:server:reporter trying to load reporter: cypress-multi-reporters +0ms
  cypress:server:reporter trying to require local reporter with path: /cypress-multi-reporters +0ms
  cypress:server:reporter trying to require local reporter with path: /node_modules/cypress-multi-reporters +1ms
  cypress:server:saved_state noop saved state +1s
023-12-29T08:42:51.3578283Z 2023-12-29T08:42:51.354Z cypress:cli parsed cli options { browser: 'chrome', configFile: 'cypress-base.config.ts' }
2023-12-29T08:42:51.3579735Z 2023-12-29T08:42:51.354Z cypress:cli verifying Cypress app
2023-12-29T08:42:51.3580935Z 2023-12-29T08:42:51.355Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2023-12-29T08:42:51.3582449Z 2023-12-29T08:42:51.355Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2023-12-29T08:42:51.3583938Z 2023-12-29T08:42:51.355Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER /root/.cache/Cypress
2023-12-29T08:42:51.3585225Z 2023-12-29T08:42:51.355Z cypress:cli checking environment variables
2023-12-29T08:42:51.3741106Z 2023-12-29T08:42:51.373Z cypress:cli checking if executable exists /root/.cache/Cypress/13.6.2/Cypress/Cypress
2023-12-29T08:42:51.3767191Z 2023-12-29T08:42:51.375Z cypress:cli Binary is executable? : true
2023-12-29T08:42:51.3768671Z 2023-12-29T08:42:51.375Z cypress:cli binaryDir is  /root/.cache/Cypress/13.6.2/Cypress
2023-12-29T08:42:51.3770536Z 2023-12-29T08:42:51.376Z cypress:cli Reading binary package.json from: /root/.cache/Cypress/13.6.2/Cypress/resources/app/package.json
2023-12-29T08:42:51.3797190Z 2023-12-29T08:42:51.379Z cypress:cli Found binary version 13.6.2 installed in: /root/.cache/Cypress/13.6.2/Cypress
2023-12-29T08:42:51.3816090Z 2023-12-29T08:42:51.381Z cypress:cli could not read binary_state.json file at "/root/.cache/Cypress/13.6.2/binary_state.json"
2023-12-29T08:42:51.3824663Z 2023-12-29T08:42:51.382Z cypress:cli {}
2023-12-29T08:42:51.3832281Z 2023-12-29T08:42:51.382Z cypress:cli is Verified ? undefined
2023-12-29T08:42:51.3841111Z 2023-12-29T08:42:51.383Z cypress:cli running binary verification check 13.6.2
2023-12-29T08:42:51.3883153Z [STARTED] Task without title.
2023-12-29T08:42:51.3892821Z 2023-12-29T08:42:51.388Z cypress:cli clearing out the verified version
2023-12-29T08:42:51.3913738Z 2023-12-29T08:42:51.390Z cypress:cli undefined DISPLAY environment variable
2023-12-29T08:42:51.3920100Z 2023-12-29T08:42:51.391Z cypress:cli Cypress will spawn its own Xvfb
2023-12-29T08:42:51.3926039Z 2023-12-29T08:42:51.392Z cypress:cli needs Xvfb? true
2023-12-29T08:42:51.3932837Z 2023-12-29T08:42:51.392Z cypress:cli Starting Xvfb
2023-12-29T08:42:51.4106656Z 2023-12-29T08:42:51.410Z cypress:cli disabling Electron sandbox
2023-12-29T08:42:51.4112891Z 2023-12-29T08:42:51.410Z cypress:cli running smoke test
2023-12-29T08:42:51.4119280Z 2023-12-29T08:42:51.411Z cypress:cli using Cypress executable /root/.cache/Cypress/13.6.2/Cypress/Cypress
2023-12-29T08:42:51.4125986Z 2023-12-29T08:42:51.412Z cypress:cli smoke test command: /root/.cache/Cypress/13.6.2/Cypress/Cypress --no-sandbox --smoke-test --ping=577
2023-12-29T08:42:51.4133439Z 2023-12-29T08:42:51.412Z cypress:cli smoke test timeout 30000 ms
2023-12-29T08:42:52.6083773Z 2023-12-29T08:42:52.607Z cypress:cli smoke test stdout "It looks like you are running the Cypress binary directly.
2023-12-29T08:42:52.6085029Z 
2023-12-29T08:42:52.6085518Z This is not the recommended approach, and Cypress may not work correctly.
2023-12-29T08:42:52.6086235Z 
2023-12-29T08:42:52.6086685Z Please install the cypress NPM package and follow the instructions here:
2023-12-29T08:42:52.6087372Z 
2023-12-29T08:42:52.6087689Z https://on.cypress.io/installing-cypress
2023-12-29T08:42:52.6088436Z 577"
2023-12-29T08:42:52.6097242Z 2023-12-29T08:42:52.609Z cypress:cli Stopping Xvfb
2023-12-29T08:42:52.8956525Z 2023-12-29T08:42:52.894Z cypress:cli write verified: true
2023-12-29T08:42:52.8966503Z 2023-12-29T08:42:52.896Z cypress:cli could not read binary_state.json file at "/root/.cache/Cypress/13.6.2/binary_state.json"
2023-12-29T08:42:52.8993089Z [SUCCESS] Task without title.
2023-12-29T08:42:52.9008765Z 2023-12-29T08:42:52.900Z cypress:cli:run processing run options { browser: 'chrome', configFile: 'cypress-base.config.ts', key: null, spec: null, reporter: null, reporterOptions: null, project: '/' }

@maximegheraille
Copy link
Author

Hi, I was able to reproduce the issue in a new repo with a minimal setup, this is the Github actions with the cypress debug logs , hope it helps

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jun 27, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

3 participants