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

Fix issues preventing downloads #2428

Closed
wants to merge 3 commits into from

Conversation

UrbanCMC
Copy link
Contributor

Fixes the following issues:

  • Building an HttpRequestMessage when no cookies are available causes a download error
00:02:55.089 [ERROR] (Wabbajack.Installer.StandardInstaller) Download error for file Draugr Upgrades and Improvements (latest)-54930-2-4-2-1639244041.7z|System.FormatException: The format of value '' is invalid.
   at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
   at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptor descriptor, HeaderStoreItemInfo info, String value)
   at System.Net.Http.Headers.HttpHeaders.Add(HeaderDescriptor descriptor, String value)
   at Wabbajack.Common.HttpExtensions.AddCookies(HttpRequestMessage msg, Cookie[] cookies) in C:\oss\wabbajack\Wabbajack.Common\HttpExtensions.cs:line 21
   at Wabbajack.Common.HttpExtensions.ToHttpRequestMessage(BrowserDownloadState browserState) in C:\oss\wabbajack\Wabbajack.Common\HttpExtensions.cs:line 44
   at Wabbajack.Downloaders.NexusDownloader.DownloadManually(Archive archive, Nexus state, AbsolutePath destination, IJob job, CancellationToken token) in C:\oss\wabbajack\Wabbajack.Downloaders.Nexus\NexusDownloader.cs:line 191
   at Wabbajack.Downloaders.NexusDownloader.Download(Archive archive, Nexus state, AbsolutePath destination, IJob job, CancellationToken token) in C:\oss\wabbajack\Wabbajack.Downloaders.Nexus\NexusDownloader.cs:line 123
   at Wabbajack.Downloaders.DownloadDispatcher.Download(Archive a, AbsolutePath dest, Job`1 job, CancellationToken token, Nullable`1 useProxy) in C:\oss\wabbajack\Wabbajack.Downloaders.Dispatcher\DownloadDispatcher.cs:line 112
   at Wabbajack.Downloaders.DownloadDispatcher.Download(Archive a, AbsolutePath dest, CancellationToken token, Nullable`1 proxy) in C:\oss\wabbajack\Wabbajack.Downloaders.Dispatcher\DownloadDispatcher.cs:line 54
   at Wabbajack.Downloaders.DownloadDispatcher.DownloadWithPossibleUpgrade(Archive archive, AbsolutePath destination, CancellationToken token) in C:\oss\wabbajack\Wabbajack.Downloaders.Dispatcher\DownloadDispatcher.cs:line 155
   at Wabbajack.Installer.AInstaller`1.DownloadArchive(Archive archive, Boolean download, CancellationToken token, Nullable`1 destination) in C:\oss\wabbajack\Wabbajack.Installer\AInstaller.cs:line 399
  • Trying to parse an invalid .download_package throws an exception on every retry, making a download impossible
00:00:22.565 [ERROR] (Wabbajack.Networking.Http.SingleThreadedDownloader) Failed to download 'Unofficial Skyrim Creation Club Content Patch-18975-7-7-1691284489.zip' after 3 tries.|System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Wabbajack.Networking.Http.ResumableDownloader.LoadPackage() in C:\oss\wabbajack\Wabbajack.Networking.Http\ResumableDownloader.cs:line 169
   at Wabbajack.Networking.Http.ResumableDownloader.Download(CancellationToken token) in C:\oss\wabbajack\Wabbajack.Networking.Http\ResumableDownloader.cs:line 50
   at Wabbajack.Networking.Http.SingleThreadedDownloader.Download(HttpRequestMessage message, AbsolutePath outputPath, IJob job, CancellationToken token) in C:\oss\wabbajack\Wabbajack.Networking.Http\SingleThreadedDownloader.cs:line 41

@UrbanCMC UrbanCMC closed this Oct 20, 2023
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.

1 participant