Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Error response message: 401: Auth error from APNS or Web Push Service

11,364 views
Skip to first unread message

Jerry Chen

unread,
Jul 26, 2019, 7:52:44 AM7/26/19
to Firebase Google Group
Hi, we have adopting FCM for years and it works quite good.
Recently, we just received the 401 issue for our APNs type FCM request.

{
  "error": {
    "code": 401,
    "message": "Auth error from APNS or Web Push Service",
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
        "errorCode": "THIRD_PARTY_AUTH_ERROR"
      }
    ]
  }
}

we got few times of this exception response from FCM when sent request for our iOS notification on 6/12(1 time) and since 7/17... for many times(hundreds) every day (most of our requests are still success).
i have tried to search for similar case on internet and stack overflow, and no luck.

does anyone have this similar known issue? thanks a lot :)

Brandon Pearcy

unread,
Jul 30, 2019, 9:04:27 AM7/30/19
to Firebase Google Group
JFYI: You're not alone, but unfortunately I don't know the cause or how to resolve!  I saw this error for the first time on 07/10 (6x times) and then from 07/19 a few times per day. Our notification volume is quite small, but we weren't having any problems with iOS notification delivery until recently.

Kato Richardson

unread,
Jul 31, 2019, 10:00:48 AM7/31/19
to Firebase Google Group
Hi Jerry, Brandon,

This error message is documented
THIRD_PARTY_AUTH_ERROR(HTTP error code = 401) APNs certificate or web push auth key was invalid or missing.

Given that this is intermittent and rare, an initial guess is that there is an edge case where the auth key expires and is being refreshed as the notification is sent--some sort of race condition. I'm not very familiar with iOS so I don't know the details of how the web push auth key is generated, but hopefully that's a good starting point?

(For others experiencing permanent errors of this sort, here is a more relevant thread.)

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a44413d9-e314-4d14-8c5c-860ed1f72a1c%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Nicolas LAMY

unread,
Aug 2, 2019, 4:37:24 AM8/2/19
to Firebase Google Group
Hi, 

I have the same problem, It started today wheras it was working before... my certificates did not expire. Is this a more global problem ? What can we do ? It happens for all my iOS notifications, android is fine.

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.

Moritz Z.

unread,
Aug 2, 2019, 4:37:24 AM8/2/19
to Firebase Google Group
We are running into the same issue.

After I uploaded a new APNs Key to firebase it work for a few days then we get that 401 error again.
It is weird because we are still able to notify the devices through the firebase console but if are server tries it.

Jerry Chen

unread,
Aug 6, 2019, 9:59:08 AM8/6/19
to Firebase Google Group

FYI. after few days test, we found you can try to send it again after few seconds when seeing this issue.

@Kato, thanks for your reply. the issue is pretty weird and retry just works. We are using the non-expired key solution from Apple (not a certificate). 

Kato Richardson

unread,
Aug 8, 2019, 4:28:56 PM8/8/19
to Firebase Google Group
Yep, that matches my thoughts about an expired token and some sort of race condition where it expires just as the send occurs. 

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/497b0c60-dada-413e-82f1-afa187e6917f%40googlegroups.com.

Charles Talbot

unread,
Feb 9, 2023, 2:34:34 PM2/9/23
to Firebase Google Group
I am seeing a similar issue, although no requests are successful, all are failing with 401 errors. I have refreshed APNS certs for both dev and prod, but no success. Any thoughts?

Charles Talbot

unread,
Feb 9, 2023, 2:34:34 PM2/9/23
to Firebase Google Group
Hey all, I'm seeing something similar coming up for my app. I needed to refresh APNS certs for iOS, and did so. Two weeks later notification are failing with 401 errors. Confirmed and re-uploaded certs but no luck yet. Any thoughts? Does firebase cache these certs somehow? I don't see much in the way of troubleshooting docs for my issue! currently no notifications will go through :((

On Thursday, August 8, 2019 at 4:28:56 PM UTC-4 kato...@google.com wrote:

Alexey

unread,
Dec 6, 2024, 10:23:09 AM12/6/24
to Firebase Google Group
The same status as Charles has: 
  1. got 401: Auth error from APNS or Web Push Service
  1.  refreshed APNS certs for both dev and prod
  1. No success...
Can not send any notifications for IOS devices ... appreciate any help

Reply all
Reply to author
Forward
0 new messages