-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error NoCredentials and Unable to Register Devices for Push Notifications #13240
Comments
Possible source of issue: It seems initializePushNotifications() is ultimately calling await fetchAuthSession() from @aws-amplify/core. This call is failing as no user's are currently logged in. I am using the Amplify UI Authenticator for React Native, which is loaded to log the user in AFTER initializePushNotifications() has already been called....
My configuration is similar (App.js).
|
Hello, @SwhiteMHC and thanks for opening this issue. To your point that |
The invocation order was the problem. I needed to reorganize my code to ensure initializePushNotifications() was fired within my AuthenticationGateway component. You can feel free to close. Thank you. |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication, Analytics, Push Notifications
Amplify Version
v6
Amplify Categories
auth, analytics, notifications
Backend
Amplify CLI
Environment information
Describe the bug
Devices fail to register their token with Amazon Pinpoint.
Expected behavior
Devices successfully register with Amazon Pinpoint, allowing for push notifications to be sent to the device.
Reproduction steps
N/A
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
Manual configuration
Additional configuration
Mobile Device
iPhone SE 2020
Mobile Operating System
iOS 17.2
Mobile Browser
N/A
Mobile Browser Version
N/A
Additional information and screenshots
The text was updated successfully, but these errors were encountered: