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

Need for better numbered warning message when GPR feed cannot be authenticated #8889

Open
anangaur opened this issue Dec 9, 2019 · 7 comments
Assignees
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:VS.Client Resolution:BlockedByExternal Progress on this task is blocked by an external issue. When that issue is completed this can proceed Triage:Investigate Type:DCR Design Change Request

Comments

@anangaur
Copy link
Member

anangaur commented Dec 9, 2019

I have GPR feed in my sources. When it could not authenticate, I get an undefined warning message.

image

Expected

Better numbered warning message.

@heng-liu heng-liu added the Area:ErrorHandling warnings and errors/log messages & related error codes. label Dec 9, 2019
@nkolev92 nkolev92 added Triage:Investigate Category:Quality Week Issues that should be considered for quality week Product:VS.Client Priority:2 Issues for the current backlog. labels May 18, 2020
@nkolev92
Copy link
Member

So while NuGet can raise a message whenever we can't authenticate (I'd expect a different message when we 401), the message that you have in particular simply cannot be coded, because it's something that GPR sets in their response headers.

Worth investigating/driving to a conclusion, just setting expectations here.

@rrelyea rrelyea self-assigned this Jul 13, 2020
@rrelyea rrelyea added this to the Sprint 173 - 2020.07.06 milestone Jul 13, 2020
@rrelyea
Copy link
Contributor

rrelyea commented Jul 16, 2020

I'm laying the foundation for this with my work for #9688
Looks like GPR is a v2 feed, so there are different code paths that need to be fixed...but likely not huge amount of work.

@nkolev92
Copy link
Member

Looks like GPR is a v2 feed

Pretty sure it's a V3 feed. See https://nuget.pkg.github.com/nuget/index.json

@rrelyea
Copy link
Contributor

rrelyea commented Jul 16, 2020

yes, my mistake there - it is v3.
regardless, there are different places that need fixes...not sure exactly why...compared to azure artifacts.

@rrelyea
Copy link
Contributor

rrelyea commented Jul 16, 2020

Current behavior (using the bits with my fix for 9688) - which is likely the same as shipping nuget.exe:
Need to debug why it doesn't yet fail during the access of the v3 index.json.
And it starts to try: FindPackagesByIdAsync for the packages.

MSBuild auto-detection: using msbuild version '16.8.0.35702' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\MSBuild\Current\Bin'.
Restoring packages for C:\repos\repro-NuGetAuth\src\rrelyea.authTestApp\rrelyea.authTestApp.csproj...
Restoring packages for C:\repos\repro-NuGetAuth\src\rrelyea.authTestApp2\rrelyea.authTestApp2.csproj...
Restoring packages for C:\repos\repro-NuGetAuth\src\rrelyea.classlib2\rrelyea.classlib2.csproj...
Restoring packages for C:\repos\repro-NuGetAuth\src\rrelyea.classlib1\rrelyea.classlib1.csproj...
Committing restore...
Committing restore...
Writing assets file to disk. Path: C:\repos\repro-NuGetAuth\src\rrelyea.classlib2\obj\project.assets.json
Writing assets file to disk. Path: C:\repos\repro-NuGetAuth\src\rrelyea.classlib1\obj\project.assets.json
Restored C:\repos\repro-NuGetAuth\src\rrelyea.classlib2\rrelyea.classlib2.csproj (in 252 ms).
Restored C:\repos\repro-NuGetAuth\src\rrelyea.classlib1\rrelyea.classlib1.csproj (in 251 ms).
Please provide credentials for: https://nuget.pkg.github.com/rrelyea/index.json
UserName: a
Password: *
GET https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Please provide credentials for: https://nuget.pkg.github.com/rrelyea/index.json
UserName: f
Password: *
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Please provide credentials for: https://nuget.pkg.github.com/rrelyea/index.json
UserName: f
Password: *
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Please provide credentials for: https://nuget.pkg.github.com/rrelyea/index.json
UserName: f
Password: *
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Unauthorized https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json 1216ms
Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json'.
Response status code does not indicate success: 401 (Unauthorized).
GET https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Unauthorized https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json 256ms
Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json'.
Response status code does not indicate success: 401 (Unauthorized).
GET https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json
WARNING: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Unauthorized https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json 238ms
Failed to retrieve information about 'rrelyea.classlib1' from remote source 'https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json'.
Response status code does not indicate success: 401 (Unauthorized).
Failed to retrieve information about 'rrelyea.classlib1' from remote source 'https://nuget.pkg.github.com/rrelyea/download/rrelyea.classlib1/index.json'.
Response status code does not indicate success: 401 (Unauthorized).

@rrelyea
Copy link
Contributor

rrelyea commented Jul 17, 2020

github works differently in the auth error case because when you try to fetch the feed url: https://nuget.pkg.github.com/rrelyea/index.json (for example), you are asked to auth.
but they accept anything. (type in user a, with no password - for example).
Thus they then fail in other code bases.

@anangaur - can you work with them to report this behavior, which should likely be fixed by them. once they do, the code path for failures will be identical to Azure Artifacts that I'm improving now.

@rrelyea rrelyea removed this from the Sprint 173 - 2020.07.06 milestone Jul 17, 2020
@rrelyea rrelyea added the Resolution:BlockedByExternal Progress on this task is blocked by an external issue. When that issue is completed this can proceed label Jul 17, 2020
@anangaur
Copy link
Member Author

@whitneyimura, can you help redirect?

@rrelyea rrelyea added this to the Sprint 174 - 2020.07.27 milestone Jul 20, 2020
@rrelyea rrelyea removed this from the Sprint 174 - 2020.07.27 milestone Jul 27, 2020
@aortiz-msft aortiz-msft added the Type:DCR Design Change Request label Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:VS.Client Resolution:BlockedByExternal Progress on this task is blocked by an external issue. When that issue is completed this can proceed Triage:Investigate Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

5 participants