Fetching the token failed

SDK Version: 38

Error: Fetching the token failed: Given string is empty or null

The app is asking for permission and after giving permission it is being ‘granted’ successfully. Next I am using let token = await Notifications.getExpoPushTokenAsync() to get the token but it returns anything.

Working on expo but standalone app not working.

My application was working fine with SDK 36, but when I switched to SDK 38, I started having this problem.

Can anyone help? Thanks.

Hey @enesy,

What platform is this occurring on? If Android, can you make sure you’ve followed the guide here: https://docs.expo.io/versions/v38.0.0/sdk/notifications/#android

Cheers,
Adam

after following the guide the error persists

Error: Fetching the token failed: MISSING_INSTANCEID_SERVICE

SDK39

get same issue on android 10, sdk 38

Maybe you live in mainland China.
I have checked this issue on Android device outside mainland China.
Everything runs ok.
So, I think The Firewall blocked the Google firebase notification service.

Check the apps with permission to read location all the time. If there are apps which have permission to access location all the time, change it to “only when app is in use”. If the problem persists, let me know.