I have a user that is trying to update data to Firebase on his Android Standalone (production, Xiaomi Redmi Note 7).
The simplified code below works for the devices I have tested and other users had to problems with it.
But somehow he gets an error shown in the screenshot below.
- Why does the error message for a Firebase update contain something about Expo?
- This might be irrelevant, but why is the inner catch (i.e. “Error 6”) not catching an error?
Expo CLI 3.13.1
System:
OS: macOS 10.14.5
Shell:
Binaries:
Node: 13.0.0
npm: 6.14.2
Watchman:
IDEs: VS Code
Android Studio:
Xcode:
npmPackages:
expo: ^36.0.0
react: 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz
npmGlobalPackages:
export async function updateFirebase(
updates
) {
try {
var updates = {};
firebase
.database()
.ref()
.update(updates)
.then(() => {
callback(true);
})
.catch(function(error) {
Alert.alert("Error 6", JSON.stringify(error));
});
} catch (error) {
Alert.alert("Error 7", JSON.stringify(error));
}
}