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
No Credentials Generated for Android Device and No Error #13277
Comments
Hello, @SwhiteMHC. I've got a couple of suggestions to see if we can unblock you here and determine the root cause. Also, the |
Hi @cwomack That worked in the minimally reproducible example. However, I recreated this example app because of an issue with another application. Making this change in the other application does not solve the problem. I have been digging into the code and observe this:
Interesting enough. I can take the token from the onHostResume() and test the push notification using Amazon Pinpoint Test Messaging, and the device successfully receives the notification.
Any thoughts? |
@SwhiteMHC, are you using Expo Go by chance? And if I'm understanding the above comment properly, it worked in the sample app you provided to make the changes suggested? As for the other application that's experiencing this problem, are you able to share a sample repo or code that can be reviewed there as well? |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Push Notifications
Amplify Version
v6
Amplify Categories
auth, notifications
Backend
Amplify CLI
Environment information
Describe the bug
onTokenReceived event, and subsequently the handler, never fires when running on an Android Device.
Expected behavior
onTokenReceivedHandler receives new token, and token is accessible for storage and registration with Amazon Pinpoint.
Reproduction steps
I followed the setup instructions for AWS-Amplify Push Notifications for a completely new React-Native-CLI project: https://docs.amplify.aws/react-native/build-a-backend/push-notifications/set-up-push-notifications/
Minimal Reproducible Example: https://github.com/SwhiteMHC/amplify-fail-android
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
Amplify.configure({
Auth: {
Cognito: {
userPoolId: '',
userPoolClientId: '',
identityPoolId: '',
},
},
Notifications: {
PushNotification: {
Pinpoint: {
appId: '',
region: '',
},
},
},
Analytics: {
Pinpoint: {
appId: '',
region: '',
},
},
});
Additional configuration
Mobile Device
Galaxy A14 5G
Mobile Operating System
Android 14
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
The text was updated successfully, but these errors were encountered: