Build And Publish To Oxygen Fails In Github Actions

Build And Publish To Oxygen Fails In Github Actions

BugMaker-Huang
Tourist
4 0 3

My github actions was broken from yesterday(2023/11/07) while package.json and workflows file has no change.

 

Confusingly, I have several hydrogen shops built by same repository, so they do have same package.json, same workflow file(except for token), and same lock-file. But except for one of the shops, all of them failed to deploy. I don't know why that shop could deploy and the others failed.

 

 

Run shopify/oxygenctl-action@v4
Run TOKEN="***"
Multi deployment
Fetching configuration for shop 55309074466
Run # We need to run multiple processes at once and are going to handle
Deploying to Oxygen...
Deploying to Oxygen...
npm WARN exec The following package was not found and will be installed: @shopify/oxygen-cli@2.5.0
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm WARN tarball tarball data for @shopify/oxygen-cli@https://packages.aliyun.com/6160015009edb81ca824f556/npm/npm-registry/@shopify/oxygen-cli/-/oxygen-cli-2.5.0.tgz (sha512-OXJT0qzTggMqpTBlZ5JliCUP6ePRpRQlDATgRo2k3x2NDcrUOevZZZXYqpI5TnmhbrJz6lLuUB/x8Dgt6c8dIw==) seems to be corrupted. Trying again.
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm WARN tarball tarball data for @shopify/cli-kit@https://packages.aliyun.com/6160015009edb81ca824f556/npm/npm-registry/@shopify/cli-kit/-/cli-kit-3.50.2.tgz (sha512-EqScyHo9EudDz6nGpvwBbkjUmDx5g8Uhy0Ls05ZTWBqGMP9tm9RdLqRYjyq6q6iEjrBMgois4Bw9De6Zcf9JOw==) seems to be corrupted. Trying again.
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm WARN tarball tarball data for @shopify/oxygen-cli@https://packages.aliyun.com/6160015009edb81ca824f556/npm/npm-registry/@shopify/oxygen-cli/-/oxygen-cli-2.5.0.tgz (sha512-OXJT0qzTggMqpTBlZ5JliCUP6ePRpRQlDATgRo2k3x2NDcrUOevZZZXYqpI5TnmhbrJz6lLuUB/x8Dgt6c8dIw==) seems to be corrupted. Trying again.
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm WARN tarball tarball data for @shopify/cli-kit@https://packages.aliyun.com/6160015009edb81ca824f556/npm/npm-registry/@shopify/cli-kit/-/cli-kit-3.50.2.tgz (sha512-EqScyHo9EudDz6nGpvwBbkjUmDx5g8Uhy0Ls05ZTWBqGMP9tm9RdLqRYjyq6q6iEjrBMgois4Bw9De6Zcf9JOw==) seems to be corrupted. Trying again.
npm ERR! code EINTEGRITY
npm ERR! sha512-EqScyHo9EudDz6nGpvwBbkjUmDx5g8Uhy0Ls05ZTWBqGMP9tm9RdLqRYjyq6q6iEjrBMgois4Bw9De6Zcf9JOw== integrity checksum failed when using sha512: wanted sha512-EqScyHo9EudDz6nGpvwBbkjUmDx5g8Uhy0Ls05ZTWBqGMP9tm9RdLqRYjyq6q6iEjrBMgois4Bw9De6Zcf9JOw== but got sha512-AIVpJLP+xmPYT6VrDxiCN3rXD08ByINHLtSJr5xKMbaBpia3MBQNO8T5+6XRni7636T43E22n6EbqJ+Vr/P4DA==. (2953 bytes)

npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-11-08T01_15_50_340Z-debug-0.log
Error: Process completed with exit code 1.

 

 

Summary:

  1. All the workflows of these shops were working well, until yesterday(2023/11/07).
  2. I didn't change package.json, workflow file and lock-file before it failed.
  3. I have re-run the workflows several times but still not working.
  4. One of my shops can still build and publish to oxygen now, but it is using the same code as my other shops(workflow file, package.json .etc).
  5. This issue looks similar to https://community.shopify.com/c/hydrogen-headless-and-storefront/build-and-publish-to-oxygen-fails-i....
  6. I really need help!
Replies 2 (2)

Liam
Community Manager
3108 340 873

Hi BugMaker-Huang,

 

You could try clearing the npm cache with the command npm cache clean --force and then try the installation again. As a workaround, you could also try to directly install these packages from their GitHub repositories:

npm install git+https://github.com/Shopify/oxygen-cli.git
npm install git+https://github.com/Shopify/cli-kit.git

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

BugMaker-Huang
Tourist
4 0 3

After many useless tries, I rebuilt the lock-file and finally it works, but I don't know why I have to do this...
Anyway, my github action is working well, for now.