Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New package publish failed with messages like an install of plugin that doesn't exist #4278

Closed
lazd opened this Issue · 21 comments

15 participants

Larry Davis Benjamin Lupton Dominic Tarr Jason Smith Thorsten Lorenz Feross Aboukhadijeh Julian Gruber Max Ogden Nuno Job Joey Baker paolo fragomeni Andrey Pissantchev Sam Mikes Forrest L Norvell Rebecca Turner
Larry Davis

I tried to publish a shiny new package and things went arwy.

What I typed at the command line

$ npm publish
npm http PUT https://registry.npmjs.org/gulp-handlebars
npm http 201 https://registry.npmjs.org/gulp-handlebars
npm http GET https://registry.npmjs.org/gulp-handlebars
npm http 404 https://registry.npmjs.org/gulp-handlebars
npm ERR! 404 'gulp-handlebars' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "publish"
npm ERR! cwd /Users/lazd/repos/gulp-handlebars
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.8
npm ERR! code E404
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/lazd/repos/gulp-handlebars/npm-debug.log
npm ERR! not ok code 0

What? That's confusing, I should get that error when I try to install a package that doesn't exist...

I tried again

Because the best kind of troubleshooting is hitting it with a stick until something changes:

$ npm publish
npm http PUT https://registry.npmjs.org/gulp-handlebars
npm http 409 https://registry.npmjs.org/gulp-handlebars
npm http GET https://registry.npmjs.org/gulp-handlebars
npm http 200 https://registry.npmjs.org/gulp-handlebars
npm http PUT https://registry.npmjs.org/gulp-handlebars/-/gulp-handlebars-0.1.0.tgz/-rev/1-92521f86600eacc10b8e4331fb7bd35c
npm http 201 https://registry.npmjs.org/gulp-handlebars/-/gulp-handlebars-0.1.0.tgz/-rev/1-92521f86600eacc10b8e4331fb7bd35c
npm http PUT https://registry.npmjs.org/gulp-handlebars/0.1.0/-tag/latest
npm http 201 https://registry.npmjs.org/gulp-handlebars/0.1.0/-tag/latest

Success (or so it seems)...

However, I visited the page for the package and got an error:
https://npmjs.org/package/gulp-handlebars

Stack:

Error: invalid package: gulp-handlebars
    at ServerResponse.error (/home/node/npm-www/node_modules/error-page/error-page.js:108:20)
    at MC.ondone (/home/node/npm-www/routes/package-page.js:26:24)
    at MC.next (/home/node/npm-www/node_modules/emcee/emcee.js:45:12)
    at /home/node/npm-www/models/package.js:60:16
    at RegClient.get_ (/home/node/npm-www/node_modules/npm-registry-client/lib/get.js:101:14)
    at RegClient.<anonymous> (/home/node/npm-www/node_modules/npm-registry-client/lib/get.js:37:12)
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

Headers:

{
  "host": "npmjs.org",
  "connection": "keep-alive",
  "cache-control": "max-age=0",
  "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36",
  "referer": "https://npmjs.org/~",
  "accept-encoding": "gzip,deflate,sdch",
  "accept-language": "en-US,en;q=0.8"
}

Error:

{}

Message:

invalid package: gulp-handlebars

User: lazd
Stamp: pid=33116 worker=4 6d7550eac58486fd0fb1ef75860a357230285f44 https://npmjs.org:10004

And the 500 fixes itself

12 minutes later, the 500 error is gone. However, I'm still wondering about the odd response to the initial npm publish attempt.

Additional details

Here's my package.json:

{
  "name": "gulp-handlebars",
  "version": "0.1.0",
  "description": "Handlebars plugin for Gulp",
  "main": "index.js",
  "dependencies": {
    "gulp-util": "~1.2.0",
    "event-stream": "~3.0.18",
    "handlebars": "~1.1.2"
  },
  "devDependencies": {
    "should": "~2.1.1",
    "mocha": "~1.15.1"
  },
  "scripts": {
    "test": "./node_modules/.bin/mocha"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/lazd/gulp-handlebars.git"
  },
  "keywords": [
    "gulpplugin",
    "gulp",
    "handlebars"
  ],
  "author": "Larry Davis <lazdnet@gmail.com>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/lazd/gulp-handlebars/issues"
  }
}

This was formerly npm/npm-www#491, but as the initial error was very odd, I'm filing it here.

Benjamin Lupton

Been experiencing this all day today.

Dominic Tarr

I'm getting this too, I tried unpublishing, and then republishing, but I got this:

[dominic@COMPUTER ansi-recover]$ npm unpublish ansi-recover --force
npm WARN using --force I sure hope you know what you are doing.
npm http GET https://registry.npmjs.org/ansi-recover
npm http 200 https://registry.npmjs.org/ansi-recover
npm http DELETE https://registry.npmjs.org/ansi-recover/-rev/1-6d4e83dabd9752eb4110a6dd728dcfc9
npm http 409 https://registry.npmjs.org/ansi-recover/-rev/1-6d4e83dabd9752eb4110a6dd728dcfc9
npm ERR! Error: conflict Document update conflict.: ansi-recover/-rev/1-6d4e83dabd9752eb4110a6dd728dcfc9
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/usr/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/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/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>
npm ERR! System Linux 3.11.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "unpublish" "ansi-recover" "--force"
npm ERR! cwd /home/dominic/c/ansi-recover
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/dominic/c/ansi-recover/npm-debug.l

my hunch is that this is related to the master-master replication setup.

Jason Smith

This has been fixed for a while for all packages reported in this ticket. But I apologize for not updating this ticket until now.

@lazd gulp-handlebars looks good. Can you confirm?

@balupton Can you confirm that your publishes work? If not, can you give me an example of a failing package for you?

@dominictarr To quote a brilliant British thespian from--let's be honest--an awful Yankee flick: your insight serves you well. We have covered most cases, multi-master is great (watch this space, but I digress) but we are still hitting an occasional bug allowing a document conflict to persist, which harms npm. Anyway I have confirmed that ansi-recover looks good. Any others?

When I get confirmation from everybody I will ask that this ticket be closed. Thanks all for your patience!

Larry Davis

@jhs, all is well over at gulp-handlebars. Thanks!

Dominic Tarr

I also tried to publish quickansi and modem-stream

Dominic Tarr

I'm still getting the same errors on ansi-recover

Dominic Tarr

I made one successful publish of hipster, and then I got the same problem again...

Thorsten Lorenz

Referencing very similar issue here: #4273 in case more info is useful.

In my case repeatedly npm pub -f until it went through worked.

Feross Aboukhadijeh

@substack and i were having trouble getting typedarray and native-buffer-browserify to publish earlier, too.

for example, right now npmjs.org shows 0.0.2: https://npmjs.org/package/typedarray but 0.0.4 is supposed to be published.

so this looks like it's still not fixed.

Julian Gruber

Trying to install https://npmjs.org/package/hipster:

npm http GET https://registry.npmjs.org/hipster
npm http 200 https://registry.npmjs.org/hipster
npm http GET https://registry.npmjs.org/hipster/-/hipster-0.15.6.tgz
npm http 404 https://registry.npmjs.org/hipster/-/hipster-0.15.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/hipster/-/hipster-0.15.6.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at WriteStream.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/fetch.js:57:12)
npm ERR!     at WriteStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at fs.js:1596:14
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR!     at Object.oncomplete (fs.js:107:15)
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>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "i" "-g" "hipster"
npm ERR! cwd /Users/julian/pro/quickansi
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/julian/pro/quickansi/npm-debug.log
npm ERR! not ok code 0
Dominic Tarr

@juliangruber that is probably from a publish that half succeeded (see below)

@jhs so here is a my guess at what is happening, tell me if I'm off.
now there is master-master replication, behind the erlang proxy,
(as described)
publish isn't atomic, it involves several posts.

The first post succeeds, but it only writes the metadata,
Then the attachment has to be uploaded. Now, with couchdb,
each update has to have the revision of the current document.

My guess, is that the proxy is round-robining to the registry databases,
but there hasn't been enough time inbetween the first post,
and the attachment for it to be replicated to the other machine.
The first GET is okay, because it's been a long time since the last publish.

So, If I am right, one solution would be to proxy based on the hash of the
requests IP address, so that requests from the same session are sent to the same
couch instance (when they renue their ip lease they may get a different ip address so that is fine)

So, that is one idea.

Another idea, is that it's not actually necessary to post in one go,
couchdb can also do a post with an attachment in a single request,
using inline attachments http://wiki.apache.org/couchdb/HTTP_Document_API#Inline_Attachments
This would also have the not insignificant benefit of adding being faster (less round trips)
and being more reliable on poor connections. I've been thinking about implementing this,
so if it will help fix this, I could bump it to the top of my list!

Max Ogden

just ran into this with multibuffer, this url should exist but 404s for me https://registry.npmjs.org/multibuffer/-/multibuffer-2.1.0.tgz with

{
error: "not_found",
reason: "Document is missing attachment"
}
Max Ogden

just hit it again, this time with the new version of clarinet that @dscape just published: https://npmjs.org/package/clarinet

this 404s for me: https://registry.npmjs.org/clarinet/-/clarinet-0.7.3.tgz

Nuno Job

Seemed like it worked from here:

$ npm publish
npm http PUT https://registry.npmjs.org/clarinet
npm http 409 https://registry.npmjs.org/clarinet
npm http GET https://registry.npmjs.org/clarinet
npm http 200 https://registry.npmjs.org/clarinet
npm http PUT https://registry.npmjs.org/clarinet/-/clarinet-0.7.3.tgz/-rev/39-10157ef41e36dbdcc58336d5fa2cbd81
npm http 201 https://registry.npmjs.org/clarinet/-/clarinet-0.7.3.tgz/-rev/39-10157ef41e36dbdcc58336d5fa2cbd81
npm http PUT https://registry.npmjs.org/clarinet/0.7.3/-tag/latest
npm http 201 https://registry.npmjs.org/clarinet/0.7.3/-tag/latest
+ clarinet@0.7.3
Max Ogden

another report here: dscape/clarinet#17, is this being worked on?

Joey Baker

Ran into this several times, here's what I just got when trying to unpublish:

$ npm unpublish --force
npm WARN using --force I sure hope you know what you are doing.
npm http GET https://registry.npmjs.org/wheelhouse-router
npm http PUT https://registry.npmjs.org/wheelhouse-router/-rev/99-ce326dfc20b9164df9c2f2cde1a502fe
npm http 409 https://registry.npmjs.org/wheelhouse-router/-rev/99-ce326dfc20b9164df9c2f2cde1a502fe
npm ERR! unpublish Failed to update data
npm ERR! Error: conflict Document update conflict.: wheelhouse-router/-rev/99-ce326dfc20b9164df9c2f2cde1a502fe
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:123: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:877: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:828: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/bin/node" "/usr/local/bin/npm" "unpublish" "--force"
npm ERR! cwd /Users/joeybaker/server/wheelhouse-router
npm ERR! node -v v0.10.23
npm ERR! npm -v 1.3.17
npm http 200 https://registry.npmjs.org/wheelhouse-router
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/joeybaker/server/wheelhouse-router/npm-debug.log
npm ERR! not ok code 0
paolo fragomeni

I've been seeing this all week. Here's what i've seen...

New versions get published. At some point, some people stop seeing newest versions... Geography did not seem to be a factor. However, I sat next to three different developers who were all seeing different results (at the same time, in Florence, Italy) then I logged into my VM which is located in the U.S. and I could see all of the latest versions :8ball:

Andrey Pissantchev

I was getting the same error as lazd yesterday when I published arg-err for the first time.

Now, trying to republish and getting the following:

$ npm publish
npm ERR! publish Failed PUT response undefined
npm ERR! Error: login error
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:82:22)
npm ERR!     at CouchLogin.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:191:14)
npm ERR!     at CouchLogin.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:173:46)
npm ERR!     at Request.self.callback (/usr/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/lib/node_modules/npm/node_modules/request/request.js:877:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:828:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
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 Linux 3.11.0-14-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "publish"
npm ERR! cwd /home/andrey/Projects/js/arg-err
npm ERR! node -v v0.10.23
npm ERR! npm -v 1.3.17

The npm package page for arg-err is also generating a 500 error, here's the error it currently gives:

Error: invalid package: arg-err
    at ServerResponse.error (/home/node/npm-www/node_modules/error-page/error-page.js:108:20)
    at MC.ondone (/home/node/npm-www/routes/package-page.js:26:24)
    at MC.next (/home/node/npm-www/node_modules/emcee/emcee.js:45:12)
    at /home/node/npm-www/models/package.js:60:16
    at RegClient.get_ (/home/node/npm-www/node_modules/npm-registry-client/lib/get.js:101:14)
    at RegClient.<anonymous> (/home/node/npm-www/node_modules/npm-registry-client/lib/get.js:37:12)
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

headers = {
  "host": "npmjs.org",
  "connection": "keep-alive",
  "cache-control": "max-age=0",
  "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36",
  "referer": "https://npmjs.org/search?q=arg-err",
  "accept-encoding": "gzip,deflate,sdch",
  "accept-language": "en-GB,en-US;q=0.8,en;q=0.6,bg;q=0.4"
}

error = {}

statusCode = 500

stamp = pid=19378 worker=178 6d7550eac58486fd0fb1ef75860a357230285f44 https://npmjs.org:10078
Sam Mikes

Can this issue now be closed?

The registry backend and replication setup have been changed since December 2013. Has anyone been seeing these issues recently?

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and open a new issue!)

Thanks!

Andrey Pissantchev

Everything's been fine with publishing modules as far as I'm concerned.

Forrest L Norvell
Owner

Closing as resolved.

Forrest L Norvell othiym23 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.