Default FirebaseApp is not initialized in this process

Hello,

I am testing Expo PushNotifications with my physical device (not in Expo App).

Expo SDK: 38.0.9
React Native: “0.62.2”
Expo-notifications": “0.6.0”
Platform: Android

app.json:

“android”: {
“useNextNotificationsApi”: true,
}

My code:

```
import * as Notifications from ‘expo-notifications’;
import * as Permissions from ‘expo-permissions’;

const token = await Notifications.getExpoPushTokenAsync();
```

Unfortunately, I keep getting the following error:

Error: Encountered an exception while calling native method: Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager: Default FirebaseApp is not initialized in this process com.{appname}. Make sure to call FirebaseApp.initializeApp(Context) first.

Did I miss something? Do I need to initialize FirebaseApp when using ExpoNotifications?
Are there any alternatives to Firebase?

In the Expo app, everything just works fine.

Thanks a lot!

Please help!
I have set up everything as told here https://docs.expo.io/push-notifications/push-notifications-setup/ and here https://docs.expo.io/push-notifications/using-fcm/ , but am still facing the problem.

Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager: Default FirebaseApp is not initialized in this process com.{appname}. Make sure to call FirebaseApp.initializeApp(Context) first

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