Am currently trying to setup notifications on my managed expo project
- Expo version
47.0.0
- Expo notifications version
0.17.0
- Device: Samsung Galaxy s10
- Android version
12
I am currently just trying to get the basic setup itself working and retrieve my devices push token. This should be done using Notifications.getExpoPushTokenAsync()
as described here.
The Problem
My error is strange, when I call getExpoPushTokenAsync
it does indeed get me the expo push token, however shortly after my app crashes with the following messages
ERROR TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[1], "../../../src/util").types.isPromise')
WARN [expo-notifications] Error encountered while updating server registration with latest device push token. [TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[5], "@ide/backoff").computeNextBackoffInterval')]
I have tried
- re-installing
node_modules
andexpo-notifications
but still get the same. - I can definitely see the
@ide/backoff
package is installed in mynode_modules
. - I also followed these instructions to setup firebase in app, even though my understanding is that it should work out of the box in expo go app while devving.
One other interesting thing is that I can call Notifications.getDevicePushTokenAsync()
fine with no error. But still get the same error if i pass that in to getExpoPushTokenAsync
method after. At a surface level it seems like somehow the request out to expo services to get the expo push token is both passing and failing ♂️
const devicePushTokenResponse = await Notifications.getDevicePushTokenAsync();
const expoPushTokenResponse = await Notifications.getExpoPushTokenAsync({
devicePushToken: devicePushTokenResponse,
}); // <--- Returns token & errors a few seconds later
Couldn't see any other posts with this error and expo-notifications
, so would be keen to see if anyone else has ran into / fixed a similar issue recently
Cheers