-
Notifications
You must be signed in to change notification settings - Fork 386
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
JavaScript heap out of memory #1006
Comments
Are you still suffering with this error when you use the current latest |
Hi @MikeMcC399 I just tried with the latest |
Thank you for providing an example repo https://github.com/maximegheraille/cypress-crash ! This does not look like it is a Cypress Docker image issue.
Run with Docker (your logs)The logs show "RangeError" / "Maximum call stack size exceeded". This normally indicates an error in the test. There are many reports of this in the issue list on https://github.com/cypress-io/cypress/issues. https://github.com/maximegheraille/cypress-crash/actions/runs/9427747238/job/25972247930#step:4:1602 shows:
Run without DockerThe test spec e2e/cypress/integration/sf/components/tests.ts results in a failure "An uncaught error was detected outside of a test" when run outside of Docker. Attempting to run the test on Ubuntu npm install pnpm@latest -g
git clone https://github.com/maximegheraille/cypress-crash
cd cypress-crash/e2e
pnpm install --frozen-lockfile
pnpm exec playwright install --with-deps webkit
pnpm cypress run --config-file custom.config.ts -b chrome
|
Hi @MikeMcC399 I verified the test itself, it seems there was an error which I fixed and simplified the setup a bit. |
Please try copying your app to ARG CHROME_VERSION='120.0.6099.109-1'
ARG NODE_VERSION='20.10.0'
FROM cypress/factory:latest
WORKDIR /opt/app
# Set NODE_OPTIONS environment variable
ENV NODE_OPTIONS="--max_old_space_size=8192"
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml /opt/app
RUN pnpm install --frozen-lockfile
RUN pnpm exec playwright install --with-deps webkit
COPY . /opt/app |
I also ran your app successfully using a standard Cypress Docker image in a GitHub Actions workflow. You can see the workflow in the fork. This doesn't use |
for now I do copy everything to |
I did not investigate further but I suspect that if the app is in the root directory, then Cypress may get overloaded searching for the Cypress spec(s) to run, since it has to search through all the files in the operating system.
|
I'm going to close this issue now. According to the conventions described in the Filesystem Hierarchy Standard it should not be expected for an application to be placed directly in the The problem is resolved by following the documentation |
Hi,
I have a very strange behavior with the cypress/factory:latest image (cypress 13.6.0)
I keep getting this error when it run the first test.
It works fine when using WORKDIR /opt/app and COPY . /opt/app,
I am not sure if I am doing something wrong or if this is a real issue.
The text was updated successfully, but these errors were encountered: