Push notifications for Standalone Android do not work
See original GitHub issueEnvironment
Environment: OS: Linux 3.16 Node: 9.8.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: N/A Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed) expo: ^23.0.0 => 23.0.1 react: 16.0.0 => 16.0.0 react-native: https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz => 0.50.3
Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/jozsef-b2629d43-26e8-4f22-baf2-dd8a97831e72.tar.gz
Standalone running on Samsung Galaxy s8
Steps to Reproduce
When the applications starts, the user is asked to log in. An expo push token is created and sent to backend. To rule out any backend issues, I grab the token and call the expo server directly via Postman to send a notification.
Expected Behavior
The android device should get a notification
Actual Behavior
The device is not receiving any notifications. Expo server first responds with 200 OK, then after a few tries it responds:
{
"data": [
{
"status": "error",
"message": "SNS failed to send the notification (reason: EndpointDisabled, status code: 400).",
"details": {
"error": "DeviceNotRegistered",
"sns": {
"statusCode": 400,
"reason": "EndpointDisabled",
"__message": "Endpoint is disabled"
}
}
}
]
}
The app is granted permissions otherwise the code would not have generated the push token. The app does however not prompt for permission, as if a grant from a previous installation is still being in use.
I have tried:
- clearing expo data
- reinstalling expo
- reinstalling standalone app
- rebuilt the standalone app with different package names, and different slug
- rebuilt the standalone app with declared permissions in the app.json:
"permissions": [
"CAMERA",
"ACCESS_FINE_LOCATION",
"com.google.android.c2dm.permission.RECEIVE",
"READ_EXTERNAL_STORAGE",
"READ_INTERNAL_STORAGE"
]
Everything works well running in Expo, as soon as i build the standalone apk it no longer works.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:27 (6 by maintainers)
I can say that we have been able to sporadically reproduce the problem and we are investigating it further.
Hey guys,
We’re aware of this issue and are sorry for the inconveniences it has caused. Unfortunately, with SDK26 being released this week our resources and time are limited and sharply focused on the release. It may be a couple of days before we’re able to dig in and resolve this issue.
Adam