# Google Login Stopped Working after manual update

**URL:** https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029
**Category:** Support
**Created:** [March 7, 2019, 9:47pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029 "2019-03-07T21:47:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![marcelocarneiro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcelocarneiro/32/101832_2.png) [@marcelocarneiro](https://meta.discourse.org/u/marcelocarneiro)
#### Post date: [March 7, 2019, 9:47pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/1 "2019-03-07T21:47:53Z")

</div>

Hello, I tried to update Discourse using /admin/upgrade but had an issue where the page stayed without any new status for a long time. I refreshed and got the “You are running an old version of the Discourse image…” page.

So I went to the machine and ran `git pull` and `./launcher rebuild app` and after some minutes I got the message that my discourse were up do date and everything were up and running.

I’m now running [v2.3.0.beta3 +81](https://github.com/discourse/discourse/compare/ccff1d2dbb8912dd0d0a990b30ad47f61af2d4fd...tests-passed).

However when I try to login with google oauth2 I get an 500 error with this generic output:

 ![42](https://global.discourse-cdn.com/meta/original/3X/1/c/1cc3ad668b66652287717e61e9f7e7532549e7ba.jpeg)

Google oauth was working since before the installation (as almost everyone from the company uses it to login), but I double checked current configuration values and actually recreated then. On log pages I got this issue:

> **Issue details**
>
> ### Message (37 copies reported)
> 
> JWT::InvalidIatError (Invalid iat) /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:48:in `verify\_iat’
> 
> ### Backtrace
> 
> /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:48:in `verify_iat' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:15:in `block (2 levels) in singleton class’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:22:in `block in verify_claims' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:20:in `each’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:20:in `verify_claims' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-google-oauth2-0.6.0/lib/omniauth/strategies/google_oauth2.rb:67:in `block in \<class:GoogleOauth2\>’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:109:in `instance_eval' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:109:in `block in compile\_stack’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:108:in `each' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:108:in `inject’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:108:in `compile_stack' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:102:in `extra\_stack’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:344:in `extra' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:351:in `auth\_hash’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:372:in `callback_phase' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-oauth2-1.6.0/lib/omniauth/strategies/oauth2.rb:75:in `callback\_phase’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:238:in `callback_call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:189:in `call!’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/omniauth-1.9.0/lib/omniauth/builder.rb:64:in `call’ /var/www/discourse/lib/middleware/omniauth\_bypass\_middleware.rb:30:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/conditional\_get.rb:25:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call’ /var/www/discourse/lib/content\_security\_policy/middleware.rb:12:in `call' /var/www/discourse/lib/middleware/anonymous_cache.rb:214:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action\_dispatch/middleware/cookies.rb:670:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active\_support/callbacks.rb:98:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action\_dispatch/middleware/debug\_exceptions.rb:61:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/logster-2.1.2/lib/logster/middleware/reporter.rb:30:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:38:in `call\_app’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:28:in `call' /var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call’ /var/www/discourse/config/initializers/100-silence\_logger.rb:29:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action\_dispatch/middleware/request\_id.rb:27:in `call' /var/www/discourse/lib/middleware/enforce_hostname.rb:17:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/method\_override.rb:22:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:14:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiler.rb:171:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/message\_bus-2.2.0/lib/message\_bus/rack/middleware.rb:57:in `call' /var/www/discourse/lib/middleware/request_tracker.rb:163:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `public\_send’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/railtie.rb:190:in `method_missing' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http\_server.rb:606:in `process_client' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:701:in `worker\_loop’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http\_server.rb:549:in `spawn_missing_workers' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:142:in `start’ /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/bin/unicorn:126:in `&lt;top (required)&gt;' /var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `load’ /var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `\<main\>’
> 
> ### Env
> 
> 1/37
> 
> hostname discourse-app  
> process\_id 239  
> application\_version ad87b0d6624ce7b9bc97d7d7f2db361789ad3779  
> HTTP\_HOST discourse.fbiz.com.br  
> REQUEST\_URI /auth/google\_oauth2/callback?state=75ea471945c40b2988f68e267650549b5c1aa949d0385aa1&code=4/BgHEtvHUJwAkq6WMJKE18cQKWIl7zI3nWoESiPUKlAnBaqqmoO5yxRWlq44Ib\_fK30uuOXs6mvAXO2-xWbTc8ls&scope=email+profile+https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email  
> REQUEST\_METHOD GET  
> HTTP\_USER\_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_13\_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36  
> HTTP\_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,_/_;q=0.8  
> HTTP\_REFERER [https://discourse.fbiz.com.br/](https://discourse.fbiz.com.br/)  
> HTTP\_X\_FORWARDED\_FOR 187.75.42.150, 172.16.128.120  
> HTTP\_X\_REAL\_IP 172.16.128.120  
> params state 75ea471945c40b2988f68e267650549b5c1aa949d0385aa1
> 
> * * *
> 
> * * *
> 
> code 4/BgHEtvHUJwAkq6WMJKE18cQKWIl7zI3nWoESiPUKlAnBaqqmoO5yxRWlq44Ib\_fK30uuOXs6mvAXO2-xWbTc8ls  
> scope email profile [https://www.googleapis.com/auth/userinfo.profile](https://www.googleapis.com/auth/userinfo.profile) [https://www.googleapis.com/auth/userin](https://www.googleapis.com/auth/userin)

Any idea what coult be causing it? I spend almost all day investigating it (from topics here to source code) but couldn’t find. Tried to rebuild app and create new oauth project, but i’m always getting this error.

---

<div class="post-metadata">

### Author: ![marcelocarneiro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcelocarneiro/32/101832_2.png) [@marcelocarneiro](https://meta.discourse.org/u/marcelocarneiro)
#### Post date: [March 7, 2019, 9:56pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/2 "2019-03-07T21:56:05Z")

</div>

> [@marcelocarneiro](#):
>
> JWT::InvalidIatError (Invalid iat) /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/jwt-2.1.0/lib/jwt/verify.rb:48:in `verify\_iat’

I was thinking that “invalid iat” could be something related to machine timezone. But literally nothing changed since our last upgrade.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 7, 2019, 10:06pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/3 "2019-03-07T22:06:19Z")

</div>

Can the you log here on Meta (or on [try.discourse.org](http://try.discourse.org)) with the same account?

---

<div class="post-metadata">

### Author: ![marcelocarneiro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcelocarneiro/32/101832_2.png) [@marcelocarneiro](https://meta.discourse.org/u/marcelocarneiro)
#### Post date: [March 7, 2019, 10:15pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/4 "2019-03-07T22:15:49Z")

</div>

Tried it here and it worked correctly.

Just to complement, just rebuilt the app and here is the output (although I think it’s not related):

> **[Discourse rebuild output](https://docs.google.com/document/d/1RuUHQpmzkH8T1M7iFNX-vAIQq6Mbz-gic0WLRvP7-r0/edit)**
>
> discourse@discourse:/var/discourse$ sudo git pull \[sudo\] password for discourse: remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4...

_put in google docs as it has high volume of text_

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 7, 2019, 10:40pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/5 "2019-03-07T22:40:26Z")

</div>

There are a bunch of `Too Many Requests` from rubygems in there.

I thought that perhaps adding a `git pull` would help, but he did a `git pull` first.

---

<div class="post-metadata">

### Author: ![marcelocarneiro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcelocarneiro/32/101832_2.png) [@marcelocarneiro](https://meta.discourse.org/u/marcelocarneiro)
#### Post date: [March 8, 2019, 6:48pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/6 "2019-03-08T18:48:34Z")

</div>

Solved it. Don’t think it was related to the upgrade, maybe it was just a coincidence. After reading [this issue](https://gitlab.com/gitlab-org/gitlab-ce/issues/5901) I got certain it was clock related. Went to the machine to double check and noticed it was 2.5 minutes behind. So the issue was with our environment ntp sync.

Just ran a `sudo timedatectl set-ntp true` and everything is fine 🙂

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 7, 2019, 6:48pm UTC](https://meta.discourse.org/t/google-login-stopped-working-after-manual-update/111029/7 "2019-04-07T18:48:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
