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

App doesn't start after Realm installation, error: com.facebook.react.JavaScript (12): EXC_BAD_ACCESS IOS #3888

Closed
ThunbergOlle opened this issue Aug 5, 2021 · 5 comments

Comments

@ThunbergOlle
Copy link

ThunbergOlle commented Aug 5, 2021

Expected Results

Being able to render and start my app while Realm is installed

Actual Results

Error when running on device: com.facebook.react.JavaScript (12): EXC_BAD_ACCESS (code=2, address=0x100f0ea4c)

It also highlights this part of RealmReact.mm

void _initializeOnJSThread(JSContextRefExtractor jsContextExtractor) {
    // Make sure the previous JS thread is completely finished before continuing.
    static __weak NSThread *s_currentJSThread;
    while (s_currentJSThread && !s_currentJSThread.finished) {
        [NSThread sleepForTimeInterval:0.1];
    }
    s_currentJSThread = [NSThread currentThread];

    RJSInitializeInContext(jsContextExtractor()); // <----------------------
}

Code Sample

I have not written any Realm Code yet.

Version of Realm and Tooling

  • Realm JS SDK Version: ^10.6.1
  • Node or React Native: React Native
  • Client OS & Version: iOS 14.6
@takameyer
Copy link
Contributor

@ThunbergOlle Thanks for reporting. We will look into this, but I want to clarify a few things.

  • Does this happen to you with a clean React Native project?
  • Have you activated Hermes for your project? We are currently working on Hermes support.
  • Could you possibly share what packages you are using for your project? Perhaps we have a conflict with one of them.

@nguyenthanhtruongntt85
Copy link

nguyenthanhtruongntt85 commented Aug 6, 2021

@takameyer takeme

the same bug, my package.json

"dependencies": {
"@expo/react-native-action-sheet": "3.9.0",
"@nartc/react-native-barcode-mask": "1.2.0",
"@react-native-community/async-storage": "1.12.1",
"@react-native-community/datetimepicker": "3.5.2",
"@react-native-community/netinfo": "6.0.0",
"@react-navigation/bottom-tabs": "5.11.11",
"@react-navigation/core": "5.15.3",
"@react-navigation/devtools": "5.1.22",
"@react-navigation/drawer": "5.12.5",
"@react-navigation/material-top-tabs": "5.3.15",
"@react-navigation/native": "5.9.4",
"@react-navigation/routers": "5.7.2",
"@react-navigation/stack": "5.14.5",
"@sentry/react-native": "2.6.0",
"i18next": "20.3.4",
"lodash": "4.17.21",
"moment": "2.29.1",
"moment-timezone": "0.5.33",
"react": "17.0.1",
"react-i18next": "11.11.3",
"react-native": "0.64.2",
"react-native-a-beep": "1.1.0",
"react-native-actions-sheet": "0.4.9",
"react-native-camera": "4.0.0",
"react-native-code-push": "7.0.1",
"react-native-config": "1.4.2",
"react-native-device-info": "8.1.3",
"react-native-easy-icon": "1.0.7",
"react-native-fast-image": "8.3.6",
"react-native-gesture-handler": "1.10.3",
"react-native-image-crop-picker": "0.36.2",
"react-native-keyboard-aware-scroll-view": "0.9.4",
"react-native-linear-gradient": "2.5.6",
"react-native-modal": "12.0.2",
"react-native-modal-datetime-picker": "10.2.0",
"react-native-reanimated": "2.2.0",
"react-native-root-siblings": "4.1.1",
"react-native-root-toast": "3.2.1",
"react-native-safe-area-context": "3.2.0",
"react-native-safe-area-view": "1.1.1",
"react-native-screens": "3.4.0",
"react-native-splash-screen": "3.2.0",
"react-native-static-safe-area-insets": "2.1.1",
"react-native-status-bar-height": "2.6.0",
"react-native-system-setting": "1.7.6",
"react-native-vector-icons": "8.1.0",
"realm": "10.6.1",
"rn-fetch-blob": "0.12.0"
}

@nguyenthanhtruongntt85
Copy link

nguyenthanhtruongntt85 commented Aug 6, 2021

@takameyer takeme

I already know the reason because enabling Hermes on IOS, Android.
How to fix?

@kneth
Copy link
Contributor

kneth commented Aug 9, 2021

@nguyenthanhtruongntt85 We are working on Hermes support - see #3792. You will have to use JavaScriptCore, and you might have to downgrade Reanimated and other dependencies.

@ThunbergOlle
Copy link
Author

Okay! The issue was related to Hermes as @kneth pointed out.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants