React Native version mismatch - only on release variant

Please provide the following:

  1. SDK Version: 45.0.0
  2. Platforms: Android

When trying to run the app on an Android device using release variant in Android Studio I get the following errors:

2022-06-13 23:41:31.184 22099-22099/? E/spoint.tappoin: Not starting debugger since process cannot load the jdwp agent.
2022-06-13 23:41:31.527 22099-22148/? E/ReactNativeJS: React Native version mismatch.
    
    JavaScript version: 0.57.1
    Native version: 0.67.4
    
    Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with `watchman watch-del-all && react-native start --reset-cache`.
2022-06-13 23:41:31.532 22099-22149/? E/unknown:ReactNative: console.error: "React Native version mismatch.
    
    JavaScript version: 0.57.1
    Native version: 0.67.4
    
    Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with `watchman watch-del-all && react-native start --reset-cache`.", stack:
    checkVersions@79:306
    <unknown>@67:710
    v@2:1476
    d@2:866
    global code@782:4
2022-06-13 23:41:31.701 644-644/? E/Layer: [Surface(name=AppWindowToken{d5bb6fd token=Token{5761754 ActivityRecord{f2cf6a7 u0 com.google.android.apps.nexuslauncher/.NexusLauncherActivity t504}}})/@0xe6810e2 - animation-leash#0] No local sync point found
2022-06-13 23:41:31.701 644-644/? E/Layer: [Surface(name=AppWindowToken{7926389 token=Token{698ae90 ActivityRecord{502b553 u0 com.beerspoint.tappoint/.MainActivity t697}}})/@0x4512e54 - animation-leash#0] No local sync point found
2022-06-13 23:41:31.901 22099-22148/? E/ReactNativeJS: Application TapPoint has not been registered.
    
    Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have multiple apps and the packager is still running for the app you were working on before.
    If this is the case, simply kill the old packager instance (e.g. close the packager terminal window) and start the packager in the correct app folder (e.g. cd into app folder and run 'npm start').
    
    This error can also happen due to a require() error during initialization or failure to call AppRegistry.registerComponent.
    
    
    
    --------- beginning of crash
2022-06-13 23:41:31.905 22099-22149/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.beerspoint.tappoint, PID: 22099
    com.facebook.react.common.JavascriptException: Application TapPoint has not been registered.
    
    Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have multiple apps and the packager is still running for the app you were working on before.
    If this is the case, simply kill the old packager instance (e.g. close the packager terminal window) and start the packager in the correct app folder (e.g. cd into app folder and run 'npm start').
    
    This error can also happen due to a require() error during initialization or failure to call AppRegistry.registerComponent.
    
    , stack:
    runApplication@281:1413
    value@18:3369
    <unknown>@18:851
    value@18:2613
    value@18:823
    
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:72)
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:49)
        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(JavaModuleWrapper.java:188)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:214)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:919)
2022-06-13 23:41:32.024 22099-22099/? E/unknown:ReactNative: Tried to remove non-existent frame callback
2022-06-13 23:41:57.531 22178-22178/? E/id.partnersetu: Not starting debugger since process cannot load the jdwp agent.
2022-06-13 23:41:57.554 22195-22195/? E/.apps.turbo:aa: Not starting debugger since process cannot load the jdwp agent.
2022-06-13 23:41:57.799 22195-22228/? E/libc: Access denied finding property "ro.hardware.chipname"
2022-06-13 23:42:20.837 18772-22217/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:42:25.828 17797-22249/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:25.833 17797-22249/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:25.833 17797-22249/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:25.833 17797-22249/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:25.865 17797-22249/? E/bsjx: RuntimeException while executing runnable bsmu{boco@511f7aa} with executor MoreExecutors.directExecutor()
    java.lang.NullPointerException: Attempt to read from field 'java.lang.String beyk.b' on a null object reference
        at bgck.b(PG:2)
        at boco.b(PG:2)
        at bsmu.run(PG:7)
        at bsly.execute(PG:1)
        at bsjx.o(PG:1)
        at bsjx.b(PG:5)
        at bsnb.r(PG:2)
        at boeo.l(PG:1)
        at bgcm.a(PG:15)
        at afam.a(PG:2)
        at bfdx.m(PG:3)
        at bfdx.q(PG:1)
        at bfdx.g(PG:1)
        at bgdx.a(PG:1)
        at bocq.a(PG:2)
        at bsol.a(PG:1)
        at bsno.run(PG:4)
        at bson.run(PG:1)
        at bcod.run(PG:1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at bcng.run(PG:2)
        at bcno.run(PG:4)
        at java.lang.Thread.run(Thread.java:919)
2022-06-13 23:42:26.360 17797-22250/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:26.369 17797-22250/? E/PhFileGroupPop: Failed to add file group 
2022-06-13 23:42:26.370 17797-22250/? E/bsjx: RuntimeException while executing runnable bsmu{boco@e08e2a7} with executor MoreExecutors.directExecutor()
    java.lang.NullPointerException: Attempt to read from field 'java.lang.String beyk.b' on a null object reference
        at bgck.b(PG:2)
        at boco.b(PG:2)
        at bsmu.run(PG:7)
        at bsly.execute(PG:1)
        at bsjx.o(PG:1)
        at bsjx.b(PG:5)
        at bsnb.r(PG:2)
        at boeo.l(PG:1)
        at bgcm.a(PG:15)
        at afam.a(PG:2)
        at bfdx.m(PG:3)
        at bfdm.a(Unknown Source:4)
        at bocs.a(PG:2)
        at bskb.d(PG:2)
        at bskd.run(PG:9)
        at bsoe.run(PG:4)
        at bcod.run(PG:1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at bcng.run(PG:2)
        at bcno.run(PG:4)
        at java.lang.Thread.run(Thread.java:919)
2022-06-13 23:42:34.615 4643-22270/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:43:04.053 4643-12615/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:44:08.316 18772-22297/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:46:32.030 1299-1315/? E/InputDispatcher: Window handle Window{3144880 u0 Application Error: com.beerspoint.tappoint} has no registered input channel
2022-06-13 23:46:32.042 1299-4690/? E/InputDispatcher: Window handle Window{3144880 u0 Application Error: com.beerspoint.tappoint} has no registered input channel
2022-06-13 23:46:52.075 18772-22315/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:47:34.658 4643-22352/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:47:42.378 4643-12615/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:48:38.971 2682-2718/? E/QMI_OEMHOOK: requestId NOT in QMI OemHook range, No further processing
2022-06-13 23:48:39.116 22398-22398/? E/oadcastreceive: Not starting debugger since process cannot load the jdwp agent.
2022-06-13 23:49:08.314 18772-22427/? E/memtrack: Couldn't load memtrack module
2022-06-13 23:49:26.248 2682-2718/? E/QMI_OEMHOOK: requestId NOT in QMI OemHook range, No further processing

The app crashes after this, without starting.
I tried emptying every cache posible

  • removed build folders
  • cleaned build folder
rm -rf node_modules 
npm cache clean --force 
npm install 
watchman watch-del-all 
rm -rf $TMPDIR/haste-map-*
rm -rf $TMPDIR/metro-cache

Debug mode works ok.

My expo env

expo-env-info 1.0.3 environment info:
System:
OS: macOS 12.3.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.2 - ~/.nvm/versions/node/v14.18.2/bin/node
Yarn: 1.22.18 - ~/apps/tp/mobile-app/node_modules/.bin/yarn
npm: 6.14.8 - ~/apps/tp/mobile-app/node_modules/.bin/npm
Watchman: 2022.01.10.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 23, 26, 28, 29, 30, 31, 32
Build Tools: 28.0.3, 30.0.2, 30.0.3, 32.0.0
System Images: android-29 | Google Play ARM 64 v8a, android-30 | Google Play ARM 64 v8a, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs ARM 64 v8a, android-32 | Google Play ARM 64 v8a, android-32 | Google Play Intel x86 Atom_64
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
npmPackages:
expo: ^45.0.0 => 45.0.5
react: 17.0.2 => 17.0.2
react-native: 0.67.4 => 0.67.4
npmGlobalPackages:
expo-cli: 5.4.9
Expo Workflow: bare