Firebase Notification is received at local but not received at server

261 views
Skip to first unread message

Kubilay Bayraktar

unread,
Feb 3, 2023, 10:26:08 AM2/3/23
to Firebase Google Group
Our application is .net core api backend and reactjs frontend and hosted in Azure. We have implemented firebase CM for both applications. Client sends token to api to receive notification and api sends notifications. Once we test local it works as expected but same code/application is not working at server. I have logged the response and response status 200 and succeed 1 and got a message_id We are stuck at the moment! What is missing? Any idea?

Arthur Thompson

unread,
Feb 3, 2023, 12:48:37 PM2/3/23
to fireba...@googlegroups.com
Hi Kubilay,

It would be helpful if you included how you were setting up your reactjs application to receive the notification. Since you are getting a 200 on sending to the token that suggests that you are generating a valid token and sending to it correctly. If you share your receiving setup on the client side we may be able to recommend something.

On Fri, Feb 3, 2023 at 7:25 AM Kubilay Bayraktar <kubilay....@metus.com> wrote:
Our application is .net core api backend and reactjs frontend and hosted in Azure. We have implemented firebase CM for both applications. Client sends token to api to receive notification and api sends notifications. Once we test local it works as expected but same code/application is not working at server. I have logged the response and response status 200 and succeed 1 and got a message_id We are stuck at the moment! What is missing? Any idea?

--
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/d2f9528a-6d2d-4be1-a40b-e14ffaf302bcn%40googlegroups.com.

Kubilay Bayraktar

unread,
Feb 3, 2023, 5:31:06 PM2/3/23
to Firebase Google Group
Here is reactjs code which we register in service worker;
And then core api code

reactjs code
rjs.png
core api;
capi.png

Arthur Thompson

unread,
Feb 3, 2023, 6:35:53 PM2/3/23
to fireba...@googlegroups.com
Thanks for sharing. I did not see any code requesting permission to display a notification. You must request this permission before you can display a notification on the web.

Kubilay Bayraktar

unread,
Feb 4, 2023, 11:12:07 AM2/4/23
to fireba...@googlegroups.com
Hi,
I've talked to our frontend team they also send those codes;
By the way, let me tell you that they say we allow notifications that's why chrome displays notification pop up when we visit the site.
And yes, when we visit the site allow notification popup appears.
Can you check the below codes if there are any missing configurations?
image.png
image.png

You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/vQpO7RU6WYY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CANXaM1o%3DRu41RWWH2XyqjfhPauuYJjFSN5kb6hNV0duG1%3Doh9w%40mail.gmail.com.


--


E-mail imza Metus Logo

Silicon Valley | Skopje |  Istanbul

Tel: +90 532 404 86 15  |  www.metus.com | Legal Disclaimer

Arthur Thompson

unread,
Feb 8, 2023, 12:18:01 PM2/8/23
to fireba...@googlegroups.com
Hi,

The configuration looks good to me. It looks like you are using v9 of the JS SDK for token generation and compat version of the JS SDK for the service worker. Is it possible for you to use v9 for both?

Arthur Thompson

unread,
Feb 8, 2023, 1:45:50 PM2/8/23
to fireba...@googlegroups.com
Correction: your current configuration is correct since service worker doesn't fully support es module.

Do you see the log of the message being received?:

"Received background message ..."

Kubilay Bayraktar

unread,
Feb 13, 2023, 10:54:22 AM2/13/23
to Firebase Google Group
The thing is I receive message when notification appears but not receive message when notification also not received!
This code is working at local, but when it is deployed to Azure it is not triggered somehow. 
firebase.png
Reply all
Reply to author
Forward
0 new messages