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/included images "text file busy" with node 20 #27707

Open
esetnik opened this issue Aug 30, 2023 · 7 comments
Open

cypress/included images "text file busy" with node 20 #27707

esetnik opened this issue Aug 30, 2023 · 7 comments

Comments

@esetnik
Copy link
Contributor

esetnik commented Aug 30, 2023

Current behavior

Cypress crashes with Command failed with exit code 126 "Text file busy" error

Desired behavior

Same behavior as v12.17.3. The tests run correctly when using the cypress/included image.

Test code to reproduce

Unable to provide at this time

Cypress Version

v12.17.4

Node version

v20.5.0

Operating System

docker

Debug Logs

cypress-1     | /usr/bin/env: 'node': Text file busy
cypress-1     | error Command failed with exit code 126.
cypress-1     | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Other

Seems to be related to

nodejs/docker-node#1912 (comment)

@AtofStryker
Copy link
Contributor

Hi @esetnik . Thank you for opening an issue. How are you invoking the docker image? Would you be able to provide a small reproduction for us to reproduce the issue on our end? I ran some of the included images this morning and they worked OK so I am wondering if it is something specific to your project.

@esetnik
Copy link
Contributor Author

esetnik commented Aug 30, 2023

I am using the following custom image based on cypress/included:

FROM cypress/included:12.17.4@sha256:102b34b9e4cb9895c44a74293c6931e7282535775045dd8b1c7608667a34c4b6

# renovate: datasource=repology depName=aur/msodbcsql versioning=loose
ARG MSODBCSQL_VERSION="18.1.2.1-1"

# renovate: datasource=repology depName=aur/mssql-tools versioning=loose
ARG MSSQL_TOOLS_VERSION="18.0.1.1-1"

ENV CI=1

RUN apt-get update && \
  apt-get install -y \
  git \
  gnupg \
  lsb-release && \
  wget -O - https://packages.microsoft.com/keys/microsoft.asc | apt-key add -  && \
  wget -O /etc/apt/sources.list.d/mssql-release.list https://packages.microsoft.com/config/debian/$(lsb_release -rs)/prod.list  && \
  apt-get update && \
  ACCEPT_EULA=Y apt-get install -y --no-install-recommends \
  msodbcsql18=${MSODBCSQL_VERSION} \
  mssql-tools18=${MSSQL_TOOLS_VERSION} \
  locales && \
  echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
  locale-gen && \
  rm -r /var/lib/apt/lists/* && \
  ln -s /opt/mssql-tools18/bin/sqlcmd /usr/bin/sqlcmd


RUN mkdir -p /e2e
RUN git config --global --add safe.directory /e2e

WORKDIR /e2e

COPY package.json yarn.lock .npmrc ./
COPY patches ./patches

RUN yarn install --frozen-lockfile --unsafe-perm=true --allow-root

RUN npx cypress verify

COPY . .

Then in my docker compose:

  cypress:
    # image: (the image built in previous step)
    environment:
      PERCY_TOKEN: ${PERCY_TOKEN}
      PERCY_BRANCH: ${PERCY_BRANCH}
      PERCY_PULL_REQUEST: ${PERCY_PULL_REQUEST}
      PERCY_PARALLEL_TOTAL: ${CIRCLE_NODE_TOTAL}
      PERCY_PARALLEL_NONCE: ${CIRCLE_BUILD_NUM}
      NO_COLOR: 1
    command: >
      npx percy exec --verbose --parallel -- cypress run
        --record
        --key redacted
        --ci-build-id ${CIRCLE_BUILD_NUM}
        --parallel
        --group circleci-chrome
        --browser chrome

The above works on v12.17.3 and below but stops working on v12.17.4 and v13.0.0

@AtofStryker
Copy link
Contributor

@esetnik sorry for the delay. I threw together a quick Dockerfile in this reproduction repo and that seems to work. Are you able to try it with a simple docker compose and see if the issue is still there? I wonder if this is an issue with Percy and Cypress integration, which might be version specific to Percy but not sure. We do run Percy internally in our CI pipeline and that is up and running

@esetnik
Copy link
Contributor Author

esetnik commented Sep 6, 2023

@AtofStryker there's something really odd going on. I upgrade my image to cypress/included:13.0.0@sha256:04b3c8bc0d861436b55bb52fdf57587b43c376f362c012b676b6669ef9bf1750 and the issue went away. However, it reappeared again in cypress/included:13.1.0@sha256:4d03b19cdb75e26a5ee55eb01f3a07da38ba7423353fa9c711a692ea8402e8b3. I have no idea what could be going on but it seems related to this issue nodejs/docker-node#1912

@esetnik
Copy link
Contributor Author

esetnik commented Sep 13, 2023

Still an issue in cypress/included:13.2.0@sha256:114e0663dc9bc58032716010463b64e408b73dae46490eeeb20ad4bedea2ea54

@esetnik
Copy link
Contributor Author

esetnik commented Oct 10, 2023

@AtofStryker are you able to publish cypress/included:13.3.0 images with node 18? We have a major issue in libuv which is being reverted in node v18.18.1 nodejs/node#50036 and will not be fixed in node 20 for some time. Because cypress/included images are no longer built with node 18 variants we can not upgrade past v13.0.0

@esetnik esetnik changed the title Cypress v12.17.4+ cypress/included images do not work cypress/included images "text file busy" with node 20 Oct 10, 2023
@jennifer-shehane
Copy link
Member

@esetnik Open an issue in the docker-images repo for this.

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

3 participants