Bug/Error with expo push notifications on android?


#1

Hi there.

I am having some issues sending push notifications to android

In order to make sure I had a clean push token, I deleted the app from the device and reinstalled the app(standalone)
This created a brand new push token.
All fine.

I have then tried to dispatch the push notification:

{
  "to": "ExponentPushToken[dgbW_nEUW-Yp9WpWiLpBIu]",
  "sound": "default",
  "body": "Hello world!"
}

This is what I got:

{
    "data": {
        "status": "ok"
    }
}

At this point I did not received the push notification.

When I tried to send another one, this is what I got:

{
    "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"
            }
        }
    }
}

Does anyone have a clue what could be happening?
(ios is working fine)


#2

issue happening to other people: https://github.com/expo/expo/issues/1330

Please guys, can someone help me with this?


#3

Hi! Sorry about this issue. We’ve been working hard on a fix but it unfortunately required a lot of changes on our end. We just put up a guide on using FCM for push notifications which should fix the problem: https://docs.expo.io/versions/latest/guides/using-fcm. Please let us know if you run into problems with the new system and sorry for the trouble.


#4

hi.
I have tried to follow your FCM guide,
but when trying to build android, I am getting a fail:
Parsing json file: /src/exponent/android-shell-app/app/google-services.json :app:processProdReleaseGoogleServices FAILED [stderr] FAILURE: Build failed with an exception. [stderr] * What went wrong: [stderr] Execution failed for task ‘:app:processProdReleaseGoogleServices’. [stderr] > com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 [stderr] * Try: [stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

build: 9580c12d-4217-434a-9158-7d9292e75239

I have no clue how to fix it


#5

Please make sure you build with an updated version of exp.


closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.