Error text
E/ReactNativeJS: TypeError: undefined is not an object (evaluating 'a.b.c') Hermes: Execution of bytecode failed in release build only
E/ReactNativeJS: TypeError: undefined is not an object (evaluating 'a.b.c') Hermes: Execution of bytecode failed in release build only
An app that works in debug breaks in release. Release minifies code, disables __DEV__ and runs Hermes bytecode.
adb logcat.--dev false and reproduce the same error.__DEV__, dev menu).adb logcat -s ReactNativeJS:V ReactNative:V npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output /tmp/i.bundle --sourcemap-output /tmp/i.map cd android && ./gradlew assembleRelease
Test the release APK on a real phone every week, not just on the last day.
Author and license: Nibras Code