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

:tzdata_release_updater terminating, argument error #19

Closed
matteosister opened this issue Apr 19, 2016 · 13 comments
Closed

:tzdata_release_updater terminating, argument error #19

matteosister opened this issue Apr 19, 2016 · 13 comments

Comments

@matteosister
Copy link

I'm on elixir 1.2.2, my deps are:

defp deps do
  [
    {:amqp, ">= 0.1.4"},
    {:ecto, "~> 1.1"},
    {:mariaex, "~> 0.6"},
    {:ex_statsd, ">= 0.5.1"},
    {:exrm, "~> 1.0"},
    {:poison, "~> 1.0"},
    {:credo, "~> 0.3", only: [:dev, :test]},
    {:dialyxir, "~> 0.3", only: [:dev]},
    {:timex, "~> 2.0"},
    {:timex_ecto, "~> 1.0"},
    {:httpoison, "~> 0.8.3"}
  ]
end

When I run the project (for example with iex -S mix) I get this after some seconds:

12:48:10.781 [error] Task #PID<0.3269.0> started from :tzdata_release_updater terminating
** (ArgumentError) argument error
    :erlang.hd([])
    (tzdata) lib/tzdata/data_loader.ex:62: Tzdata.DataLoader.do_latest_remote_poll_date/1
    (tzdata) lib/tzdata/data_loader.ex:74: Tzdata.DataLoader.days_since_last_remote_poll/0
    (tzdata) lib/tzdata/release_updater.ex:18: Tzdata.ReleaseUpdater.check_if_time_to_update/0
    (elixir) lib/task/supervised.ex:89: Task.Supervised.do_apply/2
    (elixir) lib/task/supervised.ex:40: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Function: #Function<1.97472105/0 in Tzdata.ReleaseUpdater.init/1>
    Args: []
@matteosister
Copy link
Author

I tried deleting the _build folder with no luck...

@matteosister
Copy link
Author

the problem seems related to the last version of tzdata: 0.5.7
the 0.5.6 version works!

@matteosister
Copy link
Author

the downgrade to 0.5.6 makes it work also on 0.5.7...after upgrading again now it works. 😓

@lau
Copy link
Owner

lau commented Apr 20, 2016

I'm not sure what the issue is. There have been issues with Timex. I recommend using Calendar: https://github.com/lau/calendar

@lau lau closed this as completed Apr 20, 2016
@benwilson512
Copy link

Same issue here, and I'm using Calendar.

@benwilson512
Copy link

rm -rf _build solved this for me.

@lau
Copy link
Owner

lau commented May 2, 2016

Is this is development mode or does it happen when deployed to a server?

Did you have this config setting set? config :tzdata, :data_dir, "/some/path/here"

@benwilson512
Copy link

At the moment merely development, and no I do not have any such config set.

@lau
Copy link
Owner

lau commented May 2, 2016

From the line numbers, looking at the code, it looks like it tries to open a file latest_remote_poll.txt but it can't. I will try to see if I can provoke the same error.

@lau lau reopened this May 2, 2016
@benwilson512
Copy link

Thanks! I continue to be very happy with Calendar by the way, great work.

@lau
Copy link
Owner

lau commented May 2, 2016

Thanks, I appreciate that.

@ashrafhasson
Copy link

ashrafhasson commented Jun 4, 2016

I got the same issue, I have :calendar, "~> 0.14.0" as a dependency. Resolved by specifying :tzdata, "~> 0.5.7" in the list of deps which updated the tzdata (ETS table and its related file):

[debug] Tzdata polling for update.
[debug] Tzdata downloading new data from https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
[debug] Tzdata data downloaded. Release version 2016d.
[info] Tzdata has updated the release from 2016c to 2016d
[debug] Tzdata deleting ETS table for version 2016c
[debug] Tzdata deleting ETS table file for version 2016c

I removed tzdata from the list of deps and now I no longer get the errors. I hope this helps in spotting the issue.

@lau
Copy link
Owner

lau commented Jun 6, 2016

A new version 0.5.8 has just been release. It has improved error handling for errors related to latest_remote_poll.txt.

@lau lau closed this as completed Jun 6, 2016
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

4 participants