Bug #37069
closedAfter Foreman installation login page respond with "Invalid Timezone: Etc/Unknown"
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2254976
Description of problem:
Upon attempting to login, an error is displayed referring to Invalid Timezone: Etc/Unknown
Actual results:
Login page reply with :
"Oops, we're sorry but something went wrong Invalid Timezone: Etc/Unknown"
Additional info:
Checking the /var/log/foreman/production.log
2023-12-18T12:00:04 [I|app|06ffc943] Started GET "/users/login" for 10.45.225.10 at 2023-12-18 12:00:04 +0100
2023-12-18T12:00:04 [I|app|06ffc943] Processing by UsersController#login as HTML
2023-12-18T12:00:04 [W|app|06ffc943] Invalid Timezone: Etc/Unknown
2023-12-18T12:00:04 [I|app|06ffc943] Backtrace for 'Invalid Timezone: Etc/Unknown' error (ArgumentError): Invalid Timezone: Etc/Unknown
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:100:in `rescue in find_zone!'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:82:in `find_zone!'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:42:in `zone='
06ffc943 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:9:in `set_timezone'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
06ffc943 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
06ffc943 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
Checking on
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:9:in set_timezone'
def set_timezone
default_timezone = Time.zone
client_timezone = User.current.try(:timezone) || cookies[:timezone]
Time.zone = client_timezone if client_timezone.present?
so the "Etc/Unknown" is either coming from User.current.timezone or cookies[:timezone]
I have tried to clean my coockies on Chrome but didn't works. Using Firefox I can login properly .
Updated by The Foreman Bot 10 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10000 added
Updated by Oleh Fedorenko 8 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|be92fd218d4ff60e665643530ff366fd0d81fbb1.
Updated by The Foreman Bot 8 months ago
- Pull request https://github.com/theforeman/foreman/pull/10103 added
Updated by Ewoud Kohl van Wijngaarden 4 months ago
- Subject changed from After Foreman installation login page respond with "Invalid Timezone: Etc/Unknown" to After Foreman installation login page respond with "Invalid Timezone: Etc/Unknown"
- Triaged changed from No to Yes
- Fixed in Releases deleted (
3.11.0)