react-native icon indicating copy to clipboard operation
react-native copied to clipboard

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""

Open exzos28 opened this issue 2 years ago • 13 comments

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

exzos28 avatar Oct 15 '22 09:10 exzos28

Same error here, any update?

Acetyld avatar Oct 25 '22 10:10 Acetyld

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.

exzos28 avatar Oct 25 '22 10:10 exzos28

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

Acetyld avatar Oct 25 '22 10:10 Acetyld

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

Acetyld avatar Oct 26 '22 07:10 Acetyld

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

dhavalsulhuf avatar Apr 17 '23 06:04 dhavalsulhuf

same error here

mhsfh avatar Jun 08 '23 19:06 mhsfh

same error... any updates?

ivaniuk7531 avatar Jun 13 '23 09:06 ivaniuk7531

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 avatar Jun 28 '23 07:06 dangdo1

@react-native-bot review it, please!

dangdo1 avatar Jun 28 '23 07:06 dangdo1

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

donatoaguirre24 avatar Oct 10 '23 20:10 donatoaguirre24

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[bot] avatar Apr 12 '24 05:04 github-actions[bot]

Not stale

donatoaguirre24 avatar Apr 12 '24 16:04 donatoaguirre24

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?

tanishqkancharla avatar May 14 '24 21:05 tanishqkancharla