BrowserPicker: System.ArgumentException: 'windows-1251' is not a supported encoding name.

System.AggregateException: One or more errors occurred. (The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.)
 ---> System.InvalidOperationException: The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.
 ---> System.ArgumentException: 'windows-1251' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
   at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
   at System.Text.EncodingTable.GetCodePageFromName(String name)
   at System.Text.Encoding.GetEncoding(String name)
   at System.Net.Http.HttpContent.ReadBufferAsString(ArraySegment`1 buffer, HttpContentHeaders headers)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpContent.ReadBufferAsString(ArraySegment`1 buffer, HttpContentHeaders headers)
   at System.Net.Http.HttpContent.ReadBufferedContentAsString()
   at System.Net.Http.HttpContent.WaitAndReturnAsync[TState,TResult](Task waitTask, TState state, Func`2 returnFunc)
   at BrowserPicker.UrlHandler.FindIcon(CancellationToken cancellationToken)
   at BrowserPicker.UrlHandler.FindIcon(CancellationToken cancellationToken)
   at BrowserPicker.UrlHandler.Start(CancellationToken cancellationToken)
   at BrowserPicker.App.RunLongRunningProcesses()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   at BrowserPicker.App.<>c.<OnStartup>b__8_1()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at BrowserPicker.App.OnStartup(StartupEventArgs e)

It happened when I clicked a link in the qBitTorrent window.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Works now, thank you!

My fix for this bug was wrong, leading to a stack overflow exception, which was killing the app silently. I have patched this error the proper way in main now, and will be making another new release soon.