You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module worked on my system before. Going to tweak version and see where the problems comes from.
/app/node_modules/gcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:83
throw e
^
Error: /app/node_modules/gcloud/node_modules/sse4_crc32/build/Release/sse4_crc32.node: invalid ELF header
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/app/node_modules/gcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/app/node_modules/gcloud/node_modules/sse4_crc32/sse4_crc32.js:8:36)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
I am using gcloud preview app run app.yaml to test locally. So npm rebuild won't answer any questions since the docker container pulls the node modules each time its run.
@abelino I had released v3.3.0 a couple of days ago and had upgraded to NAN v2, which as it turns out has issues on certain versions of node. I then released v3.4.0 which reverts the changes back to NAN v1.7.0. Please try again with version v3.4.0.
Also please try running make clean && make && npm run-script debug and paste the output here, if there is an issue.
$ make clean
./node_modules/.bin/node-gyp clean
make: ./node_modules/.bin/node-gyp: No such file or directory
make: [clean] Error 1 (ignored)
$ make
./node_modules/.bin/node-gyp clean
make: ./node_modules/.bin/node-gyp: No such file or directory
make: [clean] Error 1 (ignored)
npm install .
npm WARN prefer global node-gyp@2.0.2 should be installed with -g
> sse4_crc32@4.0.0 install /node_modules/sse4_crc32
> node-gyp rebuild
CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
SOLINK_MODULE(target) Release/sse4_crc32.node
crc32@0.2.2 node_modules/crc32
chai@2.3.0 node_modules/chai
├── assertion-error@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)
mocha@2.2.5 node_modules/mocha
├── escape-string-regexp@1.0.2
├── supports-color@1.2.1
├── growl@1.8.1
├── commander@2.3.0
├── diff@1.4.0
├── mkdirp@0.5.0 (minimist@0.0.8)
├── debug@2.0.0 (ms@0.6.2)
├── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
└── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
node-gyp@2.0.2 node_modules/node-gyp
├── graceful-fs@3.0.8
├── semver@4.3.6
├── osenv@0.1.3 (os-homedir@1.0.1, os-tmpdir@1.0.1)
├── fstream@1.0.7 (inherits@2.0.1)
├── nopt@3.0.3 (abbrev@1.0.7)
├── minimatch@1.0.0 (sigmund@1.0.1, lru-cache@2.6.5)
├── tar@1.0.3 (inherits@2.0.1, block-stream@0.0.8)
├── which@1.1.1 (is-absolute@0.1.7)
├── path-array@1.0.0 (array-index@0.1.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.10)
├── rimraf@2.4.2 (glob@5.0.14)
├── npmlog@1.2.1 (ansi@0.3.0, are-we-there-yet@1.0.4, gauge@1.2.2)
└── request@2.60.0 (aws-sign2@0.5.0, forever-agent@0.6.1, stringstream@0.0.4, caseless@0.11.0, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, qs@4.0.0, combined-stream@1.0.5, mime-types@2.1.4, tough-cookie@2.0.0, http-signature@0.11.0, bl@1.0.0, hawk@3.1.0, form-data@1.0.0-rc3, har-validator@1.8.0)
./node_modules/.bin/node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@2.0.2
gyp info using node@0.12.4 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/node_modules/sse4_crc32/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/node_modules/sse4_crc32/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/node_modules/sse4_crc32/common.gypi',
gyp info spawn args '-I',
gyp info spawn args '/node_modules/sse4_crc32/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/.node-gyp/0.12.4/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/.node-gyp/0.12.4',
gyp info spawn args '-Dnode_gyp_dir=/node_modules/sse4_crc32/node_modules/node-gyp',
gyp info spawn args '-Dmodule_root_dir=/node_modules/sse4_crc32',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
./node_modules/.bin/node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@2.0.2
gyp info using node@0.12.4 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Nothing to be donefor`all'.gyp info ok ./node_modules/.bin/mocha test/*.test.js Sse4Crc32 .calculate ✓ should handle input of type string ✓ should handle input of type buffer CRC32 ✓ should be callable ✓ should not throw an error upon instantiation ✓ should default the initial CRC to 0 ✓ should accept an initial CRC value ✓ should immediately calculate the value of the passed input ✓ should progressively calculate CRC for additional input 8 passing (14ms)$ npm run-script debug> sse4_crc32@4.0.0 debug /node_modules/sse4_crc32> echo "platform: $(uname -a)"; echo "node.js: $(node -v)"; echo "npm: $(npm -v)"; echo "node-gyp: $(./node_modules/.bin/node-gyp -v)"; node -e "console.log('H/w CRC Support: ' + require('./sse4_crc32').isHardwareCrcSupported());"; node -pe "require('./sse4_crc32');"platform: Darwin user.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64node.js: v0.12.4npm: 2.13.2node-gyp: v2.0.2H/w CRC Support: true{ isHardwareCrcSupported: [Function: isHardwareCrcSupported], calculateInSoftware: [Function: swCrc32c], calculateOnHardware: [Function: hwCrc32c], CRC32: [Function: Crc32C], calculate: [Function: hwCrc32c] }
So locally everything works. I was having the issue when running the under the docker container FROM google/nodejs-runtime I'm going to assume the node version in that docker container is not compatible. I'm going to retest soon, and see if the docker container has been updated.
ok so locally with node v0.12.4... sse4_crc32 does not throw an exception. However, the google docker container uses node-v0.10.40-linux-x64. So tomorrow, when I get a chance I am going to create my own docker formula and see what is going on. I'll have more info tomorrow. Thanks guys.
ok so I came to a starbucks because my data service was extremely slow and couldn't get past a docker udp timeout issue. I made a custom Dockerfile just to debug this further. I updated node to v0.12.7 and left npm alone. Same issue:
> nocaptcha@0.0.1 prestart /app
> npm install
> nocaptcha@0.0.1 start /app
> node app.js
debug:is dev yes
/app/node_modules/gcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:83
throw e
^
Error: /app/node_modules/gcloud/node_modules/sse4_crc32/build/Release/sse4_crc32.node: invalid ELF header
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at bindings (/app/node_modules/gcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/app/node_modules/gcloud/node_modules/sse4_crc32/sse4_crc32.js:8:36)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
npm ERR! Linux 4.0.5-boot2docker
npm ERR! argv "/nodejs/bin/node""/nodejs/bin/npm""start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! nocaptcha@0.0.1 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nocaptcha@0.0.1 start script 'node app.js'.
npm ERR! This is most likely a problem with the nocaptcha package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls nocaptcha
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
The Docckerfile contents:
FROM google/debian:wheezy
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates
RUN mkdir /nodejs && curl https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1
ENV PATH $PATH:/nodejs/bin
WORKDIR /app
ADD . /app
RUN npm install
EXPOSE 8080
CMD []
ENTRYPOINT ["/nodejs/bin/npm", "start"]
RUN cd node_modules/gcloud/node_modules/sse4_crc32/ && make clean && make && npm run-script debug
before the ENTRYPOINT then the module runs properly when required in my app.js or wherever it is I am require-ing it. But if I comment that line out in the Dockerfile then the exception as mention in 781#issuecomment-130781411
working Dockerfile:
FROM google/debian:wheezy
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates
RUN mkdir /nodejs && curl https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1
ENV PATH $PATH:/nodejs/bin
WORKDIR /app
ADD . /app
RUN npm install
RUN cd node_modules/gcloud/node_modules/sse4_crc32/ && make clean && make && npm run-script debug
EXPOSE 8080
CMD []
ENTRYPOINT ["/nodejs/bin/npm", "start"]
@anandsuresh wooops I forgot to check the current version of gcloud I was using. At the time of opening this issue the problem existed but as you said you later published 3.4.0, which fixes the prob. Since this isn't an issue with the latest version of gcloud@0.18.0 I am going to close this issue. THANKS for the help everyone, its been interesting.
Activity
stephenplusplus commentedon Aug 3, 2015
What version of Node are you running? Have you changed recently? Try doing an 'npm rebuild'.
abelino commentedon Aug 3, 2015
I am using
gcloud preview app run app.yamlto test locally. So npm rebuild won't answer any questions since the docker container pulls the node modules each time its run.stephenplusplus commentedon Aug 5, 2015
@anandsuresh sorry to bug you again :) Any thoughts on what may have gone wrong here?
anandsuresh commentedon Aug 6, 2015
@stephenplusplus No worries. ;)
@abelino I had released v3.3.0 a couple of days ago and had upgraded to NAN v2, which as it turns out has issues on certain versions of node. I then released v3.4.0 which reverts the changes back to NAN v1.7.0. Please try again with version v3.4.0.
Also please try running
make clean && make && npm run-script debugand paste the output here, if there is an issue.abelino commentedon Aug 13, 2015
@anandsuresh sorry for barely looking at this. Let me test and will let you know.
abelino commentedon Aug 13, 2015
abelino commentedon Aug 13, 2015
So locally everything works. I was having the issue when running the under the docker container
FROM google/nodejs-runtimeI'm going to assume the node version in that docker container is not compatible. I'm going to retest soon, and see if the docker container has been updated.abelino commentedon Aug 13, 2015
ok so locally with
node v0.12.4...sse4_crc32does not throw an exception. However, the google docker container usesnode-v0.10.40-linux-x64. So tomorrow, when I get a chance I am going to create my own docker formula and see what is going on. I'll have more info tomorrow. Thanks guys.jgeewax commentedon Aug 13, 2015
jgeewax commentedon Aug 13, 2015
Also /cc @JustinBeckwith
abelino commentedon Aug 13, 2015
ok so I came to a starbucks because my data service was extremely slow and couldn't get past a docker udp timeout issue. I made a custom Dockerfile just to debug this further. I updated
nodetov0.12.7and leftnpmalone. Same issue:The Docckerfile contents:
abelino commentedon Aug 13, 2015
Here is an interesting log directly from the docker container
abelino commentedon Aug 13, 2015
For the above dockerfile I modified it to run the test instead of running the server
abelino commentedon Aug 13, 2015
ok so I managed to get the server running.
if I run in the dockerfile
RUN cd node_modules/gcloud/node_modules/sse4_crc32/ && make clean && make && npm run-script debugbefore the
ENTRYPOINTthen the module runs properly when required in myapp.jsor wherever it is I am require-ing it. But if I comment that line out in the Dockerfile then the exception as mention in 781#issuecomment-130781411working Dockerfile:
abelino commentedon Aug 13, 2015
@anandsuresh wooops I forgot to check the current version of gcloud I was using. At the time of opening this issue the problem existed but as you said you later published 3.4.0, which fixes the prob. Since this isn't an issue with the latest version of gcloud@0.18.0 I am going to close this issue. THANKS for the help everyone, its been interesting.
14 remaining items
chore: release 4.1.7 (#786)
fix: remove certification expiration workaround (#781)
chore: release 4.1.7 (#786)
fix: remove certification expiration workaround (#781)
chore: release 4.1.7 (#786)
fix: remove certification expiration workaround (#781)
chore: release 4.1.7 (#786)
fix(deps): update dependency @google-cloud/paginator to v2 (#781)
feat!: add typings for top level object (#781)
fix: explicit export of protobuf.roots (#781)
fix(deps): update dependency @google-cloud/paginator to v2 (googleapi…
feat: respect pageSize and pageToken from gaxOptions (#781)
feat: respect pageSize and pageToken from gaxOptions (#781)
feat: respect pageSize and pageToken from gaxOptions (#781)
feat: respect pageSize and pageToken from gaxOptions (googleapis#781)