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

Package installation fails in most cases #443

Closed
2 of 5 tasks
reichhartd opened this issue Mar 14, 2022 · 5 comments
Closed
2 of 5 tasks

Package installation fails in most cases #443

reichhartd opened this issue Mar 14, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@reichhartd
Copy link

Description:

When a package has been updated, yarn install --frozen-lockfile --ignore-scripts fails in most cases.
We receive error messages according to the following pattern:

Run yarn install --frozen-lockfile --ignore-scripts
yarn install v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz: ENOENT: no such file or directory, open '/home/gharunner/.cache/yarn/v6/npm-csstype-3.0.10-integrity/node_modules/csstype/.yarn-tarball.tgz'".
info If you think this is a bug, please open a bug report with the information provided in "/home/gharunner/runner5/tokenstreet-gha-runner1-5/tokenstreet-app/tokenstreet-app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

The folders and modules vary each time.

However, the error should never occur because we have never activated caching:

env:
    NODE_VERSION: 16
...
            - uses: actions/setup-node@v3.0.0
              with:
                  node-version: ${{ env.NODE_VERSION }}

Action version:
v3.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

yarn

Repro steps:
Use this action as described above.

Expected behavior:
That this action works reliably with and without caching.

Actual behavior:
yarn install --frozen-lockfile --ignore-scripts fails in the most cases.

@reichhartd reichhartd added bug Something isn't working needs triage labels Mar 14, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @reichhartd. Thank you for your report. Could you please provide a public repository to reproduce the issue ? If it's not possible could you please provide package-lock.json ?

@marko-zivic-93
Copy link
Contributor

Hello @reichhartd
Just a friendly reminder. Could you please provide us with a repo or package-lock.json? Thank you in advance!

@reichhartd
Copy link
Author

Hi @dmitry-shibanov,
Hi @marko-zivic-93,
sorry, it was a stressful week! I will take care of it on Monday.

@reichhartd
Copy link
Author

reichhartd commented Apr 4, 2022

Good morning @dmitry-shibanov,
Good morning @marko-zivic-93,

I have created a demo repository: https://github.com/tokenstreet-tech/SetupNodeDemo

There are two open pull requests:

  1. https://github.com/tokenstreet-tech/SetupNodeDemo/pull/6
  2. https://github.com/tokenstreet-tech/SetupNodeDemo/pull/7

Both of them are failed at the beginning. I repeated number 2 until the workflow succeeded:

Run 1: https://github.com/tokenstreet-tech/SetupNodeDemo/actions/runs/2088376094
Run 2: https://github.com/tokenstreet-tech/SetupNodeDemo/actions/runs/2088411750
Run 3: https://github.com/tokenstreet-tech/SetupNodeDemo/actions/runs/2088416620

Run actions/setup-node@v3.1.0:

Run actions/setup-node@v3.1.0
  with:
    node-version: 16
    registry-url: https://registry.npmjs.org
    always-auth: false
    check-latest: false
    token: ***
  env:
    NODE_VERSION: 16
    REGISTRY_URL: https://registry.npmjs.org
    BUNDLER_VERSION: [2](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:3:2).2.20
    JAVA_DISTRIBUTION: adopt
    JAVA_VERSION: 11
Found in cache @ /home/gharunner/runner2/tokenstreet-gha-runner1-2/_tool/node/16.1[4](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:3:4).2/x[6](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:3:6)4

Run yarn install --frozen-lockfile --ignore-scripts:

Run yarn install --frozen-lockfile --ignore-scripts
  yarn install --frozen-lockfile --ignore-scripts
  shell: /bin/bash -e {0}
  env:
    NODE_VERSION: 16
    REGISTRY_URL: https://registry.npmjs.org
    BUNDLER_VERSION: [2](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:2).2.20
    JAVA_DISTRIBUTION: adopt
    JAVA_VERSION: 11
    NPM_CONFIG_USERCONFIG: /home/gharunner/runner2/tokenstreet-gha-runner1-2/_temp/.npmrc
    NODE_AUTH_TOKEN: ***
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/typescript/-/typescript-4.6.[3](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:3).tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/home/gharunner/.cache/yarn/v6/npm-typescript-[4](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:4).6.3-eefeafa6afdd31d72[5](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:5)584c[6](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:6)[7](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:7)a0eaba[8](https://github.com/tokenstreet-tech/SetupNodeDemo/runs/5812375527?check_suite_focus=true#step:4:8)0f6fc6c6c-integrity/node_modules/typescript/lib/tsc.js'"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

How I explain the error so far is that it tries to read the packages from the cache (although it is deactivated), does not find the packages and then fails.
If you then repeat the worfklows, it fetches the packages from the remote repository.

Thank you for your support!

@dmitry-shibanov
Copy link
Contributor

Hello @reichhartd. Thank you for your response. Every separate jobs run on the clean machine, that is why the cache should be empty. It looks like the issue comes from the yarn itself. There are similar issues:

For now I'm going to close the issue. If you have any concerns feel free to ping us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants