Malformed calls from JS: field sizes are different.

See original GitHub issue

image

React Native version: react-native-cli: 2.0.1 react-native: 0.60.4

Steps To Reproduce

Dependencies in package.json:

“dependencies”: { “@react-native-community/netinfo”: “^4.1.3”, “axios”: “^0.19.0”, “querystring”: “^0.2.0”, “react”: “16.8.6”, “react-native”: “0.60.4”, “react-native-gesture-handler”: “^1.3.0”, “react-native-webview”: “^5.12.1”, “react-navigation”: “^3.11.1” }, “devDependencies”: { “@babel/core”: “7.5.5”, “@babel/runtime”: “7.5.5”, “@react-native-community/eslint-config”: “0.0.3”, “babel-jest”: “24.8.0”, “eslint”: “6.1.0”, “jest”: “24.8.0”, “metro-react-native-babel-preset”: “0.54.1”, “react-test-renderer”: “16.8.6” }, “jest”: { “preset”: “react-native” }

Describe what you expected to happen: Getting error: Malformed calls from JS field after loading app on devices

Logs: com.finalapp E/unknown:ReactNative: Exception in native call com.facebook.jni.CppException: Malformed calls from JS: field sizes are different.

[[0,37],[0,0],[[31,2000,1564123896382,false]],91]
    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
    at android.os.Looper.loop(Looper.java:148)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
    at java.lang.Thread.run(Thread.java:818)

07-26 12:21:37.391 30242-30242/com.finalapp W/unknown:ReactNative: Tried to enqueue runnable on already finished thread: 'js… dropping Runnable. 07-26 12:21:37.391 30242-30242/com.finalapp W/MessageQueue: Handler (com.facebook.react.bridge.queue.MessageQueueThreadHandler) {5861b01} sending message to a Handler on a dead thread java.lang.IllegalStateException: Handler (com.facebook.react.bridge.queue.MessageQueueThreadHandler) {5861b01} sending message to a Handler on a dead thread at android.os.MessageQueue.enqueueMessage(MessageQueue.java:544) at android.os.Handler.enqueueMessage(Handler.java:631) at android.os.Handler.sendMessageAtTime(Handler.java:600) at android.os.Handler.sendMessageDelayed(Handler.java:570) at android.os.Handler.post(Handler.java:326) at com.facebook.react.bridge.queue.MessageQueueThreadImpl.runOnQueue(MessageQueueThreadImpl.java:70) at com.facebook.react.bridge.ReactContext.runOnJSQueueThread(ReactContext.java:321) at com.facebook.react.uimanager.events.EventDispatcher$ScheduleDispatchFrameCallback.doFrame(EventDispatcher.java:302) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:917) at android.view.Choreographer.doCallbacks(Choreographer.java:710) at android.view.Choreographer.doFrame(Choreographer.java:642) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:905) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5582) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Done using below but not yet got any solution, rm -rf node_modules && rm -rf /tmp/metro-bundler-cache- && rm -rf /tmp/haste-map-react-native-packager-* && npm install && react-native start --reset-cache

also done cd android/ && ./gradlew clean && cd … && react-native run-android

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
MahmoudAziz1996commented, Jan 26, 2020

I solved it by adding error.message instead of error object

.catch((error) => {
               console.log(error)
            })

to

.catch((error) => {
               console.log(error.message)
            })
1reaction
juniordntscommented, Dec 9, 2019

I am getting the same error… I think it is caused by the axios…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Malformed calls from JS: field sizes are different · Issue #23835
I had a similar issue. In my case, I tracked it down to native bridge serialization problem. Basically, the problem is that some...
Read more >
Malformed calls from JS: field sizes are different - Stack Overflow
Thus the field sizes are different error. That's because react-native expects that for every given call, all 3 fields should contain information ...
Read more >
Explain like I'm 5 - Malformed calls from JS: field sizes ... - Reddit
Explain like I'm 5 - Malformed calls from JS: field sizes are different. When googling this I only see people's github issues -...
Read more >
Exception in HostFunction: Malformed calls from JS: field sizes ...
Getting error: LocationError: Exception in HostFunction: Malformed calls from JS: field sizes are different.
Read more >
Error: Exception in HostFunction: Malformed calls from JS
Error : Exception in HostFunction: Malformed calls from JS: field sizes are different. [[31,36,36,36],[4,0,1,0],[[3,2000,1630323727880,false] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found