grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

Prebuilt binaries for v1.7.0 have incorrect permissions

Open rmg opened this issue 9 years ago • 14 comments

The permissions for the prebuilt linux binaries for v1.7.0 use 0750 instead of 0755 and seem to be preserving some random-ish looking uid/gid instead of using the uid/gid of the installing process.

The following were run inside a docker container (docker run --rm -it node:8.6.0 bash):

v1.7.0:

root@73ae751b8855:~# npm install [email protected]
root@73ae751b8855:~# ls -l node_modules/grpc/src/node/extension_binary/node-v57-linux-x64/
total 6468
-rwxr-x--- 1 255363 5000 6621262 Nov  1 20:12 grpc_node.node

v1.6.6:

root@73ae751b8855:~# npm install [email protected]
root@73ae751b8855:~# ls -l node_modules/grpc/src/node/extension_binary/node-v57-linux-x64/
-rwxr-xr-x 1 root root 6184072 Oct  5 19:31 grpc_node.node

rmg avatar Nov 02 '17 04:11 rmg

Would this be what is causing Error: Cannot find module '/app/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64/grpc_node.node' ?

glesage avatar Nov 02 '17 05:11 glesage

It could definitely manifest as that, yes.

node may not be able to read the file which could bubble up as not loading and thus not finding.

rmg avatar Nov 02 '17 05:11 rmg

The easy workaround for this is to add --build-from-source=grpc to your npm install.

rmg avatar Nov 02 '17 14:11 rmg

Thank you for reporting this. It looks like this was caused by changing the machine we built those files on. We should have a fix for this out today.

murgatroid99 avatar Nov 02 '17 17:11 murgatroid99

I spent several hours debugging a number of docker images that started having errors with rebuilding. Until PR #77 is published, I put a dependency in my package.json file with "grpc": "1.6.6",

6utt3rfly avatar Nov 02 '17 18:11 6utt3rfly

We have published [email protected], which should fix this problem.

murgatroid99 avatar Nov 02 '17 21:11 murgatroid99

if 1.7.1 resolved this, @rmg lets close this issue?

badoet avatar Nov 07 '17 04:11 badoet

[email protected] didn't solve the problem for me, I had to go for 1.6.6 which worked as expected.

sa-adebayo avatar Nov 07 '17 09:11 sa-adebayo

I haven't investigated this in depth but the 1.7.1 version did not solve the problem for me either.

GregorySmith92 avatar Nov 07 '17 09:11 GregorySmith92

@GregorySmith92 have you tried [email protected]?

sa-adebayo avatar Nov 07 '17 09:11 sa-adebayo

@sa-adebayo Yeah I also used an older version to get around this problem

GregorySmith92 avatar Nov 07 '17 10:11 GregorySmith92

I am having trouble reproducing this issue with 1.7.1. If you are experiencing this problem, please specify which binary exactly is getting downloaded. The name of the directory that directly contains the binary is what I need (for example, node-v57-linux-x64 in the original question)

In addition, can you please try completely removing and re-installing the package, to ensure that the new binary is actually getting downloaded?

murgatroid99 avatar Nov 07 '17 16:11 murgatroid99

don't know if this is related but I'm having the same issues with windows (see #99) and this was working just fine just a few days ago and no longer is the case, which has made us stopped our CI as it broke our staging environment.

samiq avatar Nov 20 '17 05:11 samiq

This is most definitely very outdated and irrelevant now.

nicolasnoble avatar Apr 11 '18 00:04 nicolasnoble