npm publish error: _npmUser.name must === user.name #4405

Closed
tmcw opened this Issue Jan 2, 2014 · 18 comments

Comments

Projects
None yet
8 participants

tmcw commented Jan 2, 2014

This is as myself, logged in as tmcw, and I have access to (created) the package.

npm http PUT https://registry.npmjs.org/mapbox.js
npm http 409 https://registry.npmjs.org/mapbox.js
npm http GET https://registry.npmjs.org/mapbox.js
npm http 200 https://registry.npmjs.org/mapbox.js
npm http PUT https://registry.npmjs.org/mapbox.js
npm http 403 https://registry.npmjs.org/mapbox.js
npm http PUT https://registry.npmjs.org/mapbox.js
npm http 403 https://registry.npmjs.org/mapbox.js
npm ERR! Error: forbidden _npmUser.name must === user.name: mapbox.js
npm ERR!     at RegClient.<anonymous> (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR!     at Request.self.callback (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "publish"
npm ERR! cwd /Users/tmcw/src/mapbox.js
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/tmcw/src/mapbox.js/npm-debug.log
npm ERR! not ok code 0

Note: updating npm to 1.3.22 provides same error.

tmcw referenced this issue in mapbox/mapbox.js Jan 2, 2014

Closed

Publish 1.6.0 #611

Member

timoxley commented Jan 9, 2014

@tmcw weird, can you double check npm whoami?

Member

timoxley commented Jan 9, 2014

@tmcw npm's server had a few issues surrounding publishing recently… though I haven't seen any issue that looks like this, but perhaps try again?

I just hit this @timoxley. Anything I should try to workaround?

What I see is:

$ npm whoami
springmeyer
$ npm owner ls
npm http GET https://registry.npmjs.org/bones
npm http 304 https://registry.npmjs.org/bones
kkaefer <kkaefer@gmail.com>
yhahn <young@developmentseed.org>
tmcw <macwright@gmail.com>
willwhite <will@developmentseed.org>
springmeyer <dane@dbsgeo.com>
lxbarth <alex@developmentseed.org>
adrianrossouw <adrian@developmentseed.org>
dmitrig01 <dmitrig01@gmail.com>
$  npm publish
npm http PUT https://registry.npmjs.org/bones
npm http 409 https://registry.npmjs.org/bones
npm http GET https://registry.npmjs.org/bones
npm http 200 https://registry.npmjs.org/bones
npm http PUT https://registry.npmjs.org/bones
npm http 403 https://registry.npmjs.org/bones
npm http PUT https://registry.npmjs.org/bones
npm http 403 https://registry.npmjs.org/bones
npm ERR! Error: forbidden _npmUser.name must === user.name: bones
npm ERR!     at RegClient.<anonymous> (/Users/dane/.nvm/v0.10.24/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR!     at Request.self.callback (/Users/dane/.nvm/v0.10.24/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/Users/dane/.nvm/v0.10.24/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/Users/dane/.nvm/v0.10.24/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Darwin 12.5.0
npm ERR! command "/Users/dane/.nvm/v0.10.24/bin/node" "/Users/dane/.nvm/v0.10.24/bin/npm" "publish"
npm ERR! cwd /Users/dane/projects/tagging/bones
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/dane/projects/tagging/bones/npm-debug.log
npm ERR! not ok code 0

more findings:

  • the original reporter @tmcw is still seeing this, but a colleague was able to publish the module.
  • I tried removing my ~.npmrc and recreating with npm adduser springmeyer but this did not help
  • I tried upgrading to npm@1.3.23 but this also did not help.
  • I see https://twitter.com/npmjs/status/421414191379922944, but it seems like this is not the same problem.
  • I booted an ubuntu machine with node v0.10.24 and npm 1.3.23 and hit the same problem.

Still blocked by this, keen to here if any npm folks have ideas for workarounds or other things to test.

found a workaround: I had been using npm 1.3.23 and node v0.10.24. Downgrading to node v0.10.22 (and therefore npm 1.3.14) allowed be to publish without a problem. I also tried node v0.10.23 / npm 1.3.17 and that did not work. So perhaps something regressed between npm 1.3.14 and 1.3.17?

Member

timoxley commented Jan 10, 2014

@springmeyer not sure, but did you know you can install npm versions independent of the node version? just npm install -g npm@1.3.14 on your node@0.10.24.

@timoxley - yes I do, just being lazy using nvm :) So, now I see I can replicate a similar error with unpublishing Error: forbidden _npmUser.name must === user.name: bones/-rev/123-0989720f0ed3d4c79b8db7eb201731eb. Stepping down in npm versions this error still occurs with npm v1.3.16 but goes away with v1.3.15.

One caveat: After unpublishing without errors with npm v1.3.15

$ npm unpublish bones@1.3.29
npm http GET https://registry.npmjs.org/bones
- bones@1.3.29
npm http 200 https://registry.npmjs.org/bones

I try npm publish again and hit Cannot publish over existing version, so not positive the unpublish worked.

Member

timoxley commented Jan 10, 2014

npm-registry-client is the likely culprit, apparently this is all that changed between those versions, and I have no idea what that means or if this is even relevant, haha sorry, I can't help with this one.

Owner

isaacs commented Jan 10, 2014

Pushed a more noisy error message to the server.

What's happening is that something changed in a version, so it thinks you're publishing that one, but it's got a different _npmUser because someone else originally published it.

Please try again, and share the extremely noisy error message.

Thank you for the details.

Here is the verbose output from a publish failure just now with npm 1.3.23: https://gist.github.com/springmeyer/3f96fce9af7b0db15fed.

Note: I am publishing a bones package in the v1.3.x series. For this module we've been maintaining separate branches for a while and it appears some previous tag from a different series is involved: https://github.com/developmentseed/bones/releases/tag/v2.1.0alpha0. I just tried unpublishing this v2.1.0alpha0 but that does not seem to help.

Owner

isaacs commented Jan 11, 2014

Fwiw, the branches in github have no effect whatsoever.

When you do npm publish it creates a _npmUser field with the username and email of the person doing the publish. That MUST match the username of the currently logged in user, and that's the check that's failing for some weird reason that I can't seem to figure out.

What version were you trying to publish when you hit that error?

I just pushed another update to the error that it logs. Can you try running this?

npm whoami
node -p 'require("./package.json").version'
npm publish

I'm also seeing this with npm@1.3.24 trying to publish 1.0.1 of the first-mate module.

npm publish

npm http 403 https://registry.npmjs.org/first-mate
npm ERR! Error: forbidden version=0.12.0
npm ERR! user.name=kevinsawicki
npm ERR! _npmUser.name=zcbenz
npm ERR! _npmUser.name must === user.name: first-mate
npm ERR!     at RegClient.<anonymous> (/Users/kevin/github/first-mate/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)

npm whoami

kevinsawicki

npm owner ls

kevinsawicki <kevinsawicki@gmail.com>
zcbenz <zcbenz@gmail.com>
Contributor

francoisfrisch commented Jan 21, 2014

I'm also getting this error

npm --version
    1.3.11
npm whoami
    montage-bot
npm publish
    npm http PUT https://registry.npmjs.org/montage
    npm http 409 https://registry.npmjs.org/montage
    npm http GET https://registry.npmjs.org/montage
    npm http 200 https://registry.npmjs.org/montage
    npm http PUT https://registry.npmjs.org/montage/-/montage-0.13.12.tgz/-rev/936-20b03f4f0d7a7cca27da6db287019356
    npm http 201 https://registry.npmjs.org/montage/-/montage-0.13.12.tgz/-rev/936-20b03f4f0d7a7cca27da6db287019356
    npm http PUT https://registry.npmjs.org/montage/0.13.12/-tag/latest
    npm http 403 https://registry.npmjs.org/montage/0.13.12/-tag/latest
    npm http PUT https://registry.npmjs.org/montage/0.13.12/-tag/latest
    npm http 403 https://registry.npmjs.org/montage/0.13.12/-tag/latest
    npm ERR! publish Error uploading package
    npm ERR! Error: forbidden version=0.12.0
    npm ERR! user.name=montage-bot
    npm ERR! _npmUser.name=francoisfrisch
    npm ERR! _npmUser.name must === user.name: montage/0.13.12/-tag/latest
Contributor

kriskowal commented Jan 21, 2014

I was the first publisher of montage, which @francoisfrisch just mentioned. Fails for me as well. Not sure what forbidden version=0.12.0 could mean since there is nothing of that version involved.

❯❯ npm --version
1.3.11
❯❯ npm whoami
kriskowal
❯❯ npm owner ls montage
npm http GET https://registry.npmjs.org/montage
npm http 200 https://registry.npmjs.org/montage
kriskowal <kris.kowal@cixar.com>
francoisfrisch <francoisfrisch@mac.com>
montage-bot <francoisfrisch@gmail.com>
❯❯ npm publish
npm http PUT https://registry.npmjs.org/montage
npm http 409 https://registry.npmjs.org/montage
npm http GET https://registry.npmjs.org/montage
npm http 200 https://registry.npmjs.org/montage
npm http PUT https://registry.npmjs.org/montage/-/montage-0.13.12.tgz/-rev/938-0539080855cb375730598756bfefb50d
npm http 201 https://registry.npmjs.org/montage/-/montage-0.13.12.tgz/-rev/938-0539080855cb375730598756bfefb50d
npm http PUT https://registry.npmjs.org/montage/0.13.12/-tag/latest
npm http 403 https://registry.npmjs.org/montage/0.13.12/-tag/latest
npm http PUT https://registry.npmjs.org/montage/0.13.12/-tag/latest
npm http 403 https://registry.npmjs.org/montage/0.13.12/-tag/latest
npm ERR! publish Error uploading package
npm ERR! Error: forbidden version=0.12.0
npm ERR! user.name=kriskowal
npm ERR! _npmUser.name=francoisfrisch
npm ERR! _npmUser.name must === user.name: montage/0.13.12/-tag/latest
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:129:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:873:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:824:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
Contributor

kriskowal commented Jan 21, 2014

I removed the other owners, francoisfrisch and montage-bot and was able to publish solo.

tmcw closed this May 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment