tpill90 / battlenet-lancache-prefill

CLI tool to automatically prefill a Lancache with Battle.Net games
https://tpill90.github.io/battlenet-lancache-prefill/
MIT License
72 stars 10 forks source link

Crash at download start #78

Closed Palando closed 1 year ago

Palando commented 1 year ago

The program crashes with the following error (the same in Windows and Linux):

PS C:\Users\sascha\BattleNetPrefill-1.5.0-win-x64> .\BattleNetPrefill.exe prefill --products d3 wow wow_classic
[11:27:56 PM] Prefilling 3 products

[11:28:31 PM] Starting Diablo 3
System.UriFormatException: Invalid URI: The hostname could not be parsed.
  at void System.Uri.CreateThis(string , bool , UriKind , in UriCreationOptions )
  at System.Uri..ctor(string uriString)
  at async Task<byte[[]]> BattleNetPrefill.Web.CdnRequestManager.GetRequestAsBytesAsync(Request request, ProgressTask
     task)
  at void BattleNetPrefill.Web.CdnRequestManager.<>c__DisplayClass18_0.<<GetRequestAsBytesAsync>b__0>d.MoveNext()
  at async Task<TResult> Polly.Retry.AsyncRetryEngine.ImplementationAsync<TResult>(Func<Context, CancellationToken,
     Task<TResult>> action, Context context, CancellationToken cancellationToken, ExceptionPredicates
     shouldRetryExceptionPredicates, ResultPredicates<TResult> shouldRetryResultPredicates,
     Func<DelegateResult<TResult>, TimeSpan, int, Context, Task> onRetryAsync, int permittedRetryCount,
     IEnumerable<TimeSpan> sleepDurationsEnumerable, Func<int, DelegateResult<TResult>, Context, TimeSpan>
     sleepDurationProvider, bool continueOnCapturedContext)
  at async Task<TResult> Polly.AsyncPolicy.ExecuteAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action,     Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)
  at async Task<byte[[]]> BattleNetPrefill.Web.CdnRequestManager.GetRequestAsBytesAsync(RootFolder rootPath, MD5Hash
     hash, bool isIndex, bool writeToDevNull, long? startBytes, long? endBytes)
  at async Task<BuildConfigFile> BattleNetPrefill.Parsers.BuildConfigParser.GetBuildConfigAsync(VersionsEntry
     versionsEntry, CdnRequestManager cdnRequestManager, TactProduct targetProduct)
  at void BattleNetPrefill.TactProductHandler.<>c__DisplayClass4_0.<<ProcessProductAsync>b__0>d.MoveNext()
  at void Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in Status.cs:79
  at void Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in Status.cs:120
  at void Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in Progress.cs:133
  at async Task<T> Spectre.Console.Internal.DefaultExclusivityMode.RunAsync<T>(Func<Task<T>> func) in
     DefaultExclusivityMode.cs:40
  at async Task<T> Spectre.Console.Progress.StartAsync<T>(Func<ProgressContext, Task<T>> action) in Progress.cs:116
  at async Task<T> Spectre.Console.Status.StartAsync<T>(string status, Func<StatusContext, Task<T>> func) in Status.cs:
     117
  at async Task Spectre.Console.Status.StartAsync(string status, Func<StatusContext, Task> action) in Status.cs:77
  at async Task<ComparisonResult> BattleNetPrefill.TactProductHandler.ProcessProductAsync(bool skipDiskCache, bool
     forcePrefill)
  at async ValueTask BattleNetPrefill.CliCommands.PrefillCommand.ExecuteAsync(IConsole console)
Palando commented 1 year ago

The crash was caused by my lan-cache server. There was something broken.