You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like HttpClient has problems, in some cases, with getting info from Maven repositories.
NOTE[s]:
never experienced this error from local Mac builds
the problem was detected on CI/CD servers during binderator runs on Mac (never on Windows):
Unhandled exception. System.Collections.Generic.KeyNotFoundException: No version for artifact `accompanist-placeholder-material` with version: `0.30.1`
at MavenNet.MavenRepository.GetProjectAsync(String groupId, String artifactId, String version)
at AndroidBinderator.Engine.ProcessConfig(BindingConfig config) in D:\a\_work\1\s\Util\Xamarin.AndroidBinderator\Xamarin.AndroidBinderator\Engine.cs:line 65
at AndroidBinderator.Engine.BinderateAsync(BindingConfig config) in D:\a\_work\1\s\Util\Xamarin.AndroidBinderator\Xamarin.AndroidBinderator\Engine.cs:line 46
at Xamarin.AndroidBinderator.Tool.Program.Main(String[] args) in D:\a\_work\1\s\Util\Xamarin.AndroidBinderator\Xamarin.AndroidBinderator.Tool\Program.cs:line 67
at Xamarin.AndroidBinderator.Tool.Program.<Main>(String[] args)
An error occurred when executing task 'binderate'.
Error: Process xamarin-android-binderator exited with code 134.
MavenNet error after adding unit-test case reveals true cause of the exception/error:
[xUnit.net 00:00:02.12]
System.Net.Http.HttpRequestException :
Response status code does not indicate success: 403 (Forbidden).
Error/exception occurs ONLY for SOME artifacts (gropuId) - in this case com.google.accompanist group.
The reason for failures for SOME artifacts, could be behind reverse proxy and database partitioning/shardening
and requests hitting SOME/SPECIFIC HTTP server[s] for those specific packages.
The solution is to add User-Agent to requests, so HttpClient was exposed, so headers can be
manipulated.
Note that the issue here was that Maven Central had a CDN issue where some of their servers were missing the 30.1 versions. I had them flush their CDN for these files and it should be fixed now.
> When attempting to access this file:
> [https://repo1.maven.org/maven2/com/google/accompanist/accompanist-placeholder-material/maven-metadata.xml]
>
> Some of our machines correctly see a version with `<lastUpdated>20230404050249</lastUpdated>` that has `<latest>0.31.0-alpha</latest>`.
> - These machines report an IP address for `repo1.maven.org` of `199.232.192.209` via `nslookup`.
>
> However some of them retrieve a version with `<lastUpdated>20230323002739</lastUpdated>` that has `<latest>0.30.0</latest>`.
> - These machines report an IP address for `repo1.maven.org` of `151.101.20.209` via `nslookup`.
>
> If I use a hosts file to manually point a machine that works correctly to the `151.101.20.209` IP address, it receives the incorrect file.
>
> My guess is this is a stale CDN issue.
Joel Orlina updated MVNCENTRAL-8023:
------------------------------------
Resolution: Fixed
Status: Done (was: To Do)
Note that the issue here was that Maven Central had a CDN issue where some of their servers were missing the 30.1 versions. I had them flush their CDN for these files and it should be fixed now.
I tested few more versions which led me into thinking that it is something with reverse proxy and DB partitioning/shardening.
OK. Let me test AX PRs and if everything is OK we can close this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seems like HttpClient has problems, in some cases, with getting info from Maven repositories.
NOTE[s]:
binderatorruns on Mac (never on Windows):MavenNet error after adding unit-test case reveals true cause of the exception/error:
Error/exception occurs ONLY for SOME artifacts (
gropuId) - in this casecom.google.accompanistgroup.Artifacts (repro data - urls) causing exception:
The reason for failures for SOME artifacts, could be behind reverse proxy and database partitioning/shardening
and requests hitting SOME/SPECIFIC HTTP server[s] for those specific packages.
The solution is to add
User-Agentto requests, soHttpClientwas exposed, so headers can bemanipulated.