react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

FCM getToken always returning null and no notifications are received on Android

Open victorsferreira opened this issue 8 years ago • 5 comments

"react": "16.2.0", "react-native": "^0.52.0", "react-native-firebase": "^3.2.2", Platform: Android

I'm developing this app that will receive notifications from Firebase. After one week of development I stoped receiving new notifications. So I started debugging and I realized that the token it gets is always null now. Notifications are not received anymore.

The anonymous signin is alright, I get an UID but no token and no messages from Firebase.

Anyone knows what could be happening?

firebase.auth().signInAnonymously()
.then((signin) => {
    //signin is alright
    fcm.getToken()
    .then(token => {
        //token is null. Nothings happens after that
    });
});

victorsferreira avatar Jan 19 '18 21:01 victorsferreira

fcm.getToken() -> what is this and where is it coming from? Could you provide full example of code, thanks.

Salakar avatar Jan 21 '18 12:01 Salakar

i have exactly the same problem

AmirTahani avatar Jan 23 '18 09:01 AmirTahani

We need more information to be able to help with this further. Please re-open with the information requested.

chrisbianca avatar Jan 31 '18 12:01 chrisbianca

is there any solution? i have same problem here

Heru6664 avatar Mar 25 '19 10:03 Heru6664

Some news? I have a same problem, firebase.messaging().getToken() still return null if I have permissions or not

Johny8811 avatar Sep 06 '19 12:09 Johny8811