Please set your project ID. A valid Firebase project ID is required
See original GitHub issueš Bug Report
Summary of Issue
Hello everyone, Iām getting this error only on Android production app.
Environment - output of expo diagnostics
& the platform(s) youāre targeting
Expo CLI 3.27.13 environment info: System: OS: macOS 10.15.7 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.3 - ~/.nvm/versions/node/v12.16.3/bin/node Yarn: 1.22.4 - ~/.nvm/versions/node/v12.16.3/bin/yarn npm: 6.14.4 - ~/.nvm/versions/node/v12.16.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: API Levels: 27, 29 Build Tools: 28.0.3, 29.0.0 System Images: android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-R | Google APIs Intel x86 Atom IDEs: Android Studio: 3.6 AI-192.7142.36.36.6308749 Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild npmPackages: expo: ~39.0.3 => 39.0.3 react: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2 Expo Workflow: managed
Reproducible Demo
`Unable to provide. It only happens on production App.
Steps to Reproduce
Expected Behavior vs Actual Behavior
Iām expecting to get the token, but the call for get it throws error:
This is the function that should return the token, but Notifications.getExpoPushTokenAsync() throw error.
The error is š
Encountered an exception while calling native method: Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager: Please set your project ID. A valid Firebase project ID is required to communicate with Firebase server APIs: it identifies your project with google.
Iām not using Firebase. So i have no idea where to take this ID.
I thought that the params in the getExpoPushTokenAsync() function, were optional.
The weird is that if i run the App through the command Expo start, in dev. the function correctly returns the token.
How to solve this ?
Thanks in advance
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
The Firebase project and your app identifier donāt need to match, do you have a link to the docs where it says that? You still have to set a package identifier in your Firebase project when connecting it to Android app or push notifications. But that should be pretty straight forward and relevant only when asked.
Iām going to close this now because I donāt think this is a bug or an issue with the notifications. If you still have questions about this, feel free to ask them on Slack or the forums.
Hope this helps!
set your api key on expo
if you have new token function
set config of ios and android on root project