can anybody helps me with the code? I did the same but it catches error import React, { Component } from "react"; import firebase from "./firebase"; export default class App extends Component { constructor(props) { super(props); this.state = {}; } componentDidMount() { const messaging = firebase.messaging(); messaging .requestPermission() .then(() => { return messaging.getToken(); }) .then((token) => { console.warn("Token : ", token); }) .catch(() => { console.log("Error"); }); } render() { return this is my first fcm notification.; } }
It's working but it's not apt to receive token everytime and put in firebase console manually , can you tell how after receiving the token we can automatically send it from our react app and the only thing then we need to do is send push notifications from the console
Thanks for the instructions, but I also get a token in the console, but I don't get notifications. I did everything right from the video, I have also turn on notifications... Any update how to fix? Anyone :)
Thank you so much for this video, it really help me to solve the problem in my project!!!!!
I forked the repo, followed his tutorial exactly. no browser notification was shown. it did not work.
You using chrome? You can try to check if you have turned on notification for chrome.
Got Error : DOMException: Failed to execute 'importScripts'
The notifications are arriving correctly but when you click on them instead of opening my site it opens a blanck page how do I solve this?
It´s necessary to do a class component?
Is this notification popups every time the user browse the website ?
How do I get a notification when a change happens in Firestore?
7:30 where this 2 lines came from
you can go through description. source code is there
Firebase is easy, and it will not work in Safari, try implementing Apple push notifications xD
How can we use this in production so that we can send push notifications to all devices where our Web site is running?
Same question, this works for development but not for production
@@davidaxelgonzalezflores3536 Could you solve it?
Hello it seems that when i do yarn add firebase, i don't get a firebase route from which to import firebase, i can only install from firebase/app
it is not working for me. console log show me error
wil this token remain same or will b changed after reload ?
How do you programmatically send the notification. Say from the backend
You can setup firebase admin in your backend application
Doesn't work on ios devices?
source code ?
can anybody helps me with the code? I did the same but it catches error
import React, { Component } from "react";
import firebase from "./firebase";
export default class App extends Component {
constructor(props) {
super(props);
this.state = {};
}
componentDidMount() {
const messaging = firebase.messaging();
messaging
.requestPermission()
.then(() => {
return messaging.getToken();
})
.then((token) => {
console.warn("Token : ", token);
})
.catch(() => {
console.log("Error");
});
}
render() {
return this is my first fcm notification.;
}
}
Source code URL is fake
Registration failed - push service error I keep getting this error and everything is done correctly
Not getting any notification dude ,followed exactly same thing
But getting the token though
The probably notification is turned off in your browser
@@AVDojo No the notifications are allowed but not getting ??
It's working but it's not apt to receive token everytime and put in firebase console manually , can you tell how after receiving the token we can automatically send it from our react app and the only thing then we need to do is send push notifications from the console
@@AbhishekGanotra i am not receiving notification too, though i am getting token. (sorry it has been 1 year since you comment)
can u make a similar video on Quasar?
Will this code work for react native?
Notifications are not coming to my website
Bro ek live MERN STACK p project sikha do
Yes or no bro?? Krwaoge
Great Tutorial. How can I create notification on click?
you've to handle it differently. You need to make one Admin app to send notification
How can I create admin page?
You can check this one out rharshad.com/web-push-notifications-react-firebase/
@@AVDojo Great!
it show error in firebase
Recommended
Will this work in react native?
ofcourse
works for ios
?
thanks bro..
didn't work
You're doing something wrong
@@AVDojo I got the message that Oauth token was not authenticated or sth
Thanks for the instructions, but I also get a token in the console, but I don't get notifications. I did everything right from the video, I have also turn on notifications... Any update how to fix? Anyone :)
Possibly notification goes to Windows action center, you can. Check on bottom toolbar right-end side
👌
I got console print error
mention the exact error
@@AVDojo I can't get the token, the code execute in catch block and got error message
@@reksmeymom1428 me too
importScripts(`htt
ps://www.gstatic.com/configjs/7.13.2/firebase-firebasePushNotification.js`)
where you get this url .please tell me
fake url
Thank you so much for this video, it really help me to solve the problem in my project!!!!!