mathieuprog / tz_extra

A few utilities to work with time zones in Elixir
Apache License 2.0
18 stars 1 forks source link

Failing to start `TzUpdatePeriodically` #9

Closed sodapopcan closed 2 weeks ago

sodapopcan commented 2 weeks ago

Hi there!

Today I randomly started getting an error without any code changes:

** (Mix) Could not start application my_app: MyApp.Application.start(:normal, []) returned an error: shutdown: failed to start child: Tz.UpdatePeriodically
    ** (EXIT) an exception was raised:
        ** (ArithmeticError) bad argument in arithmetic expression
            :erlang.+(nil, 1)
            (tz 0.26.5) lib/tz/iana_file_parser.ex:338: Tz.IanaFileParser.month_string_to_integer/1
            (tz 0.26.5) lib/tz/iana_file_parser.ex:144: Tz.IanaFileParser.transform_rule/1
            (tz 0.26.5) lib/tz/iana_file_parser.ex:53: Tz.IanaFileParser.parse_strings_into_maps/2
            (tz 0.26.5) lib/tz/iana_file_parser.ex:67: Tz.IanaFileParser.parse_strings_into_maps/2
            (tz 0.26.5) lib/tz/iana_file_parser.ex:14: Tz.IanaFileParser.parse/1
            (tz 0.26.5) lib/tz/compiler.ex:20: anonymous fn/2 in Tz.Compiler.compile/0
            (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
            (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
            (tz 0.26.5) lib/tz/compiler.ex:18: Tz.Compiler.compile/0
            (tz 0.26.5) lib/tz/updater.ex:23: Tz.Updater.maybe_recompile/0
            (tz 0.26.5) lib/tz/update_periodically.ex:31: Tz.UpdatePeriodically.init/1
            (stdlib 5.2) gen_server.erl:980: :gen_server.init_it/2
            (stdlib 5.2) gen_server.erl:935: :gen_server.init_it/6
            (stdlib 5.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

I've been actively working on this application the past couple of weeks without running into this (I've never run into it!) and just started happening today.

I have tried rm -rf _build deps ~/.hex to no avail.

I'm a bit out of date on my stack:

Erlang 26.2 Elixir 1.16.2

I'll perhaps try upgrading but wanted to report regardless. Let me know if there is any other information I can provide.

Thank you!

sodapopcan commented 2 weeks ago

I'm so sorry, I just realized I reported this in the wrong repo. I'll close and open in the right one.