Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Updater crashes with ArgumentError #150

Open
kevinschweikert opened this issue Sep 12, 2024 · 3 comments
Open

Release Updater crashes with ArgumentError #150

kevinschweikert opened this issue Sep 12, 2024 · 3 comments

Comments

@kevinschweikert
Copy link

tzdata: 1.1.1
Elixir: 1.17.2
Erlang OTP 27.0.1

When starting my application, sometimes i get this error:

[error] [10:53:00.973] GenServer :tzdata_release_updater terminating
** (ArgumentError) errors were found at the given arguments:

  * 2nd argument: not a tuple

    :erlang.element(1, :error)
    (tzdata 1.1.1) lib/tzdata/util.ex:223: Tzdata.Util.to_int/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:38: Tzdata.Parser.process_rule/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
Last message: :check_if_time_to_update
State: [] []

Seems like Tzdata.Util.to_int/1 is not verifiying the result of Integer.parse/1 which could be :error instead of a tuple

@apoorv-2204
Copy link

apoorv-2204 commented Sep 12, 2024

[error] GenServer :tzdata_release_updater terminating
** (ArgumentError) errors were found at the given arguments:

  * 2nd argument: not a tuple

    :erlang.element(1, :error)
    (tzdata 1.1.1) lib/tzdata/util.ex:223: Tzdata.Util.to_int/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:38: Tzdata.Parser.process_rule/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
    (tzdata 1.1.1) lib/tzdata/parser.ex:86: Tzdata.Parser.process_zone/5
    (tzdata 1.1.1) lib/tzdata/parser.ex:24: Tzdata.Parser.process_tz_list/1
Last message: :check_if_time_to_update
State: []

@apoorv-2204
Copy link

apoorv-2204 commented Sep 12, 2024

I was having the same issue
I guess updating tzdata lib fixes it.

@apoorv-2204
Copy link

apoorv-2204 commented Sep 12, 2024

mix deps.update tzdata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants