Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

unpublish intermittently fails due to "Document update conflict." #4759

Closed
fresheneesz opened this Issue · 12 comments

7 participants

@fresheneesz

When trying to unpublish one of my packages, npm 1.3.24 gave me this:

npm ERR! unpublish Failed to update data
npm ERR! Error: conflict Document update conflict.

I subsequently retried the exact same unpublish command and it succeeded the second time. There was previously an open related ticket to this: #4365 but someone closed it saying it was "fixed a long time ago" even though I had just reported seeing it. So please refer there for other details.

@isaacs
Owner

What package were you trying to unpublish?

Can you please gist the npm-debug.log file that is created when this happens?

@fresheneesz

It was 'incremental-installer', and unfortunately I didn't save the npm-debug.log.. but I come across it again, I'll be sure to. The output looked very very similar to the unpublish logs posted in #4365

@isaacs
Owner

What version were you trying to unpublish?

@fresheneesz

0.0.1 - the only version on there at the time. I was trying to remove the package entirely (so i could replace it with another)

@marcelog

I'm having the same issue here for both publish and unpublish

@fresheneesz

@marcelog can you give some details and post your npm-debug.log please?

@marcelog

@fresheneesz Yes, sure. Btw, I tried updating to latest 0.10.x and published successfully. Will try again with 0.8 and post the log. Thanks!

@JamesMGreene

I get this frequently as well, though it seems like like unpublish actually works despite the error message.

$ npm unpublish flex-sdk@4.5.0 --force
npm WARN using --force I sure hope you know what you are doing.
npm http GET https://registry.npmjs.org/flex-sdk?write=true
npm http 200 https://registry.npmjs.org/flex-sdk?write=true
npm http PUT https://registry.npmjs.org/flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
npm http 201 https://registry.npmjs.org/flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
npm http GET https://registry.npmjs.org/flex-sdk
npm http 200 https://registry.npmjs.org/flex-sdk
npm http DELETE https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
npm http 409 https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
npm ERR! Error: conflict Document update conflict.: flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
npm ERR!     at RegClient.<anonymous> (/Users/Greene/.nvm/v0.10.26/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:237:14)
npm ERR!     at Request.self.callback (/Users/Greene/.nvm/v0.10.26/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/Greene/.nvm/v0.10.26/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/Greene/.nvm/v0.10.26/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/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "/Users/Greene/.nvm/v0.10.26/bin/node" "/Users/Greene/.nvm/v0.10.26/bin/npm" "unpublish" "flex-sdk@4.5.0" "--force"
npm ERR! cwd /Users/Greene/Development/Personal/node-flex-sdk
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Greene/Development/Personal/node-flex-sdk/npm-debug.log
npm ERR! not ok code 0

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/Users/Greene/.nvm/v0.10.26/bin/node',
1 verbose cli   '/Users/Greene/.nvm/v0.10.26/bin/npm',
1 verbose cli   'unpublish',
1 verbose cli   'flex-sdk@4.5.0',
1 verbose cli   '--force' ]
2 info using npm@1.4.3
3 info using node@v0.10.26
4 warn using --force I sure hope you know what you are doing.
5 verbose url raw flex-sdk?write=true
6 verbose url resolving [ 'https://registry.npmjs.org/', './flex-sdk?write=true' ]
7 verbose url resolved https://registry.npmjs.org/flex-sdk?write=true
8 info trying registry request attempt 1 at 14:07:27
9 http GET https://registry.npmjs.org/flex-sdk?write=true
10 http 200 https://registry.npmjs.org/flex-sdk?write=true
11 silly registry.get cb [ 200,
11 silly registry.get   { date: 'Mon, 07 Apr 2014 19:07:28 GMT',
11 silly registry.get     server: 'CouchDB/1.5.0 (Erlang OTP/R14B04)',
11 silly registry.get     etag: '"DH5OXHHOPD9P6KWEYZF0DBB0M"',
11 silly registry.get     'content-type': 'application/json',
11 silly registry.get     'cache-control': 'max-age=0',
11 silly registry.get     'content-length': '44130',
11 silly registry.get     'accept-ranges': 'bytes',
11 silly registry.get     via: '1.1 varnish',
11 silly registry.get     age: '0',
11 silly registry.get     'x-served-by': 'cache-c31-CHI',
11 silly registry.get     'x-cache': 'MISS',
11 silly registry.get     'x-cache-hits': '0',
11 silly registry.get     'x-timer': 'S1396897647.552717447,VS0,VE774',
11 silly registry.get     vary: 'Accept',
11 silly registry.get     'keep-alive': 'timeout=10, max=50',
11 silly registry.get     connection: 'Keep-Alive' } ]
12 verbose unpublish removing attachments { shasum: '0395622b4c135e5afd9288b8f69056e9abc6a719',
12 verbose unpublish   tarball: 'http://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz' }
13 verbose url raw flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
14 verbose url resolving [ 'https://registry.npmjs.org/',
14 verbose url resolving   './flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9' ]
15 verbose url resolved https://registry.npmjs.org/flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
16 info trying registry request attempt 1 at 14:07:28
17 http PUT https://registry.npmjs.org/flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
18 http 201 https://registry.npmjs.org/flex-sdk/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
19 verbose url raw flex-sdk
20 verbose url resolving [ 'https://registry.npmjs.org/', './flex-sdk' ]
21 verbose url resolved https://registry.npmjs.org/flex-sdk
22 info trying registry request attempt 1 at 14:07:29
23 http GET https://registry.npmjs.org/flex-sdk
24 http 200 https://registry.npmjs.org/flex-sdk
25 silly registry.get cb [ 200,
25 silly registry.get   { date: 'Mon, 07 Apr 2014 19:07:30 GMT',
25 silly registry.get     server: 'CouchDB/1.5.0 (Erlang OTP/R16B)',
25 silly registry.get     etag: '"DH5OXHHOPD9P6KWEYZF0DBB0M"',
25 silly registry.get     'content-type': 'application/json',
25 silly registry.get     via: '1.1 varnish',
25 silly registry.get     'cache-control': 'max-age=1',
25 silly registry.get     'content-length': '44130',
25 silly registry.get     'accept-ranges': 'bytes',
25 silly registry.get     age: '0',
25 silly registry.get     'x-served-by': 'cache-v37-ASH, cache-c100-CHI',
25 silly registry.get     'x-cache': 'MISS, MISS',
25 silly registry.get     'x-cache-hits': '0, 0',
25 silly registry.get     'x-timer': 'S1396897650.057207823,VS0,VS8,VE345,VE353',
25 silly registry.get     vary: 'Accept',
25 silly registry.get     'keep-alive': 'timeout=10, max=50',
25 silly registry.get     connection: 'Keep-Alive' } ]
26 info detach /flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
27 verbose url raw /flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
28 verbose url resolving [ 'https://registry.npmjs.org/',
28 verbose url resolving   './flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9' ]
29 verbose url resolved https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
30 info trying registry request attempt 1 at 14:07:30
31 http DELETE https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
32 http 409 https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
33 error Error: conflict Document update conflict.: flex-sdk/-/flex-sdk-4.5.0.tgz/-rev/209-f81df2484a4c6df64e82c6c9eeafb0f9
33 error     at RegClient.<anonymous> (/Users/Greene/.nvm/v0.10.26/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:237:14)
33 error     at Request.self.callback (/Users/Greene/.nvm/v0.10.26/lib/node_modules/npm/node_modules/request/request.js:123:22)
33 error     at Request.EventEmitter.emit (events.js:98:17)
33 error     at Request.<anonymous> (/Users/Greene/.nvm/v0.10.26/lib/node_modules/npm/node_modules/request/request.js:893:14)
33 error     at Request.EventEmitter.emit (events.js:117:20)
33 error     at IncomingMessage.<anonymous> (/Users/Greene/.nvm/v0.10.26/lib/node_modules/npm/node_modules/request/request.js:844:12)
33 error     at IncomingMessage.EventEmitter.emit (events.js:117:20)
33 error     at _stream_readable.js:920:16
33 error     at process._tickCallback (node.js:415:13)
34 error If you need help, you may report this *entire* log,
34 error including the npm and node versions, at:
34 error     <http://github.com/npm/npm/issues>
35 error System Darwin 13.1.0
36 error command "/Users/Greene/.nvm/v0.10.26/bin/node" "/Users/Greene/.nvm/v0.10.26/bin/npm" "unpublish" "flex-sdk@4.5.0" "--force"
37 error cwd /Users/Greene/Development/Personal/node-flex-sdk
38 error node -v v0.10.26
39 error npm -v 1.4.3
40 verbose exit [ 1, true ]
@JamesMGreene

If I run the same unpublish command again immediately afterward, I get:

$ npm unpublish flex-sdk@4.5.0 --force
npm WARN using --force I sure hope you know what you are doing.
npm http GET https://registry.npmjs.org/flex-sdk?write=true
npm http 200 https://registry.npmjs.org/flex-sdk?write=true
- flex-sdk@4.5.0
@JamesMGreene

Worked fine from home tonight. Any fixes made on the NPM server-side? If not, I'm guessing the registry was just being too slow for this large module during the day time.

@Daniel-Hug

I'm having this same issue.

@othiym23
Owner

I'm fairly certain that we have sorted unpublish's issues out over the last several months. Please open new issues if you run into this problem again.

@othiym23 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.