Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.73k stars 301 forks source link

BUG: Auto-update throwing exceptions #1214

Closed isle9 closed 1 year ago

isle9 commented 2 years ago
Flow Launcher version: 1.9.3
OS Version: Microsoft Windows NT 10.0.22000.0
IntPtr Length: 8
x64: True

Python Path: 
Date: 05/19/2022 14:45:13
Exception:
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[Flow.Launcher.Core.Updater+GithubRelease]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellatio
[2022-05-19.txt](https://github.com/Flow-Launcher/Flow.Launcher/files/8729161/2022-05-19.txt)
nToken)
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 125
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 137
   at Flow.Launcher.Core.Updater.UpdateAppAsync(IPublicAPI api, Boolean silentUpdate) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 43
   at Flow.Launcher.ViewModel.SettingWindowViewModel.UpdateApp() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\SettingWindowViewModel.cs:line 52
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

longwdl commented 2 years ago

I have the same problem in version 1.9.4

It seems that the problem relay to HTTP Proxy.

  1. HTTP Proxy enable, click "Check for Updates", error windows show
  2. HTTP Proxy disable, click "Check for Updates", "You already have the latest version" windows show

log info below:

Flow Launcher version: 1.9.4
OS Version: Microsoft Windows NT 10.0.19044.0
IntPtr Length: 8
x64: True

Python Path: 
Date: 09/02/2022 11:02:45
Exception:
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[Flow.Launcher.Core.Updater+GithubRelease]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.UpdateAppAsync(IPublicAPI api, Boolean silentUpdate) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 102
   at Flow.Launcher.ViewModel.SettingWindowViewModel.UpdateApp() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\SettingWindowViewModel.cs:line 52
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
jjw24 commented 2 years ago

I have the same problem in version 1.9.4

It seems that the problem relay to HTTP Proxy.

  1. HTTP Proxy enable, click "Check for Updates", error windows show
  2. HTTP Proxy disable, click "Check for Updates", "You already have the latest version" windows show

log info below:

Flow Launcher version: 1.9.4
OS Version: Microsoft Windows NT 10.0.19044.0
IntPtr Length: 8
x64: True

Python Path: 
Date: 09/02/2022 11:02:45
Exception:
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[Flow.Launcher.Core.Updater+GithubRelease]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.UpdateAppAsync(IPublicAPI api, Boolean silentUpdate) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 102
   at Flow.Launcher.ViewModel.SettingWindowViewModel.UpdateApp() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\SettingWindowViewModel.cs:line 52
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Can this be reproduced consistently?

longwdl commented 2 years ago

No, maybe it relay to the proxy response. Today I only reproduce the problem 2-3 times.

2022-09-20.txt

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

iloeng commented 1 year ago

I have the same problem in version 1.9.5

Every time when I click updates, it will throw this exception. And my network is good

Flow Launcher version: 1.9.5
OS Version: Microsoft Windows NT 10.0.19045.0
IntPtr Length: 8
x64: True

Python Path: 
Date: 11/10/2022 11:03:27
Exception:
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[Flow.Launcher.Core.Updater+GithubRelease]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 125
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 137
   at Flow.Launcher.Core.Updater.UpdateAppAsync(IPublicAPI api, Boolean silentUpdate) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 43
   at Flow.Launcher.ViewModel.SettingWindowViewModel.UpdateApp() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\SettingWindowViewModel.cs:line 52
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
longwdl commented 1 year ago

My Flow launcher terminates silently at midnight today due to auto-update.


00:27:09.1939+08:00 - FATAL - UnHandledException -

Exception

System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[Flow.Launcher.Core.Updater+GithubRelease]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
   Source: System.Text.Json
   TargetAssembly: System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
   TargetModule: System.Text.Json.dll
   TargetSite: Void ThrowJsonException_DeserializeUnableToConvertValue(System.Type)
   at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.GitHubUpdateManager(String repository) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 138
   at Flow.Launcher.Core.Updater.UpdateAppAsync(IPublicAPI api, Boolean silentUpdate) in C:\projects\flow-launcher\Flow.Launcher.Core\Updater.cs:line 102
   at Flow.Launcher.App.<AutoUpdates>b__16_1(Object s, ElapsedEventArgs e) in C:\projects\flow-launcher\Flow.Launcher\App.xaml.cs:line 138
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Environment

Assemblies - Flow.Launcher

jjw24 commented 1 year ago

@longwdl @iloeng did you have the setting HTTP Proxy enabled when you had this error?

longwdl commented 1 year ago

@longwdl @iloeng did you have the setting HTTP Proxy enabled when you had this error?

I always enabled HTTP Proxy.

iloeng commented 1 year ago

@longwdl @iloeng did you have the setting HTTP Proxy enabled when you had this error?

No, I don't have the HTTP Proxy setting, but my network can open GitHub/Google directly

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.