All Questions
129
questions
0
votes
1
answer
50
views
How to Handle Firebase Notifications in a Web App Embedded in a React Native WebView?
I'm working on a project where I have a React web app that is embedded within a React Native WebView. I'm using Firebase Cloud Messaging (FCM) for handling notifications. The web app works fine when ...
0
votes
0
answers
19
views
why data is not being retrieved from firestore
const HandleReadData = async () => {
let url = "[email protected]"
const q = query(collection(db, url));
const querySnapshot = await getDocs(q)
let todosArray = []
...
0
votes
0
answers
16
views
service worker takes much time to register
why service workers takes too much time to respond?
I have registered the service worker in react vite application.but it takes too much time to be registered.
Here's my service worker file (placed in ...
0
votes
1
answer
81
views
Unable to test firebase messaging on localhost
I am trying to fetch a token from firebase/messaging to use in a notification but i get "messaging/unsupported-browser" error (FirebaseError: Messaging: This browser doesn't support the API'...
0
votes
0
answers
117
views
React app FCM getToken() --> Failed to execute 'subscribe' on 'PushManager': Subscription failed - no active Service Worker
firebase-messaging-sw.js file is created successfully in the root directory.(public folder)
In this file configured background message setup's.
in my src directory I have firebase.js file.
import { ...
0
votes
1
answer
121
views
Using Firebase cloud messaging service worker with env in react js
I am trying to register a background web service from firebase cloud messaging to receive push notifications in my reactjs app.
The thing to note here is: in firebase-messaging-sw.js file, the config ...
1
vote
0
answers
123
views
Firebase Cloud Messaging: how do i get access to environment variables the public folder
i'm working on React and Firebase and i'm trying to integrate Firebase Cloud Messaging. My main challenge is passing my app credentials to the firebase-messaging-sw.js. This file is in the public ...
0
votes
0
answers
24
views
React native with firebase cloud emssaging error:
I want to implement notification feature using firebase and react native, but with this code I'm getting this error.
ERROR Error: No Firebase App '[DEFAULT]' has been created - call firebase....
0
votes
0
answers
192
views
Firebase Service worker failed to register & Service worker evaluation failed
I am using FCM, to get the device token.
I am using React for frontend.
I need to setup the service worker to make it work.
The code works fine when run in localhost, it registers the service worker ...
0
votes
0
answers
386
views
Handling and displaying notifications in React Native when app is in quitt, killed or background state
I'm working on a React Native app that needs to display notifications like that of WhatsApp and Messenger when I get an incoming call or a new message. I'm having problems handling and displaying the ...
0
votes
0
answers
85
views
Unable to register default service worker. Service worker script threw an exception during script evaluation
I'm making an application using laravel as the backend and reactjs as the frontend using inertia, I'm trying to configure push notifications/browser notification in it using FCM.
Initially, they ...
0
votes
0
answers
85
views
Why does FCM's onMessage() need to be wrapped in a Promise?
Can someone explain the reason that FCM's onMessage() does not behave in a similar manner to Firestore's onSnapshot() or Auth's onAuthStateChanged()?
The latter two start up a “listener” that remains ...
-1
votes
1
answer
307
views
Mobile browsers don't support Firebase Cloud Messaging?
I am currently developing one simple website using React.js + Firebase.
The code is almost done and I did test it a few days ago.
When I was on PC, my web worked well on almost browsers such as Chrome,...
4
votes
0
answers
372
views
React web app not receiving Firebase notifications
I'm using [email protected] to implement foreground notifications in the React web app and I do not receive any messages/notifications sent from the firebase console.
After sending a message in the ...
1
vote
0
answers
128
views
Firebase cloud messaging (web) - Service worker stops and notifications are not delivered
In my web app (react/typescript/vite), up until last week, everything was working fine.
Since today, in Firefox, only some notifications that i send to the specific app token are received, about 1 in ...