Please provide the following:
- SDK Version: 41
- Platforms(Android/iOS/web/all): Android (AAB)
- Managed workflow
Hi! I decided to make my own thread because I just can’t get it to work and I can not find any thread/google with a solution.
As the title says, I’m getting push notifications and tokens on iOS, Expo Go, Android APK (locally) but not standalone Android AAB/APK published to the store (internal test). I’m using the expo-notifications snack which should work.*
- google-services.json is setup correctly in app.json.
- package names match.
- Compared upload/signing keys from play store (app integrity) to Expo/Firebase.
- Added my upload/signing sha-1/sha-256 key to Firebase.
- Added my upload/signing sha-1 key to google cloud API key, unrestricted service access for now.
- Done some logging:
getExpoPushTokenAsync()
returns undefined in standalone AAB/APK published in store (internal test), no error. - Uploaded Firebase server key
expo push:android:upload --api-key <Server key>
- Checked/matched keys Expo vs Firebase.
- Checked several physical devices (Pixel 5/OnePlus 6T) for notification permissions.
- Cleared expo cache before making a new build.
- Read all of google and these forums xD. No seriously, I’m at a loss here.
Update:
I finally managed to produce an error from getExpoPushTokenAsync()
! I also installed Sentry but that’s not displaying it.
The error: Error: Fetching the token failed: FIS_AUTH_ERROR
. I’ve done a quick search on the expo forums and I figured it could be that I’m doing something wrong regarding app signing or it’s a bug in Expo? Fetching the token Failed, message : FIS_AUTH_ERROR - Help: Expo SDK - Forums
My app signing/upload key and api key all match in terms of sha-1 etc. Can’t do anything there.
I completely removed my firebase project and setup new FCM/API’s yet still the same error. I’ll type it here (I’ll try to avoid mistakes but I have to type it, can’t copy/paste).
"userInfo":null, "message": "Fetching the token failed: FIS_AUTH_ERROR", "code": "E_REGISTRATION_FAILED", "line": 29, "column": 1111, "sourceURL:"/data/user/0/com.sapulidisappname.example/files/.expo-internal/<hash>"
SOLVED!!
So, I was testing (as mentioned a couple of times) on the internal test track in the google play store. I did not setup a store listing yet. I spoke to GCP support and Nash told me to finish the store listing and move to the closed track instead of the internal test. This fixed it for me!!