Skip to content
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

Getting a 'conflicting engine id' error in JWT module #70

Closed
xo-chris opened this issue Dec 4, 2015 · 3 comments
Closed

Getting a 'conflicting engine id' error in JWT module #70

xo-chris opened this issue Dec 4, 2015 · 3 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@xo-chris
Copy link

xo-chris commented Dec 4, 2015

Hi there

I call the 'authorize' function of the JWT module and get error Error: error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id

Full details
I am using a windows 7.1 machine but I am running this under docker, using the iron.io docker image. So in the docker BASH shell I execute command:

$ docker run --rm  -v "//$PWD":/worker -w //worker iron/node:4.1 node index.js

and receive stack trace

Error: error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
    at Error (native)
    at Sign.sign (crypto.js:279:26)
    at Object.sign (/worker/node_modules/jwa/index.js:53:47)
    at Object.jwsSign [as sign] (/worker/node_modules/jws/lib/sign-stream.js:23:
26)
    at GoogleToken._signJWT (/worker/node_modules/gtoken/lib/index.js:238:25)
    at GoogleToken._requestToken (/worker/node_modules/gtoken/lib/index.js:193:8
)
    at GoogleToken.getToken (/worker/node_modules/gtoken/lib/index.js:75:12)
    at /worker/node_modules/google-auth-library/lib/auth/jwtClient.js:137:21
    at JWT._createGToken (/worker/node_modules/google-auth-library/lib/auth/jwtC
lient.js:225:12)
    at JWT.refreshToken_ (/worker/node_modules/google-auth-library/lib/auth/jwtC
lient.js:133:15)

My code:

var jwt = require('google-auth-library/lib/auth/jwtClient');
var key = require('mykeyfile.json');
var jwtClient = new jwt(key.client_email, null, key.private_key, ['https://www.google.com/m8/feeds']); 

jwtClient.authorize(function(err, tokens) {
     if (err) {throw err;}

 console.log ("authorised :-)");
 console.log("token " + tokens.access_token);


 })

Any help much appreciated

Chris

@odino
Copy link

odino commented Feb 25, 2016

+1

@odino
Copy link

odino commented Feb 25, 2016

BTW the issue is in the container itself: gliderlabs/docker-alpine#127 just downgraded to 0.12 on alpine and works well -- they have a fix in the upstream though: http://git.alpinelinux.org/cgit/aports/commit/?id=30beca0f2f1de59e9fc8632d2807da50057217aa

@JustinBeckwith
Copy link
Contributor

The Iron docker images appear to be unmaintained:
https://hub.docker.com/r/iron/node/

I'd really suggest sticking to the official node.js docker alpine distribution:
https://hub.docker.com/_/node/

Just to make sure there were no lingering issues, I threw together a sample using our upcoming release, that runs on node.js 8.9 on alpine, using the official images:
https://github.com/JustinBeckwith/alpine-node-jwt-sample

Given the age of the issue, and the fact that I can't seem to create a meaningful repo - I am going to go ahead and close this out. If this is still an issue, and you can provide repo steps - I'd be happy to open it back up and take a look. Thanks!

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
@JustinBeckwith JustinBeckwith self-assigned this Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants