I made a react-native app and +- 10 collegues use it. Everyone uses the build apk on an android device. One of them can suddenly not start the app anymore. When launching the app it crashed immediately saying "The app stopped working". It can show me a crash stacktrace and it is as follows:
com.facebook.react.common.JavascriptException:
TypeError: I.default.flushOperations is not a function. (In
'I.default.flushOperations()', 'I.default.flushOperations' is
undefined), stack:
<unknown>@1057:757
u@136:157
<unknown>@136:869
<unknown>@142:1697
p@142:528
N@142:918
callReactNativeMicrotasks@142:3082
value@24:2942
<unknown>@24:1051
value@24:2590
value@24:1009
value@-1
value@-1
at
com.facebook.react.modules.core.ExceptionsManagerM
odule.reportException(ExceptionsManagerModule.java:
65)
at java.lang.reflect.Method.invoke(Native Method)
at
com.facebook.react.bridge.JavaMethodWrapper.invoke(
JavaMethodWrapper.java:372)
at
com.facebook.react.bridge.JavaModuleWrapper.invoke(J
avaModuleWrapper.java:188)
at com.facebook.jni.NativeRunnable.run(Native
Method)
at android.os.Handler.handleCallback(Handler.java:914)
at android.os.Handler.dispatchMessage(Handler.java:
100)
at
com.facebook.react.bridge.queue.MessageQueueThread
Handler.dispatchMessade(MessadeOueueThreadHandler
This is not clear enough for me to pinpoint the problem. I think a certain library has an invalid function definition but I can not fingure out which one or where it should be defined.
Maybe relevant, I'm using codepush to publish bundle updates:
const codePushOptions = {
checkFrequency: CodePush.CheckFrequency.ON_APP_START,
updateDialog: true,
installMode: CodePush.InstallMode.IMMEDIATE,
};
These are the dependencies of my app:
"dependencies": {
"@baronha/react-native-multiple-image-picker": "~1.1.6",
"@react-keycloak/native": "~0.6.4",
"@react-native-async-storage/async-storage": "~1.19.3",
"@react-native-camera-roll/camera-roll": "~6.0.0",
"@react-native-community/checkbox": "~0.5.16",
"@react-native-community/datetimepicker": "~7.6.1",
"@react-native-community/masked-view": "~0.1.11",
"@react-native-community/netinfo": "~11.2.0",
"@react-native-community/slider": "~4.4.3",
"@react-native-picker/picker": "~2.5.1",
"@react-navigation/drawer": "~6.6.6",
"@react-navigation/native": "~6.1.8",
"@react-navigation/native-stack": "~6.9.14",
"@react-navigation/stack": "~6.3.18",
"@reduxjs/toolkit": "~1.9.7",
"appcenter": "5.0.0",
"appcenter-analytics": "5.0.0",
"appcenter-crashes": "5.0.0",
"axios": "~1.5.1",
"base-64": "~1.0.0",
"core-js": "~3.33.3",
"jwt-decode": "~4.0.0",
"moment": "~2.29.4",
"react": "18.2.0",
"react-native": "0.72.6",
"react-native-app-auth": "~7.1.0",
"react-native-check-box": "~2.1.7",
"react-native-code-push": "~8.1.0",
"react-native-device-info": "~10.11.0",
"react-native-dialog": "~9.3.0",
"react-native-fs": "~2.20.0",
"react-native-gesture-handler": "^2.15.0",
"react-native-inappbrowser-reborn": "~3.7.0",
"react-native-material-ripple": "~0.9.1",
"react-native-modal-datetime-picker": "~17.1.0",
"react-native-orientation-locker": "~1.5.0",
"react-native-reanimated": "~3.5.4",
"react-native-safe-area-context": "~4.7.2",
"react-native-screens": "~3.26.0",
"react-native-select-dropdown": "~3.4.0",
"react-native-splash-screen": "~3.3.0",
"react-native-svg": "~13.14.0",
"react-native-svg-transformer": "~1.1.0",
"react-native-toast-message": "~2.1.7",
"react-native-vector-icons": "~10.0.0",
"react-native-vision-camera": "3.9.0",
"react-native-web": "~0.19.9",
"react-navigation": "~5.0.0",
"react-navigation-stack": "~2.10.4",
"react-redux": "~8.1.3",
"redux-persist": "~6.0.0"
},
Can someone provide more info about this crash and maybe provide a solution?