expo-notification exp.host would accept requests but app would not recieve them due to miss configuration

Please provide the following:

  1. SDK Version: 42.0
  2. Platforms(Android/iOS/web/all): Android currently, haven’t got to test iOS yet
  3. expo-notifications

I’ve resolved my own issue but are adding this to record it for other users that have this issue.

I have a managed app.
app bundle was built with “expo export”
android app was built with “expo build:android”
app was deployed to play store with “eas submit -p android”
In app.json the owner is set to an organization, not my username
I’ve setup FCM as required
expo --version: 4.7.3

Everything was working great during development through expo go, but as a standalone app not so much.

App would not receive notifications sent through exp.host even though I got a response id and when I checked the receipt for that it was always successful.

From this I worked out that expo was sending the message to the FCM which was accepted.

I worked out that sending directly through FCM (using token from getDevicePushTokenAsync) I could get it working, but only when using an experienceId with my username and not the organization as listed as owner in the app.json (this took me days to work out)

From this I realised that the app was binding itself to the equivalent experienceId of my username and not the owner specified in app.json as documented.

In my android-index.json (expo build:android --public-url urlToMy/android-index.json) generated by “expo export” the only reference to my username was the id field

I manually changed this and re-uploaded my bundle and then it started working as expected.

So I upgraded expo-cli from 4.7.3 to 4.8.1 but I got the same result

So I tried to set/override the id from app.config.js to force it to the correct owner but I get error and it didnt change:

Error: Problem validating fields in app.json. Learn more: https://docs.expo.io/workflow/configuration/
 • should NOT have additional property 'id'.

So in my build script I forcefully changed android-index.json so id generated by “expo export” is the correct @<owner>/<slug>

From my understanding “expo export” is generating id based on my username, and when the app loads it somehow binds itself to notifications related to that and not the correct owner.

Not sure if it’s me mixing up expo/eas that’s causing this issue or if it’s a bug with “expo export” but I have a work around.

I’m not sure if me forcefully changing the id would cause other issues?

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