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

401 Errors installing packages from Artifactory with v0.23.2 #3136

Closed
denniswebb opened this issue Apr 13, 2017 · 8 comments
Closed

401 Errors installing packages from Artifactory with v0.23.2 #3136

denniswebb opened this issue Apr 13, 2017 · 8 comments
Labels

Comments

@denniswebb
Copy link
Contributor

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

What is the current behavior?
Attempting to install packages from Artifactory using v0.23.2 of yarn results in a 401 error being returned from Artifactory. This error does not occur with v0.22.0 and earlier.

If the current behavior is a bug, please provide the steps to reproduce.
Configure ~/.npmrc with the authentication token from Artifactory.
Change the default registry using yarn config set registry https://<redacted>.jfrog.io/<redacted>/api/npm/npm-virtual -g
run yarn --verbose --pure-lockfile

What is the expected behavior?
All packages are downloaded and installed. This works perfect if ran with yarn v0.22.0

Please mention your node.js, yarn and operating system version.
Node 6.95
Yarn v0.23.2
Alpine Docker image

@briice
Copy link

briice commented Apr 13, 2017

I can confirm, we have the same issue. We're downgrading to v0.22.0-1 in the meantime.

@kayneb
Copy link

kayneb commented Apr 13, 2017

Can confirm, our builds started breaking inexplicably. A couple of hours of investigation uncovered an unintended version bump to this new version.

@Daniel15
Copy link
Member

Thanks for the bug report! Would you please be able to do us a favour and try older release candidate versions? We have 0.23.1 and 0.23.0 available. This will help narrow down the range of changes that could have caused this.

If you want to be really awesome, you could bisect and find the exact commit that broke it 😃

@bestander
Copy link
Member

Could be this c92411d

@denniswebb
Copy link
Contributor Author

I did try v0.23.0 and it also failed with 401 errors.

@Daniel15
Copy link
Member

@bestander - That's likely. The current accept header will fail any requests that can not provide that data type. The accept header can have multiple comma-separated MIME types so you should be able to use application/vnd.npm.install-v1+json, application/json or something similar.

@denniswebb
Copy link
Contributor Author

By brute force attempts on Circle artifacts, I have discovered the commit that broke artifactory for us is d093c6c
I'm running yarn during my docker build process and it runs as root.

@denniswebb
Copy link
Contributor Author

And to elaborate on the fix, moving .npmrc from /root/.npmrc to /usr/local/share/.npmrc or <PROJECT_DIR>/.npmrc fixes the 401 errors.

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

Successfully merging a pull request may close this issue.

5 participants