Couldn't get GCM token on device. on signed and real device

Please provide the following:

  1. SDK Version: 37.0.4
  2. Platforms(Android/iOS/web/all): Android

I have logged to expo.

I have a strange problem here. My wife I have the same phone based on Android 9 Redmi note 7.

Both phones installed expo-cli to test my application.

However on my phone await Notifications.getExpoPushTokenAsync(); returns;

Couldn’t get GCM token on the device

But my wife’s phone gives no error and returns ExpoPushToken… These phones has no differences.

How can it be ? Same code same phone… Is there a problem with my device ID ?

Now both devices returns “Couldn’t get GCM token on the device”…

I did not make any changes to this code…

  const {status: existingStatus} = await Permissions.getAsync(Permissions.NOTIFICATIONS);
        let finalStatus = existingStatus;
        console.log('current permission ' + existingStatus);
        if (existingStatus !== 'granted') {
            const {status} = await Permissions.askAsync(Permissions.NOTIFICATIONS);
            finalStatus = status;
            console.log('new permission ' + finalStatus);
        }
        if (finalStatus !== 'granted') {
            Toast.show(I18n.t('need_notifications_on'), customConstants.TOAST_CONFIG);
        } else {

                let notf_token = await Notifications.getExpoPushTokenAsync(); // I returns Couldn’t get GCM token on the device

              ......
        }

I have already logged in to expo…

any help ?

Same Issue seen by other users

Still same? is any body else with same issue ?

1 Like

Same problem here. Did follow the steps in the Using FCM for Push Notifications guide. Did login into the expo app on the phone and expo cli but no result.

Yes this code was working since one year already. No changes made. And same as Push Notifications guide . Already logged in but suddenly on some devices Notifications.getExpoPushTokenAsync() function crashes on dev. I still don’t know prod?. Cuz I am for new build because of this issue. Expo team please help

Expo team waiting for your help please

Yes, same issues here with an app I just developed this morning. Never had any issues with 3 projects I deployed similar in the past… Is this something new?

I don’t think so. I guess expo server sometimes (i don’t know this case) returns bad type result while getting Token

By the way still some devices works great.

Yeah I also facing the same isuee it’s working preety fine on sdk33 when I update it to 36 it’s hang on
Not return token. One another end did fcm notifications it’s never gonna happen
Same issue apear

Hey guys it’s working now but u need to uninstall your expo client app
You need to install this one https://d1ahtucjixef4r.cloudfront.net/Exponent-2.15.1.apk

It’s working only client not in standalone app it’s having a bug expo team member will worked for it

1 Like

we are waiting to solve this problem :slight_smile: waiting for new build to publish about 5 days :slight_smile:

1 Like

I have that same problem.

Hi vivek thanks its working with this expo-client. How ever do we have an IOS Expo update?. And also if we build in ios and android is it ok with standalone app ?

Thanks for your help

@mitu not yet but expo team will work on it to fix this bug in standalone app
Thanks

It seems expo fixed that ? Is this correct ? No more crash on IOS too. But i wonder standalone platform…

I don’t think it is fixed:
Expo version : 36
Expo client app: 2.15.0
OS: Android version 9

Expo does not create pushtoken with await Notifications.getExpoPushTokenAsync() in Apps running in the Expo client.

Dear Expo team, can you please update on issue?