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

added application/json to Accept header #3153

Closed
wants to merge 3 commits into from

Conversation

bestander
Copy link
Member

Summary

Should fix #3136 that was introduced by #3112
cc @Daniel15

Test plan

Tested manually that npm still sends shortened metadata

@Daniel15
Copy link
Member

Nice, this should work. Might be worth testing with a real Artifactory server to ensure it works.

@denniswebb, @briice, @kayneb - Would you be able to try this with your Artifactory server and see whether it fixes the issue? You can grab builds from the CI systems:

Windows: https://ci.appveyor.com/api/buildjobs/kria290untiswxeu/artifacts/artifacts%2Fyarn-0.24.0-20170414.1852-unsigned.msi
Tarball: https://3457-49970642-gh.circle-artifacts.com/0/home/ubuntu/yarn/artifacts/yarn-v0.24.0-0.tar.gz
Debian package: https://3457-49970642-gh.circle-artifacts.com/0/home/ubuntu/yarn/artifacts/yarn_0.24.0-0_all.deb

@denniswebb
Copy link
Contributor

denniswebb commented Apr 14, 2017

Unfortunately that still fails

verbose 0.127 current time: 2017-04-14T20:34:34.269Z
[1/4] Resolving packages...
[2/4] Fetching packages...
verbose 0.543 Performing "GET" request to "https://redacted.jfrog.io/redacted/api/npm/npm-virtual/config/-/config-1.25.1.tgz".
verbose 0.846 Error: https://redacted.jfrog.io/redacted/api/npm/npm-virtual/config/-/config-1.25.1.tgz: Request failed "401 Unauthorized"

@bestander
Copy link
Member Author

@denniswebb, can you try this version?

@bestander
Copy link
Member Author

If it works we could make it a setting

@denniswebb
Copy link
Contributor

I just tested using this artifact https://3520-49970642-gh.circle-artifacts.com/0/home/ubuntu/yarn/artifacts/yarn-v0.24.0-0.tar.gz from that commit and still got the 401 error.
I just need to take the time this weekend to pull the repo and start testing 1 commit at a time until we find the offending commit.
Thanks for trying again.

@denniswebb
Copy link
Contributor

I found my issue. Yarn's behavior is different when running as root. We are running as root when building our docker containers. Commit that broke it - d093c6c
I'm going to post this is the other thread since it's more relevant there.

@bestander
Copy link
Member Author

Thanks for finding it out, @denniswebb.
Do you think we could improve error message maybe?

@bestander bestander closed this Apr 22, 2017
@denniswebb
Copy link
Contributor

I think an output when running as root stating that /usr/local/share is being used as home instead. Or a warning when .npmrc or other relevant config files are located in /root but using an alternative home path.

@bestander
Copy link
Member Author

Sounds like a good idea, would you send a PR?

@denniswebb
Copy link
Contributor

@bestander I'm not a real node developer, but I think this will work ok. #3236

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

Successfully merging this pull request may close these issues.

401 Errors installing packages from Artifactory with v0.23.2
3 participants