AirBeeSee / FiatUconnect

FIAT (uconnect) Home Assistant Addon
MIT License
4 stars 2 forks source link

Bug: Failed to convert configuration value at 'MqttPort' to type 'System.Int32'. #6

Closed jastBytes closed 6 months ago

jastBytes commented 6 months ago

Since the update to 12.1.7 the following error occurs on starting up the addon:


[06:17:36] ERROR: Got unexpected response from the API: Service not enabled
Unhandled exception. System.InvalidOperationException: Failed to convert configuration value at 'MqttPort' to type 'System.Int32'.
 ---> System.ArgumentException:  is not a valid value for Int32. (Parameter 'value')
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   --- End of inner exception stack trace ---
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.TryConvertValue(Type type, String value, String path, Object& result, Exception& error)
   --- End of inner exception stack trace ---
   at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, Object instance, IConfiguration config, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.GetPropertyValue(PropertyInfo property, Object instance, IConfiguration config, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.BindProperty(PropertyInfo property, Object instance, IConfiguration config, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.BindNonScalar(IConfiguration configuration, Object instance, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, Object instance, IConfiguration config, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.Get(IConfiguration configuration, Type type, Action`1 configureOptions)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.Get[T](IConfiguration configuration, Action`1 configureOptions)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.Get[T](IConfiguration configuration)
   at Program.<Main>$(String[] args) in /home/runner/work/FiatUconnect/FiatUconnect/FiatAddon/FiatClient/Program.cs:line 30
   at Program.<Main>(String[] args)
/run.sh: line 25:   159 Aborted                 (core dumped) ./FiatUconnect
`
jastBytes commented 6 months ago

Okay, just restored the backup of 12.1.5 which shows the same issue. I looked at the code and from my understanding somehow the MqttPort must be set to empty for me. I don't know how this has happened.

jastBytes commented 6 months ago

Nevermind, it is working again. Don't know what I did exactly, but it seems that a complete reboot fixed the issue.