Closed Meilo closed 11 months ago
Just lost a day to this... Basically it works when you run code from the embedded JS bundle, but the second you publish an update (we use EAS Update), one of expoConfig
or expoGoConfig
is null
This causes the updated bundle to crash on launch, and expo-updates to rollback to the embedded bundle
I've temporarily patched the config.js file using patch-package as follows:
diff --git a/node_modules/@bugsnag/expo/src/config.js b/node_modules/@bugsnag/expo/src/config.js
index 7100273..c61dbec 100644
--- a/node_modules/@bugsnag/expo/src/config.js
+++ b/node_modules/@bugsnag/expo/src/config.js
@@ -7,7 +7,7 @@ const stringWithLength = require('@bugsnag/core/lib/validators/string-with-lengt
// If the developer property is not present it means the app is
// not connected to a development tool and is either a published app running in
// the Expo client, or a standalone app
-const IS_PRODUCTION = !Constants.expoConfig.developer && !Constants.expoGoConfig.developer
+const IS_PRODUCTION = !Constants.expoConfig?.developer && !Constants.expoGoConfig?.developer
// The app can still run in production "mode" in development environments, in which
// cases the global boolean __DEV__ will be set to true
Hi @giaset thanks for the report. We've now released a fix for this in v49.0.1
Describe the bug
After upgrade
@bugsnag/expo
to49.0.0
this error manifest on a standalone app.I saw in the code base on the lib, and i think that the problem is here
developer
is not a key ofConstants.expoConfig
object.Steps to reproduce
@bugsnag/expo
to49.0.0
Environment
Error messages:
``` TypeError: Cannot read property 'developer' of null ```