Session Timeout SSO after rebuild from Backup

I’m trying to move my Discourse to a new machine and rebuilding Discourse from a backup works, but I can’t login (neither admin nor user) because I’ll get Session Timeout messages every time. Can someone please help me in debugging the problem, because I don’t know/find where to look for the right logs or settings?

So far I tried clearing browser cache and cookies, resetting the timezones of the host, the docker container and the SSO provider to the same timezone again, disabling DiscourseConnect via rails console and trying to login vi local logins.

Thank you!

I’m still stuck with this problem. I’m always getting SSO “Nonce has expired” messages and don’t know how debug this. As SSO provider I use a Nextcloud instance with this app, which always worked fine.

I ḿ posting here one example of the production.log:

Started GET "/" for [...] at 2021-09-26 21:13:14 +0200
Processing by ListController#latest as HTML
Redirected to [...]/session/sso
Filter chain halted as :redirect_to_login_if_required rendered or redirected
Completed 302 Found in 4ms (Allocations: 875)
Started GET "/session/sso" for [...] at 2021-09-26 21:13:14 +0200
Processing by SessionController#sso as HTML
Verbose SSO log: Started SSO process

add_groups: 
admin: 
moderator: 
avatar_force_update: 
avatar_url: 
bio: 
card_background_url: 
email: 
external_id: 
groups: 
locale: 
locale_force_update: 
logout: 
name: 
nonce: c6d02e05adc989f6b4729988bb781834
profile_background_url: 
remove_groups: 
require_activation: 
return_sso_url: [...]/session/sso_login
suppress_welcome_message: 
title: 
username: 
website: 
location: 
Redirected to [Nextcloud]/index.php/apps/discoursesso?sso=bm9uY2U9YzZkMDJlMDVhZGM5ODlmNmI0NzI5OTg4YmI3ODE4MzQmcmV0dXJuX3Nzb191cmw9aHR0cHMlM0ElMkYlMkZmb3J1bXMuZmFocndlcmsuaW8lMkZzZXNzaW9uJTJGc3NvX2xvZ2lu&sig=c71b843f658cbb948877ae1981c4b0d580fdc855d10e3d53d07150cfe9b97fb2
Completed 302 Found in 23ms (Allocations: 1696)
ActionController::RoutingError (No route matches [GET] "/service-worker-c8000968830b6f6bd33f1e842dffdd569664119d449f93dc7d428d963a71635d.js")
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:187:in `call'
Started GET "/session/sso_login?sso=bm9uY2U9YzZkMDJlMDVhZGM5ODlmNmI0NzI5OTg4YmI3ODE4MzQmZXh0ZXJuYWxfaWQ9bWFyaXVzNTYmZW1haWw9bWFyaXVzNTYlNDBwcnRyYy5uZXQmdXNlcm5hbWU9bWFyaXVzNTYmbmFtZT01NitNYXJpdXMmdGl0bGU9JmFkZF9ncm91cHM9RGF0ZW5zY2h1dHolMkNJVC1BRyUyQ0t1cmllciUyQWluJTJDTWFya2V0aW5nLUFHJTJDVmVybmV0enVuZ3MtQUclMkNaaWVsZS1TdHJhdGVnaWVuLUFHJTJDJnJlbW92ZV9ncm91cHM9QWx1bW5pJTJDQXJiZWl0c3BsYXR6JTJDQXJiZWl0c3NjaHV0eiUyQ0F1dG8tQUclMkNBd2FyZW5lc3MtQUclMkNCdWNoaGFsdHVuZ3MtQUclMkNDaGVmJTJDRGlzcG8tQUclMkNGdW5rZW4tQUclMkNHYXN0JTJDSHViLUFHJTJDS29sbGVrdGl2aXN0YSUyQ0xhc3RlbnJhZC1BRyUyQ1BlcnNvbmFsLUFHJTJDUGxlbnVtcy1BRyUyQ1Byb2t1cmlzdGVuJTJDU09yZ2EtQUclMkNTY2hpY2h0cGxhbi1BRyUyQ1N0cnVrT3JnYS1BRyUyQ1N5c3RlbW51dHplciUyQ1ZlcmVpbiUyQ1ZlcmVpbnMtQUclMkNWZXJlaW5zdm9yc3RhbmQlMkNhZG1pbiUyQyZncm91cHM9RGF0ZW5zY2h1dHolMkNJVC1BRyUyQ0t1cmllciUyQWluJTJDTWFya2V0aW5nLUFHJTJDVmVybmV0enVuZ3MtQUclMkNaaWVsZS1TdHJhdGVnaWVuLUFHJTJDJmF2YXRhcl9mb3JjZV91cGRhdGU9&sig=9647e86fcb319ad785979a0c91d768f9c406bf305069d2fe2ccd68d10fbb811b" for [...] at 2021-09-26 21:13:38 +0200
Processing by SessionController#sso_login as HTML
  Parameters: {"sso"=>"bm9uY2U9YzZkMDJlMDVhZGM5ODlmNmI0NzI5OTg4YmI3ODE4MzQmZXh0ZXJuYWxfaWQ9bWFyaXVzNTYmZW1haWw9bWFyaXVzNTYlNDBwcnRyYy5uZXQmdXNlcm5hbWU9bWFyaXVzNTYmbmFtZT01NitNYXJpdXMmdGl0bGU9JmFkZF9ncm91cHM9RGF0ZW5zY2h1dHolMkNJVC1BRyUyQ0t1cmllciUyQWluJTJDTWFya2V0aW5nLUFHJTJDVmVybmV0enVuZ3MtQUclMkNaaWVsZS1TdHJhdGVnaWVuLUFHJTJDJnJlbW92ZV9ncm91cHM9QWx1bW5pJTJDQXJiZWl0c3BsYXR6JTJDQXJiZWl0c3NjaHV0eiUyQ0F1dG8tQUclMkNBd2FyZW5lc3MtQUclMkNCdWNoaGFsdHVuZ3MtQUclMkNDaGVmJTJDRGlzcG8tQUclMkNGdW5rZW4tQUclMkNHYXN0JTJDSHViLUFHJTJDS29sbGVrdGl2aXN0YSUyQ0xhc3RlbnJhZC1BRyUyQ1BlcnNvbmFsLUFHJTJDUGxlbnVtcy1BRyUyQ1Byb2t1cmlzdGVuJTJDU09yZ2EtQUclMkNTY2hpY2h0cGxhbi1BRyUyQ1N0cnVrT3JnYS1BRyUyQ1N5c3RlbW51dHplciUyQ1ZlcmVpbiUyQ1ZlcmVpbnMtQUclMkNWZXJlaW5zdm9yc3RhbmQlMkNhZG1pbiUyQyZncm91cHM9RGF0ZW5zY2h1dHolMkNJVC1BRyUyQ0t1cmllciUyQWluJTJDTWFya2V0aW5nLUFHJTJDVmVybmV0enVuZ3MtQUclMkNaaWVsZS1TdHJhdGVnaWVuLUFHJTJDJmF2YXRhcl9mb3JjZV91cGRhdGU9", "sig"=>"9647e86fcb319ad785979a0c91d768f9c406bf305069d2fe2ccd68d10fbb811b"}
Verbose SSO log: Nonce has expired

add_groups: [...]
admin: 
moderator: 
avatar_force_update: 
avatar_url: 
bio: 
card_background_url: 
email: [...]
external_id: [...]
groups: [...]
locale: 
locale_force_update: 
logout: 
name: [...]
nonce: c6d02e05adc989f6b4729988bb781834
profile_background_url: 
remove_groups: [...]
require_activation: 
return_sso_url: 
suppress_welcome_message: 
title: 
username: [...]
website: 
location: 
  Rendered session/sso_login.html.erb within layouts/no_ember (Duration: 0.9ms | Allocations: 64)
  Rendered layout layouts/no_ember.html.erb (Duration: 54.8ms | Allocations: 5736)
Completed 419  in 73ms (Views: 56.7ms | ActiveRecord: 0.0ms | Allocations: 7600)

It’s only 24sec between starting SSO process/creation of nonce and providing the sso parameters. Anyone any idea where I could look for errors/problems/better debug info?