Please provide the following:
- SDK Version: Expo 37
- Platforms(Android/iOS/web/all): Expo using Firebase Web
This only happens in a standalone app, works fine with the dev
I’m encountering this error on the standalone apk. As you can see the above tokens are from sdk36 and the last one is from sdk37.
any insight on where I’m missing?
"dependencies": {
"accordion-collapse-react-native": "^0.2.8",
"contentful": "^7.13.1",
"expo": "^37.0.0",
"expo-ads-admob": "~8.1.0",
"expo-analytics": "^1.0.14",
"expo-auth-session": "^1.2.1",
"expo-constants": "^9.0.0",
"expo-facebook": "~8.1.0",
"expo-google-app-auth": "^8.0.1",
"expo-image-manipulator": "~8.1.0",
"expo-image-picker": "~8.1.0",
"expo-linear-gradient": "~8.1.0",
"expo-permissions": "~8.1.0",
"firebase": "7.9.0",
"moment": "^2.24.0",
"native-base": "^2.13.8",
"node-libs-react-native": "^1.0.3",
"number-abbreviate": "^2.0.0",
"os-browserify": "^0.3.0",
"patreon": "https://github.com/jeffreypareja/patreon-js/tarball/master",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-axios": "^0.17.1",
"react-native-dotenv": "^0.2.0",
"react-native-elements": "^1.2.7",
"react-native-fit-image": "^1.5.5",
"react-native-gesture-handler": "~1.6.0",
"react-native-ignore-warnings": "^0.1.1",
"react-native-image-picker": "^0.28.0",
"react-native-image-resizer": "^1.2.1",
"react-native-indicators": "^0.17.0",
"react-native-infinite-scroll-grid": "^0.1.0",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-loader": "^1.2.1",
"react-native-loading-spinner-overlay": "^1.1.0",
"react-native-markdown-package": "^1.6.3",
"react-native-markdown-view": "^1.1.4",
"react-native-material-ripple": "^0.9.1",
"react-native-modal": "^11.5.4",
"react-native-popup-menu": "^0.15.7",
"react-native-reanimated": "~1.7.0",
"react-native-responsive-fontsize": "^0.4.3",
"react-native-screens": "~2.2.0",
"react-native-status-bar-height": "^2.4.0",
"react-native-swipe-gestures": "^1.0.4",
"react-native-swiper": "^1.6.0-nightly.5",
"react-native-tiny-toast": "^1.0.7",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-stack": "1.10.3",
"react-navigation-tabs": "^2.7.0",
"recompose": "^0.30.0",
"url": "^0.11.0"
},
const registerForPushNotifications = async user => {
const { status: existingStatus } = await Permissions.getAsync(Permissions.NOTIFICATIONS)
let finalStatus = existingStatus
if (existingStatus !== 'granted') {
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS)
finalStatus = status
}
if (finalStatus !== 'granted') {
return
}
let token = await Notifications.getExpoPushTokenAsync()
let updates = {}
updates['expoToken'] = token
firebase.database().ref('users').child(user.uid).update(updates)
}
I’m using firebase web app so I’m importing my keys like this not with google-services.json
import {
API_KEY,
AUTH_DOMAIN,
DATABASE_URL,
PROJECT_ID,
STORAGE_BUCKET,
MESSAGING_SENDER_ID,
APP_ID,
MEASUREMENT_ID
} from 'react-native-dotenv'
export default {
firebaseConfig: {
apiKey: API_KEY,
authDomain: AUTH_DOMAIN,
databaseURL: DATABASE_URL,
projectId: PROJECT_ID,
storageBucket: STORAGE_BUCKET,
messagingSenderId: MESSAGING_SENDER_ID,
appId: APP_ID,
measurementId: MEASUREMENT_ID
}
}