Firebase cloud messaging is failing with UNKNOWN_ERROR

270 views
Skip to first unread message

Hossan Mohammad Zubayer

unread,
Sep 10, 2024, 1:35:42 PMSep 10
to Chromium Extensions
Dear All, I am facing issues with registering with FCM app from Google Chrome extension. The chrome://gcm-internals show the registration is failing after 5 to 10 minutes with UNKNOWN_ERROR. Chrome runtime error message "Server error occured" I am using sender id of my project, the code:
chrome.gcm.register([fcmSenderId], registrationId => { })
The registration was working until July 4th, after which I took a break in using the app, now it is not registering anymore. I am using chrome version of 128. Anyone have a clue or where I can look for answers?

Patrick Kettner

unread,
Sep 10, 2024, 1:40:51 PMSep 10
to Hossan Mohammad Zubayer, Chromium Extensions
Hello Hossan,
Apologies, the docs are in the process of being updated. chrome.gcm.register was deprecated last year, and the backend server that was supporting it was turned down several weeks ago. You can replace it with chrome.instanceID.getToken. That would look like

const token = await  chrome.instanceID.getToken({
    authorizedEntity: '<firebase sender id>', 
    scope: "GCM"
  })

patrick
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/17434cf0-e58e-4a44-b9a1-54fd0736947en%40chromium.org.

Hossan Mohammad Zubayer

unread,
Sep 10, 2024, 2:43:11 PMSep 10
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Hossan Mohammad Zubayer
Thank you
Reply all
Reply to author
Forward
0 new messages