yarn publish hangs

Created on 4 Nov 2016  ·  26Comments  ·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
When attempting to publish a package yarn just hangs on step 3

If the current behavior is a bug, please provide the steps to reproduce.
To reproduce, simply try to publish something via yarn publish

What is the expected behavior?
Publish should succeed or fail in a reasonable amount of time with a relevant error message

Please mention your node.js, yarn and operating system version.

$ yarn --version
0.16.1
Mac OS X 10.11.6
$ node --version
v6.0.0

log:

$ yarn publish
yarn publish v0.16.1
[1/4] Bumping version...
info Current version: 0.0.2
question New version: 0.0.3
info New version: 0.0.3
[2/4] Logging in...
info npm username: reallistic
question npm password: 
success Logged in.
[3/4] Publishing...

Most helpful comment

Latest yarn has same issue for scoped npm package.

Mac OS X El Capitain 10.11.4
$ yarn --version
0.17.3
$ node -v
v6.9.1

log:

$ yarn publish
yarn publish v0.17.3
[1/4] Bumping version...
info Current version: 0.0.0
question New version: 0.0.1
info New version: 0.0.1
[2/4] Logging in...
[3/4] Publishing...

And then it hangs indefinitely.

All 26 comments

Same issue

Mac OS X 10.11.6
$ yarn --version
0.16.1
$ node --version
v5.7.1

Published with

$ npm publish --access public

Same issue with some different versions if that helps debug.

yarn --version
0.17.2
macOS Sierra 10.12.1
node --version
v7.1.0

log:

yarn publish v0.17.2
[1/4] Bumping version...
info Current version: 1.0.0
question New version:
[2/4] Logging in...
[3/4] Publishing...

Latest yarn has same issue for scoped npm package.

Mac OS X El Capitain 10.11.4
$ yarn --version
0.17.3
$ node -v
v6.9.1

log:

$ yarn publish
yarn publish v0.17.3
[1/4] Bumping version...
info Current version: 0.0.0
question New version: 0.0.1
info New version: 0.0.1
[2/4] Logging in...
[3/4] Publishing...

And then it hangs indefinitely.

Still having the issue in 0.17.9

$ yarn --version
0.17.9
$ node --version
v6.9.1
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G1108

log:
```bash
$ yarn publish
yarn publish v0.17.9
[1/4] Bumping version...
info Current version: 0.7.0
question New version: 0.7.1
info New version: 0.7.1
[2/4] Logging in...
[3/4] Publishing...
^C

Still there in 0.18.0

$ yarn --version
0.18.0
$ node --version
v7.2.0
$ npm --version
3.10.9
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.1
BuildVersion:   16B2555

log:

$ yarn publish
yarn publish v0.18.0
[1/4] Bumping version...
info Current version: 0.6.0
question New version: 0.6.1
info New version: 0.6.1
[2/4] Logging in...
[3/4] Publishing...

Same issue here

OSX El Capitan 10.11.6
➜  ~ yarn --version
0.17.10
➜  ~ node --version
v6.2.1

log:

➜  myrepo git:(master) ✗ yarn publish
yarn publish v0.17.10
[1/4] Bumping version...
info Current version: 0.3.0
question New version:
[2/4] Logging in...
info npm username: myusername
info npm username: myemail
question npm password:
success Logged in.
[3/4] Publishing...

Wasn't having this issue earlier today, but I ran into this problem on both:

  • yarn v0.16.10
  • yarn v0.17.10

  • OSX El Capitan 10.1.6

  • npm @ 3.8.6
  • node @ 6.0.0

Same issue here.

stuff | version
----|----
node | 7.2.1
yarn | 0.17.9
OS | Linux 4.7.6-1
distribution | Arch Linux

Same issue here.
node 6.2.0, yarn 0.17.10
OS MacOS 10.11.6

We publish to private npm repos at work. Some of us are having this behaviour, others not.

Is there a trace mode, or debug logs or something like that we can enable? (update: just discovered --verbose mode, duh! sorry.)

Our company just switched to yarn FWIW (so this represents about 20 developers). Had to use npm to publish (which is fine, just inconvenient to explain to new and existing people why)

I'm wondering if it's not perhaps a case of running yarn login as we used to have to run npm login because it's storing creds in a different spot now?

In either case, better error messages around this would be excellent, if at all possible.

(further update: --verbose doesn't help, tho I haven't tried --har where it logs all the requests: --har save HAR output of network traffic. We're using npm for publishing for now)

I've tried the following:

  • yarn login
  • yarn publish --verbose

But I'm still observing the [3/4] Publishing... hang issue with no additional output.

  • node v7.2.1
  • yarn v0.18.0
  • OSX 10.11.6

Here's the dstruss output that seems relevant, it seems to go into a ksevent wait-loop forever directly following this output:

13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 1 0
13388/0x6318a: read(0xB, "\0", 0x400) = 1 0
13388/0x6318a: psynch_cvsignal(0x1012BE640, 0x13690000136D00, 0x136900) = 256 0
13388/0x63198: psynch_cvwait(0x1012BE640, 0x13660000136A00, 0x136600) = 0 0
13388/0x63198: read(0x22, "{\n \"name\": \"boom\",\n \"description\": \"HTTP-friendly error objects\",\n \"version\": \"2.10.1\",\n \"repository\": \"git://github.com/hapijs/boom\",\n \"main\": \"lib/index.js\",\n \"keywords\": [\n \"error\",\n \"http\"\n ],\n \"engines\": {\n \"node\": \">=0.10.40\"\n },\n ", 0x205) = 517 0
13388/0x63198: write(0xC, "\0", 0x1) = 1 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 1 0
13388/0x6318a: read(0xB, "\0", 0x400) = 1 0
13388/0x6318a: psynch_cvsignal(0x1012BE640, 0x136A0000136E00, 0x136A00) = 256 0
13388/0x63196: psynch_cvwait(0x1012BE640, 0x13670000136B00, 0x136700) = 0 0
13388/0x63196: close(0x22) = 0 0
13388/0x63196: write(0xC, "\0", 0x1) = 1 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 1 0
13388/0x6318a: read(0xB, "\0", 0x400) = 1 0
13388/0x6318a: psynch_cvsignal(0x1012BE640, 0x136B0000136F00, 0x136B00) = 256 0
13388/0x63197: psynch_cvwait(0x1012BE640, 0x13680000136C00, 0x136800) = 0 0
13388/0x63197: lstat64("/Users/<...omitted...>/pimp-my-sql/node_modules/brace-expansion/README.md\0", 0x0, 0x0) = 0 0
13388/0x63195: psynch_cvwait(0x1012BE640, 0x13690000136D00, 0x136900) = 0 0
13388/0x63198: psynch_cvwait(0x1012BE640, 0x136A0000136E00, 0x136A00) = 0 0
13388/0x63196: psynch_cvwait(0x1012BE640, 0x136B0000136F00, 0x136B00) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0
13388/0x6318a: kevent(0x8, 0x7FFF5FBF6C90, 0x0) = 0 0

pls have a look on my comment: https://github.com/yarnpkg/yarn/issues/610#issuecomment-268192243

@cpojer @samccone this seems to be a known, major issue with yarn, and no members have commented about plans to address. Is fixing yarn publish on the roadmap? I don't mean making it better, I mean addressing reports that the feature is DOA.

Earliest report was in October, and @Waize commented with an assessment (linked above).

Yarn is a community project. Feel free to send pull requests to improve the behavior! We agree that yarn publish isn't great right now and hope that it'll be fixed in the future.

Just upgraded to Yarn v0.19.1 - still happening consistently on Windows 10.0.14393 Node v6.9.0

I think no one in the yarn team is actually working on this issue. Since yarn publish command can be easily replaced with npm publish command, this issue won't be given a high priority. (Actually it is not even triaged yet)

Sadly I'm quite sure that Facebook won't use their money to just satisfy their FOSS users. It might be possible if the staff of this project has enough free time, but looks like they're busy for other works recently.

Recent contribution graph of yarn
Recent contribution graph of yarn

So, let's solve this problem with collective intelligence. Just like @scull7 has shared his own result of debugging, maybe someone could carry on his work on and on. Even if each person doesn't have enough time to dig into this problem, multiple people as a community should have enough time to dig into this problem.

Please share your debug results to this thread. Even a single comment likes "yarn publish command is handled in this file!" is greatly helpful. Let's do this!

Did you read my comment?

⁣Regards.

Am 17. Jan. 2017, 09:01, um 09:01, Hyeon Kim notifications@github.com schrieb:

I think no one in the yarn team is actually working on this job. Since
yarn publish command can be easily replaced with npm publish
command, this issue won't be given high priority. (Actually it is not
even triaged yet)

Sadly I'm quite sure that Facebook won't use their money to just
satisfy their FOSS users. It might be possible if the staff of this
project has enough free time, but looks like they're busy recently.

Recent contribution graph of yarn
Recent contribution graph of yarn

So, let's solve this problem with collective intelligence. Just like
@scull7 has shared his own result of debugging, maybe someone could
carry on his work on and on. Even if each person doesn't have enough
time to dig into this problem, multiple people as a community should
have enough time to dig into this problem.

Please share your debug results to this thread. Even a single comment
likes "yarn publish command is handled in this file!" is greatly
helpful. Let's do this!

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/yarnpkg/yarn/issues/1694#issuecomment-273046343

@Waize Oops sorry I just passed it without knowing. I thought it's a different issue (The tag of that issue is "enhancement". It's so misleding since this is a bug) Looks like the point that you catched is an actual cause of this bug. Let's find out how to fix this.

Hi, I've investigated this a bit and found that there is a mistake in reading the stream of the tgz-file or directory, depending on what you gave as arguments.

Sticking into this shows that the chunk size of the stream (on windows, linux not tested) is 65536 byte.
In the stream.js where you call the ConcatStream-Object the _transform-function ist just called once. This leads to the problem:
you get the stream, read the first chunk (65536 bytes) and nothing more happens.

Hopefully this can help you to fix this issue and make publish working again.

btw: in your pack.js-file there is no problem with the stream handling and I wonder why it is in publish.js 😕

It's this line in publish.js which hangs:

javascript const buffer = yield new Promise(function (resolve, reject) { stream.pipe(new (_stream || _load_stream()).ConcatStream(resolve)).on('error', reject); });

Is the packed tar stream not being ended when it should be?

Currently I don't have much time to investigate this.

All I did was just write some console outputs after every single line to see where yarn publish breaks and this leads me to my triage --> debugging with console outputs :)

Maybe this will help one of you to fix the error.

I was having this error on yarn 0.18.1
And now it works fine on yarn 0.22.0
Mac OS 10.12.4

Thanks @farhansalam - 0.22.0 still hangs on Windows Version 10.0.14393, node 6.9.0

I ran into this issue too, but I have a pretty strong feeling about why I ran into the issue. I believe that the prepublish command specified in my package.json file errored out, but Yarn failed to bubble up this error and failed to correctly halt execution.

I know this because I attempt a npm publish command afterwards and it terminated due to the correct error message (I did not have babel on my path, I forgot to install dependencies from package.json). After running npm install, the npm publish command succeeded.

I hope this helps with diagnosing the root cause of this yarn issue.

NooooOOOOooo very disappointed. Experiencing the same issue on a linux/alpine docker container. This was working fine until yesterday.

Having the same error with public scoped packages. Using yarn 0.24.6, node 6 and Fedora 25.

Was this page helpful?
0 / 5 - 0 ratings