elixir-inspector / ua_inspector

User agent parser library
Apache License 2.0
125 stars 23 forks source link

Crash Supervisor after initial Download / Reload Database #13

Closed pedromvieira closed 5 years ago

pedromvieira commented 6 years ago

Just installed it in Elixir 1.6.1 (and 1.6.2) with HEX and github versions.

It starts without database normally, but after Download (UAInspector.Downloader.download) and Reload(UAInspector.reload) it crash the application.

I need to remove the yml files (assets/useragent custom dir) to load application again.

If set up inside extra_applications, it works correctly but not show as a new application supervisor in observer:

  def application do
    [mod: {MyApp.Application, []},
     ...
     extra_applications: [:logger, :runtime_tools, :ua_inspector]]
  end
mneudert commented 6 years ago

Do you have any log output that might help to identify or reproduce the problems?

rodrigues commented 5 years ago

@mneudert I've had a similar problem:

2019-02-12T14:00:04.743Z [error] Child UAInspector.ShortCodeMap.DeviceBrands of Supervisor #PID<0.475.0> (UAInspector.ShortCodeMap.Supervisor) termi
nated                                                                                                                                              
** (exit) bad return value: {:yamerl_exception, [{:yamerl_parsing_error, :error, 'Invalid Unicode character at byte #3304', :undefined, :undefined, 
                                                                         :invalid_unicode, :undefined, [byte: 3304]}]} 

figured it's because of two special characters in new short_codes.device_brands.yml file:

Replacing these two characters, it works normally again.

mneudert commented 5 years ago

@rodrigues the issue with the parsing error is due to some umlauts being added to the device brand list and will be tracked/fixed with #15.

I will close this issue due to age. Please comment/reopen or open a new issue if there is a different bug not fixed in the aforementioned issue.