dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.94k stars 533 forks source link

Download issues repository manifest #9392

Closed rgroenewoudt closed 3 weeks ago

rgroenewoudt commented 1 month ago

Android framework version

net8.0-android

Affected platform version

VS2022 17.11.5

Description

Last week we are regularly running into the issue that the manifest cannot be downloaded.

We are running into this locally when opening Android SDK Manager from Visual Studio and on our build servers when calling dotnet build -t:InstallAndroidDependencies which are running in a different network/location.

Failed to download Xamarin Repository manifest from https://aka.ms/xamarin/sdkmanifest/d17-11. System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to read data from the transport connection: The connection was closed.
   at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.EndRead(IAsyncResult asyncResult)
   at System.Net.Http.StreamToStreamCopy.BufferReadCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Xamarin.Installer.AndroidSDK.Manager.Helper.DownloadToString(Uri url, String& output)
   at Xamarin.Installer.AndroidSDK.Repository.LoadManifest()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to read data from the transport connection: The connection was closed.
   at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.WebExceptionWrapperStream.EndRead(IAsyncResult asyncResult)
   at System.Net.Http.StreamToStreamCopy.BufferReadCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---<---

Opening this link in the browser results in a zero-bytes-file.

jpobst commented 1 month ago

Downloading the file today in my browser seems to result in a complete XML file. I do not know if you were only experiencing this temporarily or if you are still seeing this issue.

Either way, this issue occurs in the Visual Studio integration, which is owned by a different team who does not use GitHub for issue tracking.

Please use the tools available inside of VS to report this issue. This allows the issue to be routed to the correct team, and provides them the correct logs they need to diagnose it.

jpobst commented 1 month ago

Oh, hmm, you also get it from the command line. That could be us?

I guess if you are no longer seeing the issue, it was a temporary server issue that has been resolved.

If you are still seeing this issue, especially in your browser, then it feels like it might be something specific to your network, like a bad proxy or cache?

dotnet-policy-service[bot] commented 3 weeks ago

Hi @rgroenewoudt. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

rgroenewoudt commented 3 weeks ago

The issue was in multiple locations, it seems a temporarily issue with Microsoft server. It hasn't happened recently.