Hello!
This problem affects Android on SDK37 and the issue with the solution can be found here:
opened 11:17PM - 07 Apr 20 UTC
closed 07:58AM - 17 Apr 20 UTC
Expo Go
bug
Notifications
# ✅ Resolved: jump straight to the solution
The following comment provides a … solution and an explanation of the problem: https://github.com/expo/expo/issues/7727#issuecomment-616674874
<hr>
# Original post (for reference)
## 🐛 Bug Report
This extends #7653. Per the request of @sjchmiela , I'm opening a separate issue for where this error is happening in a **production** environment.
I have confirmed we followed the instructions in [this guide](https://docs.expo.io/versions/v37.0.0/guides/using-fcm/) to set up Android notifications correctly. Everything was working fine in Expo SDK 35, and then broken once we upgraded to SDK 37.
We're seeing this error in Sentry for ~40 users, all Android, mostly version 28 and 29.
### Environment
Below is my dev environment, though we are seeing this error in production.
```
Expo CLI 3.17.11 environment info:
System:
OS: macOS Mojave 10.14.6
Shell: 5.0.11 - /usr/local/bin/bash
Binaries:
Node: 10.19.0 - /var/folders/hq/l83ht_9n2kv0dy9xfdqn1v3r0000gn/T/yarn--1586301240769-0.3336967041216845/node
Yarn: 1.19.2 - /var/folders/hq/l83ht_9n2kv0dy9xfdqn1v3r0000gn/T/yarn--1586301240769-0.3336967041216845/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v10.19.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.0 => 37.0.3
react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4
react-navigation: ^3.11.0 => 3.11.0
```
Build targets are iOS and Android, the issue is for Android only.
### Steps to Reproduce
1. Call `Notifications.getExpoPushTokenAsync()` in native app
### Expected Behavior
1. Gets a token
### Actual Behavior
1. Returns error "Couldn't get GCM token on device"
My problem is that I have already a Firebase configuration set up in Expo since i’m using Firebase Analytics. In the solution the api_key is replaced, but doesn’t this overwrite my current Firebase configuration?
Partly answering my own question: should I use the Firebase project set for analytics also with push notifications?
https://docs.expo.io/versions/latest/guides/using-fcm/
system
Closed
May 21, 2020, 8:04am
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.