question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push notifications for Standalone Android do not work

See original GitHub issue

Environment

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.

snack: https://snack.expo.io/HJFH2l95f

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:27 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
nicknovitskicommented, Mar 28, 2018

I can say that we have been able to sporadically reproduce the problem and we are investigating it further.

6reactions
AdamJNavarrocommented, Mar 28, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo Push Notification not working on standalone app
If you are using Expo server to send Push notification, make sure to follow the steps "Upload Server Credentials".
Read more >
Push Notifications Troubleshooting & FAQ
Push notifications occasionally stop coming through on Android. This is likely due to the priority level of the notifications you're sending. You can...
Read more >
Not receiving notifications for Pushover messages or device ...
Open the main Settings app on your device, then tap on Notifications and make sure that its Do Not Disturb mode is not...
Read more >
Troubleshooting Android chat push notifications in Sendbird
User is not offline: It's easiest to test push notifications when your user is offline and the app is not in the foreground...
Read more >
Push Notification Troubleshooting for Android - Braze
For FCM push to work, Google Play Services must be present on the device. If Google Play Services isn't on a device, push...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found