Unhandled promise reject at getExpoPushTokenAsync

Please provide the following:

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

After I run getExpoPushTokenAsync, I get the following error

[Unhandled promise rejection: Error: Error encountered while fetching Expo token, expected an OK response, received: 400 (body: "{"errors":[{"code":"VALIDATION_ERROR","message":"The Expo push notification service is supported only for Expo projects. Ensure you are logged in to your Expo developer account on the computer from which you are loading your project.","isTransient":false}]}").]

Logging into expo seems to fix the issue. However, when I deploy the stand-alone app to TestFlight or Google App store, will this work? I don’t expect my users to have an expo account, so will they have the same issue?

sign in to your account.

expo login

it will work fine on the app store / play store, yes

1 Like

When is expo login run on the App Store build? Do I have to add that logic or is it done by expo automatically. Also, does it create temporary accounts for non expo users in the App Store build?

Is there any documentation on how it works for stand alone builds?

this is only used for the developer serving the app. you need to log in to run the build / publish and to serve the app in development if you interact with expo services (like push). no need for any of the users of the app to be signed in or even know that expo exists

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.