expo-notifications failing to get token
See original GitHub issueSummary
I am having issues with expo-notifications.
So I created a blank project with the expo init command, created a managed workflow, and installed expo notifications via expo install.
Then I copied the registerForPushNotificationsAsync
from here, used it in a useEffect
hook and got the following error:
[Unhandled promise rejection: Error: Fetching the token failed: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED]
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
45
Environment
expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.22000 Binaries: Node: 16.16.0 - C:\Program Files\nodejs\node.EXE npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD npmPackages: expo: ~45.0.0 => 45.0.6 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 Expo Workflow: managed
Reproducible demo
https://docs.expo.dev/versions/latest/sdk/notifications/#api
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:63 (8 by maintainers)
I still keep getting this problem. asap update pleeeese
I found a workaround for this issue. If the problem is that expo-notifications can’t find the projectID, just supply it:
This is working for me, and will enable me to keep developing and testing my notifications code, although I don’t feel like it should be necessary for production code, and I’m hoping that a proper fix is on the way.