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

Zammad-scheduler constantly crashes if user have unknown timezone #4320

Closed
v-starodubov opened this issue Oct 26, 2022 · 4 comments
Closed

Comments

@v-starodubov
Copy link

v-starodubov commented Oct 26, 2022

Infos:

  • Used Zammad version: 5.2.3
  • Installation method: docker-compose
  • Operating system: Amazon Linux
  • Database + version: MySQL 8.0.23 (Aurora MySQL 3.02.1)
  • Elasticsearch version: 7.17.3
  • Browser + version: Microsoft Edge 106.0.1370.52 (64-bit)

Expected behavior:

  • Zammad set user's timezone to default UTC +00:00 if something wrong.

Actual behavior:

  • Zammad-scheduler crashes if user's timezone equals Etc/Unknown
bundler: failed to load command: script/background-worker.rb (script/background-worker.rb)
/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/time/zones.rb:100:in `rescue in find_zone!': Invalid Timezone: Etc/Unknown (ArgumentError)
{...}
/usr/local/bundle/gems/tzinfo-2.0.5/lib/tzinfo/data_source.rb:321:in `validate_timezone_identifier': Invalid identifier: Etc/Unknown (TZInfo::InvalidTimezoneIdentifier)

Steps to reproduce the behavior:

  • You must set your browser timezone to Etc/Unknown
    image
  • Login into Zammad app and wait some time before scheduler start some actions with your session.

To fix crashes you need to start session from another device on same account, where timezone is not broken.

@v-starodubov
Copy link
Author

v-starodubov commented Oct 26, 2022

I have investigate more and i think the source of the problem is different. After i changed browser to Mozilla Firefox 106.0.1 (64-bit) the timezone fixed (Europe/Kyiv) i get the same blank field in Branding/Timezone.
image
And if i change something, zammad-scheduler crashes with error

/usr/local/bundle/gems/activesupport-6.1.7/lib/active_support/core_ext/time/zones.rb:100:in `rescue in find_zone!': Invalid Timezone: Europe/Kyiv (ArgumentError)

And I found that the Branding/Timezone field not Kyiv, but Kiev.
image
image

I changed my timezone with plugin to Europe/Berlin, entered zammad app, changed timezone and everything works good.

My operation system: Ubuntu 22.10.
I asked colleague with Windows 10 to check same page, he got filled timezone field with his current timezone.

@v-starodubov
Copy link
Author

@mantas
Copy link
Collaborator

mantas commented Oct 27, 2022

Looks like this is 2 separate issues. We ain't handling unknown timezones correctly. It should not crash in any case.

As for Kyiv/Kiev in the dropdown. Kiev/Kyiv in that dropdown relies on timezones data provided by your OS.

@tschaefer
Copy link
Member

@mantas We should consider to use the gem tzinfo-data as tz database, at least that would mean we are OS independent.

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

No branches or pull requests

4 participants