Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.1.9 iOS release builds failing on old architecture #1513

Open
jerinjohnk opened this issue Oct 16, 2024 · 27 comments
Open

Version 5.1.9 iOS release builds failing on old architecture #1513

jerinjohnk opened this issue Oct 16, 2024 · 27 comments

Comments

@jerinjohnk
Copy link

jerinjohnk commented Oct 16, 2024

Describe the bug

After upgrading the package from 5.1.8 to 5.1.9 and creating a release build on iOS, the build is created and installed on the simulator.
But as soon as it opens, it crashes without any error logs.
Xcode reports failed to load the app.
Downgrading it fixes the issue.

"react-native": "0.75.4",

Even though reactotron has been added as a dev dependency with the following check before initialization.

if (__DEV__) {
  // eslint-disable-next-line global-require
  require('@redux/ReactotronConfig');
}

This shouldn't be causing any problems in the release build.

Earlier, I thought it might be as the following file
DevMenu = require("react-native/Libraries/NativeModules/specs/NativeDevMenu")
doesn't get bundled up in the release build.

Reactotron version

5.1.9

EDIT
Using old arch

@jerinjohnk
Copy link
Author

jerinjohnk commented Oct 19, 2024 via email

@TrejoCode
Copy link

Yeah, same issue using the latest version, use the previous version works.

@frankcalise
Copy link
Contributor

@TrejoCode are you using new arch or old?

@khanhvohoangvib
Copy link

same here, this link may help facebook/react-native#47193 (comment)

@frankcalise
Copy link
Contributor

@jerinjohnk @TrejoCode @khanhvohoangvib does anyone have a repo reproducing this issue? I haven't been able to reproduce it in an Ignite app via yarn ios --configuration Release with react-native 0.74.5 or 0.76.1

@daholino
Copy link

We're having the same issue on iOS. We reverted to 5.1.8 where it is working good.

@paulrinaldi
Copy link

paulrinaldi commented Nov 23, 2024

Happening to me on old arch as well and on v5.1.10.

"expo": "~50.0.19",
"react": "18.2.0",
"react-native": "0.73.6",
devDeps:
"reactotron-react-native": "5.1.10",
"reactotron-redux": "^3.1.10",
"redux-mock-store": "^1.5.4",

Used EAS: eas build -p ios --profile preview

expo run:ios works just fine, but running a internal distribution build on broswerstack fails (on iOS 18).

@frankcalise
Copy link
Contributor

Can someone post a reproducible repo link? With instructions on how to run into this? That would be helpful

@paul-rinaldi
Copy link

Downgrading to 5.1.8 also solved the issue for me. Adding DEV to that if statement did not work for me.

@frankcalise
Copy link
Contributor

Again, need more info if we can get it - such as RN version or a repository demonstrating the issue please.

@jerinjohnk
Copy link
Author

I have been trying to reproduce it in a minimal repo with reactotron added as a dev dependency but have been unable to reproduce the same error in that build successfully.

@frankcalise
Copy link
Contributor

@jerinjohnk Are you saying that you've added it as a dependency (not dev dependency) in the past and that is what failing?

Also, feel free to provide a formatted list of dependencies/dev dependencies from the project that is having troubles if unable to reproduce it - that is still helpful.

@jerinjohnk
Copy link
Author

No @frankcalise I didnt mean I had added it as dependency. It has always been added as a dev dependency only.
Sorry about the confusion.
Have tried to run the release build with upgraded version of 5.1.10 but still the same error occurs.
The downgrade to 5.1.8 works fine.

Here's my package list

"dependencies": {
    "@gorhom/bottom-sheet": "5.0.6",
    "@lottie-animation-community/lottie-types": "1.2.0",
    "@react-native-async-storage/async-storage": "2.1.0",
    "@react-native-clipboard/clipboard": "1.15.0",
    "@react-native-community/datetimepicker": "8.2.0",
    "@react-native-community/netinfo": "11.4.1",
    "@react-native-community/push-notification-ios": "1.11.0",
    "@react-native-community/slider": "4.5.5",
    "@react-native-cookies/cookies": "6.2.1",
    "@react-native-firebase/analytics": "21.6.0",
    "@react-native-firebase/app": "21.6.0",
    "@react-native-firebase/crashlytics": "21.6.0",
    "@react-native-firebase/database": "21.6.0",
    "@react-native-firebase/in-app-messaging": "21.6.0",
    "@react-native-firebase/messaging": "21.6.0",
    "@react-native-firebase/remote-config": "21.6.0",
    "@react-native-masked-view/masked-view": "0.3.2",
    "@react-navigation/bottom-tabs": "7.0.7",
    "@react-navigation/native": "7.0.4",
    "@react-navigation/stack": "7.0.6",
    "@reduxjs/toolkit": "2.3.0",
    "@shopify/flash-list": "1.7.2",
    "@shopify/react-native-skia": "1.5.8",
    "@types/d3-scale": "4.0.8",
    "axios": "1.7.7",
    "d3-scale": "4.0.2",
    "dayjs": "1.11.13",
    "deprecated-react-native-prop-types": "5.0.0",
    "hoist-non-react-statics": "3.3.2",
    "i18next": "24.0.0",
    "jssip": "3.10.1",
    "lodash": "4.17.21",
    "lottie-react-native": "7.1.0",
    "mitt": "3.0.1",
    "moment": "2.30.1",
    "moment-timezone": "0.5.46",
    "moti": "0.29.0",
    "prop-types": "15.8.1",
    "react": "18.3.1",
    "react-content-loader": "7.0.2",
    "react-i18next": "15.1.1",
    "react-native": "0.75.4",
    "react-native-appsflyer": "6.15.1",
    "react-native-blob-util": "0.19.11",
    "react-native-calendars": "1.1307.0",
    "react-native-camera": "4.2.1",
    "react-native-code-push": "9.0.0",
    "react-native-default-preference": "1.4.4",
    "react-native-device-info": "14.0.1",
    "react-native-document-picker": "9.3.1",
    "react-native-fast-image": "8.6.3",
    "react-native-geolocation-service": "5.3.1",
    "react-native-gesture-handler": "2.21.2",
    "react-native-haptic-feedback": "2.3.3",
    "react-native-idle-timer": "2.2.3",
    "react-native-image-marker": "1.2.6",
    "react-native-image-picker": "7.1.2",
    "react-native-incall-manager": "4.2.0",
    "react-native-keyboard-aware-scroll-view": "0.9.5",
    "react-native-linear-gradient": "2.8.3",
    "react-native-material-dialog": "0.7.7",
    "react-native-mmkv": "2.12.2",
    "react-native-modal": "13.0.1",
    "react-native-modal-datetime-picker": "18.0.0",
    "react-native-moengage": "9.1.0",
    "react-native-moengage-inbox": "3.1.0",
    "react-native-orientation-locker": "1.7.0",
    "react-native-permissions": "5.2.0",
    "react-native-progress-bar-animated": "1.0.6",
    "react-native-push-notification": "8.1.1",
    "react-native-radio-buttons-group": "3.1.0",
    "react-native-reanimated": "3.16.2",
    "react-native-reanimated-carousel": "3.5.1",
    "react-native-record-screen": "0.6.2",
    "react-native-redash": "18.1.3",
    "react-native-render-html": "6.3.4",
    "react-native-safe-area-context": "4.14.0",
    "react-native-screens": "4.3.0",
    "react-native-simple-toast": "1.1.4",
    "react-native-snap-carousel": "3.9.1",
    "react-native-svg": "15.9.0",
    "react-native-vector-icons": "10.2.0",
    "react-native-video": "6.8.0",
    "react-native-vision-camera": "4.6.1",
    "react-native-webrtc": "124.0.4",
    "react-native-webview": "13.12.4",
    "react-redux": "9.1.2",
    "redux-persist": "6.0.0",
    "redux-saga": "1.3.0",
    "rn-sms-retriever": "1.2.1",
    "zod": "3.23.8"
  },
  "devDependencies": {
    "@babel/core": "7.26.0",
    "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
    "@babel/plugin-proposal-optional-chaining": "7.21.0",
    "@babel/plugin-transform-arrow-functions": "7.25.9",
    "@babel/plugin-transform-react-jsx": "7.25.9",
    "@babel/plugin-transform-shorthand-properties": "7.25.9",
    "@babel/plugin-transform-template-literals": "7.25.9",
    "@babel/preset-env": "7.26.0",
    "@babel/runtime": "7.26.0",
    "@react-native/babel-preset": "0.75.4",
    "@react-native/eslint-config": "0.75.4",
    "@react-native/metro-config": "0.75.4",
    "@react-native/typescript-config": "0.75.4",
    "@storybook/addon-ondevice-actions": "8.4.2",
    "@storybook/addon-ondevice-backgrounds": "8.4.2",
    "@storybook/addon-ondevice-controls": "8.4.2",
    "@storybook/addon-ondevice-notes": "8.4.2",
    "@storybook/react-native": "8.4.2",
    "@types/react": "18.3.12",
    "@types/react-native-vector-icons": "6.4.18",
    "@types/react-test-renderer": "18.3.0",
    "@typescript-eslint/eslint-plugin": "8.15.0",
    "@typescript-eslint/parser": "8.15.0",
    "babel-jest": "29.7.0",
    "babel-loader": "9.2.1",
    "babel-plugin-module-resolver": "5.0.2",
    "crypto-es": "2.1.0",
    "enzyme": "3.11.0",
    "enzyme-adapter-react-16": "1.15.8",
    "eslint": "8.57.1",
    "eslint-config-prettier": "9.1.0",
    "eslint-import-resolver-typescript": "3.6.3",
    "eslint-plugin-ft-flow": "3.0.11",
    "eslint-plugin-import": "2.31.0",
    "eslint-plugin-import-order-autofix": "0.8.3",
    "eslint-plugin-jest": "28.9.0",
    "eslint-plugin-jsx-a11y": "6.10.2",
    "eslint-plugin-no-inline-styles": "1.0.5",
    "eslint-plugin-prettier": "5.2.1",
    "eslint-plugin-react": "7.37.2",
    "eslint-plugin-react-hooks": "5.0.0",
    "eslint-plugin-reactotron": "0.1.5",
    "husky": "9.1.7",
    "jest": "29.7.0",
    "lint-staged": "15.2.10",
    "patch-package": "8.0.0",
    "pod-install": "0.3.2",
    "prettier": "3.3.3",
    "prettier-eslint": "16.3.0",
    "react-dom": "18.3.1",
    "react-test-renderer": "18.3.1",
    "reactotron-react-native": "5.1.10",
    "reactotron-react-native-mmkv": "^0.2.7",
    "reactotron-redux": "3.1.10",
    "reactotron-redux-saga": "4.2.3",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": [
      "prettier --write",
      "eslint --fix"
    ]
  },
  "packageManager": "yarn@3.6.4"

The error thrown in Xcode log is

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native binary. Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["UIManager","PlatformConstants","DeviceInfo","RNGestureHandlerModule","I18nManager","NativeAnimatedModule","RNCAsyncStorage","KeyboardObserver","Timing","SourceCode","ImageLoader","ReactNativeBlobUtil","RNHapticFeedback","BlobModule","ModalManager","ReanimatedModule"],"TurboModules":[],"NotFound":["NativePerformanceObserverCxx","NativePerformanceCxx","NativeReactNativeFeatureFlagsCxx","RedBox","BugReporting","HeadlessJsTaskSupport","SoundManager","RNVectorIcons","PlatformLocalStorage","RNC_AsyncSQLiteDBStorage","FrameRateLogger","DevMenu"]}, js engine: hermes
Unhandled JS Exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native binary. Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["UIManager","PlatformConstants","DeviceInfo","RNGestureHandlerModule","I18nManager","NativeAnimatedModule","RNCAsyncStorage","KeyboardObserver","Timing","SourceCode","ImageLoader","ReactNativeBlobUtil","RNHapticFeedback","BlobModule","ModalManager","ReanimatedModule"],"TurboModules":[],"NotFound":["NativePerformanceObserverCxx","NativePerformanceCxx","NativeReactNativeFeatureFlagsCxx","RedBox","BugReporting","HeadlessJsTaskSupport","SoundManager","RNVectorIcons","PlatformLocalStorage","RNC_AsyncSQLiteDBStorage","FrameRateLogger","DevMenu"]}, js engine: hermes
*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native binary. Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["UIManager","PlatformConstants","DeviceInfo","RNGestureHandlerModule","I18nManager","NativeAnimatedModule","RNCAsyncStorage","KeyboardObserver","Timing","SourceCode","ImageLoader","ReactNativeBlobUtil","RNHapticFeedback","BlobModule","ModalManager","ReanimatedModule"],"TurboModules":[],"NotFound":["NativePerformanceObserverCxx","NativePerformanceCxx","NativeReactNativeFeatureFlagsCxx","RedBox","BugReporting","HeadlessJsTaskSupport","SoundManager","RNVectorIcons","PlatformLocalStorage","RNC_AsyncSQLiteDBStorage","FrameRateLogger","DevMenu"]}, js engine: hermes', reason: 'Unhandled JS Exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native..., stack:
invariant@2741:25
getEnforcing@3496:27
anonymous@163619:67
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@163577:58
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@163552:25
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@161173:52
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@161091:66
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@161063:65
loadModuleImplementation@158:13
guardedLoadModule@96:37
metroRequire@38:91
anonymous@161051:60
loadModuleImplementation@158:13
guardedLoadModule@89:46
metroRequire@38:91
?anon_0_@165228:21
asyncGeneratorStep@813:18
_next@827:28
anonymous@832:13
anonymous@824:24
_migrateFromAsyncStorage@165251:41
migrateFromAsyncStorage@165224:41
?anon_0_@104624:78
asyncGeneratorStep@813:18
_next@827:28
anonymous@832:13
anonymous@824:24
processNext@38744:18
_processUpdate@38612:30
anonymous@13122:25
_callTimer@13011:16
_callReactNativeMicrotasksPass@13049:16
callReactNativeMicrotasks@13252:43
__callReactNativeMicrotasks@2342:47
anonymous@2206:44
__guard@2314:14
flushedQueue@2205:20
'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010ef33531 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x000000010ecef7e8 objc_exception_throw + 48

@MarlonAEC
Copy link

Hey I have the same problem and downgrading to 5.1.8 didn't work (I was in 5.1.9 I didn't tried 5.1.10 yet tho). I do not get any error on metro only this in XCode:

10.3.0 - [FirebasePerformance][I-PRF300005] URL length exceeds limits, truncating recorded URL - http://localhost:8081/config/ReactotronConfig.bundle.
libc++abi: terminating due to uncaught exception of type std::__1::bad_function_call: std::exception

this is my metro logs:

 BUNDLE  ./index.js 

 BUNDLE  config/ReactotronConfig.js 

that's it I don't get anything else. No logs, no issues nothing the app crashed after a successful build.

my package.json:

"react-native": "^0.76.2",
"react": "^18.3.1",

my ReactototronConfig.js:

import Reactotron, { trackGlobalErrors, asyncStorage, networking } from 'reactotron-react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { reactotronRedux } from 'reactotron-redux';

const reactotron = Reactotron.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
    .configure() // controls connection to the default ip address & communication settings
    .useReactNative({
        // add all built-in react native plugins
        asyncStorage: true, // there are more options to the async storage.
        networking: {
            // optionally, you can turn it off with false.
            ignoreUrls: /symbolicate/,
        },
        editor: false, // there are more options to editor
        errors: { veto: (stackFrame) => false }, // or turn it off with false
        overlay: false, // just turning off overlay
    })
    .use(
        asyncStorage({
            ignore: ['secret'],
        }),
    ) // allows you to track AsyncStorage on React Native
    .use(networking())
    .use(
        trackGlobalErrors({
            veto: (frame) => frame.fileName.indexOf('/node_modules/react-native/') >= 0,
            offline: true,
        }),
    )
    .use(
        reactotronRedux({
            except: ['@@network-connectivity/CONNECTION_CHANGE'],
        }),
    )
    .connect();

console.tron = Reactotron.log;
console.display = Reactotron.log;

export default reactotron;

@frankcalise
Copy link
Contributor

@MarlonAEC and you're saying if you remove the dep the build succeeds?

Can you show me how you import the config in the other source file?

@MarlonAEC
Copy link

MarlonAEC commented Nov 27, 2024

For me, the build always succeeds just when it tries to run the app it crashes. This is how I import the config in my App.js:

async componentDidMount() {
      if (__DEV__) {
        import('./config/ReactotronConfig').then(() => console.log('Reactotron Configured'));
      }
      //Rest of my code here
}

@MarlonAEC
Copy link

Oh, my bad I thought about your questions and even commented out the if(__DEV__) thing and the whole ReactotronConfig.js file, and still the app crashes. Sorry I misunderstood your question when I first replied

@frankcalise
Copy link
Contributor

@MarlonAEC ok let me know if 5.1.10 changes things for you if you could

@MarlonAEC
Copy link

Got the same problem on 5.1.10, unfortunately 😔. Is there anything else I could try?

@joshuayoes
Copy link
Contributor

@MarlonAEC could you try that Reactotron import higher? It should be one of the first things loaded in your app entry point.

@frankcalise
Copy link
Contributor

@MarlonAEC the import should be moved to one of the first lines in the entry point of your application. It seems like you have it further down, which is too late. Notice where it is in Ignite: https://github.com/infinitered/ignite/blob/master/boilerplate/app/app.tsx#L13-L18

This is documented here: https://docs.infinite.red/reactotron/quick-start/react-native/#step-3---add-reactotron-to-your-app

@MarlonAEC
Copy link

OK I moved the import to the first line of my App.js and still the app crashed also changed the import to required to match the link you shared just in case but still it's crashing with the same log as before on XCode
Screenshot 2024-11-27 at 5 10 48 PM

@MarlonAEC
Copy link

I wonder if this other issue is related: facebook/react-native#47935 I'm kinda in the same scenario, what I'm trying to do is update my app to the latest react native version 0.76. I had to change a lot of things in my code to make this work but so far everything else got resolved, only this issue is blocking me from running my app.

@MarlonAEC
Copy link

Ok a quick update I completely removed reactotron from my project and the app is still crashing. I guess that makes clear the problem is not with this library but with react native 0.76. I will keep searching for a solution if I find something I will update this thread

@CaptainJeff
Copy link

CaptainJeff commented Dec 3, 2024

I'm getting this same issue on my jest tests. Any thoughts?

  ● Test suite failed to run

    Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native binary.

       7 | import { NativeModules } from "react-native"
       8 | import { mst } from "reactotron-mst"
    >  9 | import Tron from "reactotron-react-native"
"reactotron-mst": "^3.1.10",
"reactotron-react-js": "^3.3.15",
"reactotron-react-native": "^5.1.10",

Note: Downgrading to

"reactotron-mst": "3.1.3",
"reactotron-react-js": "^3.3.15",
"reactotron-react-native": "5.0.0",

Does fix the errors but wondering whats going wrong with the new updates that is causing this

@MarlonAEC
Copy link

MarlonAEC commented Dec 3, 2024

This solution facebook/react-native#47935 (comment) fixed the bad_function_call error but I got the same issue as you are getting but with a different package tho:

TurboModuleRegistry.getEnforcing(...): 'PkceChallenge' could not be found. Verify that a module by this name is registered in the native binary.

so I think that solutions kinda just mask the problem but all other packages that are expecting the architecture to be ON start to crash as soon you disable it because they probably are expecting the architecture to be on by default on the latest versions of those packages. I'm still exploring some other options but so far no luck. I opened this bug on the package: dcangulo/react-native-pkce-challenge#511 to see if they know about it but I haven't get a response yet

@CaptainJeff
Copy link

@MarlonAEC yeah i was thinking the same thing. I'm not sure why this would be getting invoked for my jest tests though. Makes sense for the runtime error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants