Skip to content

Download grpc-node got 403 #141

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

Closed
tdungnguyen opened this issue Jan 5, 2018 · 13 comments
Closed

Download grpc-node got 403 #141

tdungnguyen opened this issue Jan 5, 2018 · 13 comments

Comments

@tdungnguyen
Copy link

Short description:
npm info lifecycle [email protected]~install: [email protected]

[email protected] install /usr/src/app/node_modules/google-gax/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp info check checked for "/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl/grpc_node.node" (not found)
node-pre-gyp http GET https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v48-linux-x64-musl.tar.gz
node-pre-gyp http 403 https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v48-linux-x64-musl.tar.gz
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v48-linux-x64-musl.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI, musl) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v48-linux-x64-musl.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:449:14)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:353:11
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 3.13.0-37-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl"
gyp ERR! cwd /usr/src/app/node_modules/google-gax/node_modules/grpc
gyp ERR! node -v v6.12.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/src/app/node_modules/google-gax/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:920:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
node-pre-gyp ERR! System Linux 3.13.0-37-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/src/app/node_modules/google-gax/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/src/app/node_modules/google-gax/node_modules/grpc
node-pre-gyp ERR! node -v v6.12.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/usr/src/app/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-musl' (1)
npm info lifecycle [email protected]~install: Failed to exec install script

@murgatroid99
Copy link
Member

The problem here is that that specific version differentiates between binaries for glibc vs musl libc (Alpine), but we did not actually publish binaries for Alpine. It's a bit hard to see in that error log, but it actually tried to fall back to building the library from source, but it failed because python was not available. If you want to try to build from source, you will need to install the python and build-base Alpine packages.

@murgatroid99
Copy link
Member

I would like to note that for 1.8.x, we do distribute precompiled binaries for Alpine, so if you use that version you will not encounter this problem.

@witbybit
Copy link

witbybit commented Feb 22, 2018

I am facing the same issue with setting up electron 2.0 with create-react-app. How do I get the build-base package? I already have Python setup on my machine. I am also getting the following error:-

TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/libgrpc.a] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

@henrik242
Copy link

I did an apt-get install build-essential to get rid of the download problem.

@witbybit
Copy link

witbybit commented Mar 18, 2018

@henrik242 Any idea what the corresponding fix will be for mac? I am repeatedly seeing the following error:-

Error: /usr/local/bin/node exited with code 1
Error output:
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.1/electron-v1.8-darwin-x64-unknown.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (electron-v1.8 ABI, unknown) (falling back to source compile with node-gyp) 
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 28, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 43, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 246, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/libgrpc.a] Error 1
gyp ERR! build error 

@witbybit
Copy link

@murgatroid99 What is build-base Alpine package and how do I install it on mac?

@nicolasnoble
Copy link
Member

The original issue which was about Alpine Linux specifically has been long fixed. Any and all other issues in this thread aren't related to it.

@nikhilag: Alpine Linux is, well, a Linux distribution. Has nothing to do with MacOS.

If you are still experiencing unrelated issues with your Mac, please open a separate issue.

@mureithimaina
Copy link

i have the save the same problem.
npm install -g [email protected]

[email protected] install /usr/lib/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)

@nicolasnoble
Copy link
Member

@razorMureithi this is working as intended. You are trying to install an obsolete version of gRPC for a version of nodejs that didn't exist at the time of publication. You can 1) upgrade to the latest version of gRPC or 2) downgrade to nodejs 8 or 9 that were then supported by grpc 1.10 or 3) have a compiler on your system to properly fallback on compiling from sources.

@patrice4github
Copy link

#3 Didn't work for me.
#1 I did a brew install grpc hoping to get the latest version, which I did. But still have the same error. If I have the grpc_node_plugin locally, shouldn't my npm install try to use that instead of downloading an old version?

@nicolasnoble
Copy link
Member

Please open a new issue following our template, filing all required fields, so we can help you.

@Coehill
Copy link

Coehill commented Sep 11, 2018

Getting the same issue on Manjaro Linux, any fixes for this?

@grpc grpc locked as resolved and limited conversation to collaborators Sep 12, 2018
@nicolasnoble
Copy link
Member

Please open new issues following our template instead of updating old resolved bugs with "me too".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants