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

500 error on adduser #121

Closed
kurtharriger opened this issue Sep 17, 2014 · 3 comments
Closed

500 error on adduser #121

kurtharriger opened this issue Sep 17, 2014 · 3 comments

Comments

@kurtharriger
Copy link

I'm running sinopia 11.1 in docker (https://github.com/RallySoftware/docker-sinopia)
Then when I do npm adduser --registry http://sinopiahost:4873/
...
It hangs and the following error is emitted on the docker host:

http  <-- 500, user: undefined, req: 'PUT /-/user/org.couchdb.user:kharriger', error: internal server error
 error --- unexpected error: Not a string or buffer
TypeError: Not a string or buffer
    at Hash.update (crypto.js:209:17)
    at Object.add_user_to_htpasswd (/node_modules/sinopia/node_modules/sinopia-htpasswd/utils.js:96:50)
    at /node_modules/sinopia/node_modules/sinopia-htpasswd/index.js:89:20
    at /node_modules/sinopia/node_modules/sinopia-htpasswd/utils.js:52:21
    at /node_modules/sinopia/node_modules/sinopia-htpasswd/utils.js:26:19
    at Object.oncomplete (fs.js:107:15)
 http  <-- 500, user: undefined, req: 'PUT /-/user/org.couchdb.user:kharriger', error: internal server error

I'm using node 0.10.31.
Add user did work on sinopia 0.9 providing that you were using latest node version, but seems to have broken in 11.1

@rlidwka
Copy link
Owner

rlidwka commented Sep 17, 2014

It happens because of two things:

  1. crypt3 extension isn't compiled for some reason. If you want, you can debug it with npm install crypt3. It's nice to have, but it's optional.
  2. I made a really silly error in fallback which I'm going to fix in a moment.

rlidwka added a commit to rlidwka/sinopia-htpasswd that referenced this issue Sep 17, 2014
@rlidwka
Copy link
Owner

rlidwka commented Sep 17, 2014

fixed & published as 0.11.2, please check

@kurtharriger
Copy link
Author

Yes, this did resolve the issue.
Thanks!

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

No branches or pull requests

2 participants