-
Notifications
You must be signed in to change notification settings - Fork 645
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
Arrays with length larger than 196603 cause Malformed JS Call
error
#994
Comments
|
I've tried this with |
Was anyone tracked down what causes the issue? |
This doesn't look like a Hermes bug, or if it is, can we please get a minimal repro? The error in the description is not generated by Hermes. The number 196603 seems to be related to the maximum number of properties that a Hermes object can hold (196607), so more than likely this is a case of using an object instead of an array somewhere. |
@tmikov There is a repro here, but I can add it to https://github.com/react-native-community/reproducer-react-native to make it easier to work with. |
@krystofwoldrich I am sorry, by a minimal repro we mean a small snippet of code (a few lines), without any dependencies, without React Native, demonstrating the problem. Hermes is just the JavaScript VM. It is not practical for us to debug RN apps or 3rd party libraries in order to identify VM bugs. As I mentioned before, judging by the information provided, this does not look like a Hermes bug. If you believe it is a Hermes bug, please try to narrow it down to just a few lines of pure JS code demonstrating the problem and we will take it from there. |
@tmikov Thank you for the explanation. I'll try to dig a bit deeper to see where the issue is coming from. |
I have the same issue while using lz-string on a 2MB string. After updating the Hermes version, my App does not work anymore. |
Closing, but please feel free to reopen with a minimal repro. |
Description
Imagine a native module with one function test that has one parameter -> array.
When you call it with an array that has more than 196603 items in it the array disappears.
And RN Bridge throws this error:
The array is an array of bytes in our case.
Question
Is this a bridge limitation?
On Android, with the New Architecture it works. (On iOS I got the same error.)
Files libraries are solving this by using strings
But we are concerned about the encoding overhead.
React Native Version
0.71.3
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.2
CPU: (10) arm64 Apple M1 Pro
Memory: 148.30 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.volta/tools/image/node/16.19.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 8.19.3 - ~/.volta/tools/image/node/16.19.0/bin/npm
Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/krystofwoldrich/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 28, 29, 30, 31, 32, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1
System Images: android-33 | Google APIs ARM 64 v8a
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 17.0.5 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
test(array)
I've tested this with numbers and objects and got the same error.
Also tried to enclose the array into an object and got the same error.
Snack, code example, screenshot, or link to a repository
Original issue at
@sentry/react-native
:The text was updated successfully, but these errors were encountered: