pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Pre-built binaries are broken

Open markus456 opened this issue 5 years ago • 15 comments

Edit: As of September 22nd 2021 the builds seem have started working for our builds. This seems to have been a transient issue for us but is still present for a lot of people. Currently the only workaround seems to be to manually download the packages that was found by @Reda1000.

Something seems to be wrong with the pre-built binaries. I tested this with versions 5.1.0, 5.2.1 and 5.3.2 and all seem to behave identically. This seems to affect all node versions and started somewhere between 2021, 20 Sep, 11:32AM and 2021, 21 Sep, 05:22AM.

With node10-linux:

> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v10.24.1-linux-x64          [                    ] 0%
> Error! 403: Forbidden
> Not found in remote cache:
  {"tag":"v3.2","name":"node-v10.24.1-linux-x64"}
> Building base binary from source:
  built-v10.24.1-linux-x64
> Cloning Node.js repository from GitHub...

With node14-linux:

> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v14.17.6-linux-x64          [                    ] 0%
> Error! 403: Forbidden
> Not found in remote cache:
  {"tag":"v3.2","name":"node-v14.17.6-linux-x64"}
> Building base binary from source:
  built-v14.17.6-linux-x64
> Cloning Node.js repository from GitHub...

With node16-linux:

> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v16.8.0-linux-x64           [                    ] 0%
> Error! 403: Forbidden
> Not found in remote cache:
  {"tag":"v3.2","name":"node-v16.8.0-linux-x64"}
> Building base binary from source:
  built-v16.8.0-linux-x64
> Cloning Node.js repository from GitHub...

markus456 avatar Sep 21 '21 11:09 markus456

I am facing the same issue

Abhimanyu121 avatar Sep 21 '21 11:09 Abhimanyu121

I can confirm. Same setup worked yesterday. LE (after 2 hours) : It works now

ciorceri avatar Sep 21 '21 12:09 ciorceri

Still broken here:

#12 0.914 $ pkg --targets node16-win-x64,node16-alpine-x64 server.js
#12 1.490 > [email protected]
#12 1.520 > Fetching base Node.js binaries to PKG_CACHE_PATH
#12 1.728 
#12 1.729 > Error! 403: Forbidden
#12 1.729 > Not found in remote cache:
#12 1.729   {"tag":"v3.2","name":"node-v16.8.0-win-x64"}
#12 1.729 > Building base binary from source:
#12 1.730   built-v16.8.0-win-x64
#12 1.730 > Error! Not able to build for 'win' here, only for 'alpine'
#12 1.750 error Command failed with exit code 2.
#12 1.750 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#12 ERROR: executor failed running [/bin/sh -c yarn run package]: exit code: 2

rickvanbodegraven avatar Sep 21 '21 14:09 rickvanbodegraven

I can confirm that this worked for me today and in a while when I was doing a new build then the same error.

#31 [pkg 3/5] RUN ["pkg",".", "--target", "node14-linux","--output","/pkg/app-linux" ]
#31 sha256:b41c5de69ef1f3ec2a97c1dde61230036e0c7b5d460fe2caf5dac170fb50622e
#31 0.929 > [email protected]
#31 0.954 > Fetching base Node.js binaries to PKG_CACHE_PATH
#31 1.573
#31 1.574 > Error! 403: Forbidden
#31 1.574 > Not found in remote cache:
#31 1.574   {"tag":"v3.2","name":"node-v14.17.6-linux-x64"}
#31 1.574 > Building base binary from source:
#31 1.574   built-v14.17.6-linux-x64
#31 1.590 > Cloning Node.js repository from GitHub...
#31 1.598 > Error! Error: spawnSync git ENOENT
#31 1.598     at Object.spawnSync (internal/child_process.js:1074:20)
#31 1.598     at Object.spawnSync (child_process.js:746:24)
#31 1.598     at Object.<anonymous> (/usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:148:37)
#31 1.598     at step (/usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:33:23)
#31 1.598     at Object.next (/usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:14:53)
#31 1.598     at /usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:8:71
#31 1.598     at new Promise (<anonymous>)
#31 1.598     at __awaiter (/usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:4:12)
#31 1.598     at Object.spawn (/usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/utils.js:145:12)
#31 1.598     at /usr/lib/node_modules/pkg/node_modules/pkg-fetch/lib-es5/build.js:129:50
#31 ERROR: executor failed running [pkg . --target node14-linux --output /pkg/app-linux]: exit code: 2

dark1500 avatar Sep 21 '21 14:09 dark1500

Happens for me too the last days. Worked fine previously and suddenly it always tries to compile NodeJS from source because it can't find it in the remote cache:

> [email protected] executables /home/runner/work/twitch_rlnt-bot/twitch_rlnt-bot
> pkg out/RLNTBot.js --out-path dist

> [email protected]
> Targets not specified. Assuming:
  node16-linux-x64, node16-macos-x64, node16-win-x64
> Fetching base Node.js binaries to PKG_CACHE_PATH

> Error! 403: Forbidden
> Not found in remote cache:
  {"tag":"v3.2","name":"node-v16.8.0-linux-x64"}
> Building base binary from source:
  built-v16.8.0-linux-x64
> Cloning Node.js repository from GitHub...

Previously workflows were fine (building with GitHub actions). If you want to take a look at more details, here is the repo: https://github.com/RLNT/twitch_rlnt-bot/actions

rlnt avatar Sep 21 '21 16:09 rlnt

Our latest builds seem to have started working, seems like it fixed itself.

markus456 avatar Sep 22 '21 06:09 markus456

Our latest builds seem to have started working, seems like it fixed itself.

Nope, still trying to compile from source https://github.com/RLNT/twitch_rlnt-bot/runs/3678178197

rlnt avatar Sep 22 '21 17:09 rlnt

Hmm, that's odd. Maybe it's something with GitHub itself? I think that's what pkg uses to distribute the images.

markus456 avatar Sep 23 '21 06:09 markus456

It also fails locally after I cleared my cache so it's unrelated to GitHub.

> pkg out/RLNTBot.js --out-path dist

> [email protected]
> Targets not specified. Assuming:
  node16-linux-x64, node16-macos-x64, node16-win-x64
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v16.8.0-linux-x64           [                    ] 0%
> Error! 403: Forbidden
> Not found in remote cache:
  {"tag":"v3.2","name":"node-v16.8.0-linux-x64"}
> Building base binary from source:
  built-v16.8.0-linux-x64
> Cloning Node.js repository from GitHub...

rlnt avatar Sep 23 '21 17:09 rlnt

also here cannot compile node:

ps/x509.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/app_rand.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/apps.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/bf_prefix.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/opt.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_cb.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/openssl-cli/deps/openssl/openssl/apps/s_socket.o /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/obj.target/deps/openssl/libopenssl.a -ldl -pthread -Wl,--end-group /usr/bin/ld: interner Fehler ../../ld/ldlang.c 6644 collect2: error: ld returned 1 exit status make[1]: *** [deps/openssl/openssl-cli.target.mk:230: /tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/openssl-cli] Fehler 1 make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet.... rm 487ccad8604f2d3d26e1952856717d4579ac318b.intermediate make: *** [Makefile:104: node] Fehler 2 strip: '/tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/node': No such file

Error! Error: ENOENT: no such file or directory, open '/tmp/pkg.35cecce451d4016702c9ab6f/node/out/Release/node'

alst-ovh avatar Sep 27 '21 07:09 alst-ovh

it's bad, wasting lots of time to build the unknown binaries... help!!

xkn1ght avatar Sep 28 '21 12:09 xkn1ght

I also had an 403 Forbidden

I am now downloading the prebuilt parts from here - scroll down a bit directly into cache-folder of PKG ~/.pkg-cache as a workaround in the meantime - maybe some quota etc. is reached every now and then.

image

Reda1000 avatar Sep 30 '21 00:09 Reda1000

That's unfortunate for something like GitHub actions though.

@markus456 Sorry to mention you but vercel really has a lot of projects and it seems like this is getting overlooked. It didn't fix itself for a lot of people. Can someone please take a look at this issue? pkg really has no usage otherwise.

rlnt avatar Sep 30 '21 01:09 rlnt

@DAmNRelentless sure, I'll update the description to mention that it's still broken for a lot of people.

markus456 avatar Sep 30 '21 02:09 markus456

We use GitHub Releases to distribute binaries.

Ask GitHub or your network administrator (if your company has some sorts of on-path proxy) if you got 403 Forbidden.

We can do nothing about it.

jesec avatar Nov 10 '21 10:11 jesec