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

A/libc: /root/react-native/ReactCommon/jsi/JSCRuntime.cpp:397: virtual facebook::jsc::JSCRuntime::~JSCRuntime(): assertion "objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object"" #34991

Open
exzos28 opened this issue Oct 15, 2022 · 13 comments

Comments

@exzos28
Copy link

exzos28 commented Oct 15, 2022

Description

A/libc: /root/react-native/ReactCommon/jsi/JSCRuntime.cpp:397: virtual facebook::jsc::JSCRuntime::~JSCRuntime(): assertion "objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object""

Version

0.70.1

Output of npx react-native info

System:
OS: macOS 12.6
CPU: (8) arm64 Apple M1 Pro
Memory: 112.72 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.17.6 - ~/.nvm/versions/node/v14.17.6/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.17.6/bin/npm
Watchman: 2022.05.16.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK:
API Levels: 28, 29, 30, 31, 32
Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0
System Images: android-30 | Google APIs ARM 64 v8a, android-30 | Google Play ARM 64 v8a, android-31 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: Dolphin 2021.3.1 Dolphin 2021.3.1
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /Users/exzos/.jenv/shims/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.1 => 0.70.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

After reload metro server and got error

Snack, code example, screenshot, or link to a repository

image

@Acetyld
Copy link

Acetyld commented Oct 25, 2022

Same error here, any update?

@exzos28
Copy link
Author

exzos28 commented Oct 25, 2022

Same error here, any update?

i couldn't solve it, i get one successful app launch every 10-15 times.
It looks like the only successful option is to update react-native.

@Acetyld
Copy link

Acetyld commented Oct 25, 2022

Yhea i did that, updated to newest react-native, still nu success

@Acetyld
Copy link

Acetyld commented Oct 26, 2022

We found a solution for now.
Upgraded whole project to newest react-native and enabling "hermes", we couldt do this before because we are using Realmsjs, but!! 1 week ago they finally released Hermes support!.

For now we finnaly got android and ios working with code push, lets hope for little bugs :S

@dhavalsulhuf
Copy link

dhavalsulhuf commented Apr 17, 2023

getting same error here, any solution?
Screenshot 2023-04-17 at 11 35 37 AM

@mhsfh
Copy link

mhsfh commented Jun 8, 2023

same error here

@SelfDestroyer
Copy link

same error... any updates?

@dangdo1
Copy link

dangdo1 commented Jun 28, 2023

Same error here!

Steps to reproduce
After reload metro server and got error

I try comment this code in debug but host bundle on my app not response
image


I have JSI module in my app

  • I'm initing JS global method
    global.setProperty(*jsiRuntime, "myGlobalMethodJS", move(abortPlatformApi));
  • When I remove "myGlobalMethodJS" in global before re setBridge
    global.setProperty(*jsiRuntime, "myGlobalMethodJS", Value().undefined());
    -> issuse resloved -> But memory leak oneach reload bundle in app (JSCRuntime Object)

Pasted Graphic

@dangdo1
Copy link

dangdo1 commented Jun 28, 2023

@react-native-bot
review it, please!

@donatoaguirre24
Copy link

FYI if you're using react-native-reanimated the crash is likely caused by this issue

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 12, 2024
@donatoaguirre24
Copy link

Not stale

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 16, 2024
@tanishqkancharla
Copy link

Quick question here: the macro checks for the flag NDEBUG (which implies "not debug"), but we are running into the issue in production as well. Should we define the flag in production?

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

No branches or pull requests

8 participants