Unable to get user expo push token, allow notifications gets insta denied on standalone app (apk) but expo go works fine

Hello everyone, i have a simple function that i got from expo docs to get the user expo push token, but everytime it runs gets insta denied, even when it prompts and i allow notifications im unable to get the user token because on the app its still denied and “canAskAgain” is always false. I have a button that calls the following code:

async function registerForPushNotificationsAsync() {
let token;

if (Platform.OS === ‘android’) {
await Notifications.setNotificationChannelAsync(‘default’, {
name: ‘default’,
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: ‘#FF231F7C’,

if (Device.isDevice) {
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== ‘granted’) {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
if (finalStatus !== ‘granted’) {
alert(‘Failed to get push token for push notification!’);
token = (await Notifications.getExpoPushTokenAsync({ projectId: “MyProjectId” })).data;
} else {
alert(‘Must use physical device for Push Notifications’);


Any help is really appreciated