# Push notification errors in /logs

**URL:** https://meta.discourse.org/t/push-notification-errors-in-logs/171164
**Category:** Support
**Created:** [November 24, 2020, 3:06pm UTC](https://meta.discourse.org/t/push-notification-errors-in-logs/171164 "2020-11-24T15:06:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mentalstring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalstring/32/168934_2.png) [@mentalstring](https://meta.discourse.org/u/mentalstring)
#### Post date: [November 24, 2020, 3:06pm UTC](https://meta.discourse.org/t/push-notification-errors-in-logs/171164/1 "2020-11-24T15:06:59Z")

</div>

We are seeing the error below filling our `/logs` relatively frequently (dozens to hundreds of times per day). Other than that it seems related with push notifications, I don’t know exactly what is happening and whether it needs attention? This is with latest `stable` version.

`Failed to send push notification : host: fcm.googleapis.com, #<Net::HTTPForbidden 403 Forbidden readbody=true> body: the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console.`

> **backtrace**
>
> webpush-1.0.0/lib/webpush/request.rb:165:in `verify_response' webpush-1.0.0/lib/webpush/request.rb:32:in `perform’  
> webpush-1.0.0/lib/webpush.rb:44:in `payload_send' /var/www/discourse/app/services/push_notification_pusher.rb:79:in `send\_notification’  
> /var/www/discourse/app/services/push\_notification\_pusher.rb:25:in `block in push' activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each’  
> activerecord-6.0.3.1/lib/active\_record/relation/delegation.rb:87:in `each' /var/www/discourse/app/services/push_notification_pusher.rb:23:in `push’  
> /var/www/discourse/app/jobs/regular/send\_push\_notification.rb:7:in `execute' /var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform’  
> rails\_multisite-2.3.0/lib/rails\_multisite/connection\_management.rb:68:in `with_connection' /var/www/discourse/app/jobs/base.rb:221:in `block in perform’  
> /var/www/discourse/app/jobs/base.rb:217:in `each' /var/www/discourse/app/jobs/base.rb:217:in `perform’  
> sidekiq-6.0.7/lib/sidekiq/processor.rb:196:in `execute_job' sidekiq-6.0.7/lib/sidekiq/processor.rb:164:in `block (2 levels) in process’  
> sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:138:in `block in invoke' /var/www/discourse/lib/sidekiq/pausable.rb:138:in `call’  
> sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:140:in `block in invoke' sidekiq-6.0.7/lib/sidekiq/middleware/chain.rb:143:in `invoke’  
> sidekiq-6.0.7/lib/sidekiq/processor.rb:163:in `block in process' sidekiq-6.0.7/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch’  
> sidekiq-6.0.7/lib/sidekiq/job\_retry.rb:111:in `local' sidekiq-6.0.7/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch’  
> sidekiq-6.0.7/lib/sidekiq.rb:37:in `block in <module:Sidekiq>' sidekiq-6.0.7/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch’  
> sidekiq-6.0.7/lib/sidekiq/processor.rb:257:in `stats' sidekiq-6.0.7/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch’  
> sidekiq-6.0.7/lib/sidekiq/job\_logger.rb:13:in `call' sidekiq-6.0.7/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch’  
> sidekiq-6.0.7/lib/sidekiq/job\_retry.rb:78:in `global' sidekiq-6.0.7/lib/sidekiq/processor.rb:124:in `block in dispatch’  
> sidekiq-6.0.7/lib/sidekiq/logger.rb:10:in `with' sidekiq-6.0.7/lib/sidekiq/job_logger.rb:33:in `prepare’  
> sidekiq-6.0.7/lib/sidekiq/processor.rb:123:in `dispatch' sidekiq-6.0.7/lib/sidekiq/processor.rb:162:in `process’  
> sidekiq-6.0.7/lib/sidekiq/processor.rb:78:in `process_one' sidekiq-6.0.7/lib/sidekiq/processor.rb:68:in `run’  
> sidekiq-6.0.7/lib/sidekiq/util.rb:15:in `watchdog' sidekiq-6.0.7/lib/sidekiq/util.rb:24:in `block in safe\_thread’

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [November 25, 2020, 1:42pm UTC](https://meta.discourse.org/t/push-notification-errors-in-logs/171164/2 "2020-11-25T13:42:25Z")

</div>

Same issue here 😕

The interesting thing if our Members disable and enable again the push notifications on android then it works a few days correctly but after that we have a lots of warning in logs ⬇ and the notifications stop working.

```
Failed to send push notification : host: fcm.googleapis.com, #<Net::HTTPForbidden 403 Forbidden readbody=true>
body:
the key in the authorization header does not correspond to the sender ID used to subscribe this user. Please ensure you are using the correct sender ID and server Key from the Firebase console.

```

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [December 9, 2020, 5:46pm UTC](https://meta.discourse.org/t/push-notification-errors-in-logs/171164/3 "2020-12-09T17:46:32Z")

</div>

Now it worked for me good for 2 weeks and after rebuild it again stop working. So I think this cause somehow the rebuild app process. When i upgrade on admin section it works great after that. Now the only thing which can fix the android push is that Members disable and enable it again. And it will works until the next rebuild.

Is that possible the rebuild causing this issue?

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [October 25, 2021, 4:43am UTC](https://meta.discourse.org/t/push-notification-errors-in-logs/171164/4 "2021-10-25T04:43:33Z")

</div>

> [@Don](#):
>
> Is that possible the rebuild causing this issue?

Yes that was the problem on our forum. Every time I rebuild the app the push notifications stoped work. But now it seem to resolved on our forum. I rebuild for the third time and the push notifications still works great. 😍 I don’t know what was the problem but thank you so much for the fix! 🙂
