software-mansion / software-mansion/react-native-reanimated

JSON Parse error: Unexpected end of input at parse (native)

Open
#7,403 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Missing repro Platform: Android
Dominant language
TypeScript
Stars
11k
Forks
1.5k
Avg merge
3d 4h
Merged PRs (30d)
172

Description

Description
com.facebook.jni.CppException: JSON Parse error: Unexpected end of input

SyntaxError: JSON Parse error: Unexpected end of input
    at parse (native)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(EventHandler.java)
    at com.swmansion.reanimated.nativeProxy.EventHandler.receiveEvent(EventHandler.java:25)
    at com.facebook.react.uimanager.events.Event.dispatch(Event.java:173)
    at com.swmansion.reanimated.NodesManager.handleEvent(NodesManager.java:367)
    at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:353)
    at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:118)
    at com.facebook.react.views.textinput.ReactEditTextInputConnectionWrapper.dispatchKeyEvent(ReactEditTextInputConnectionWrapper.java:158)
    at com.facebook.react.views.textinput.ReactEditTextInputConnectionWrapper.endBatchEdit(ReactEditTextInputConnectionWrapper.java:81)
    at com.android.internal.inputmethod.RemoteInputConnectionImpl.lambda$endBatchEdit$34$com-android-internal-inputmethod-RemoteInputConnectionImpl(RemoteInputConnectionImpl.java:904)
    at com.android.internal.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda31.run
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8762)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Image Image
Steps to reproduce

​I haven't been able to reproduce the issue myself, but we've received user reports indicating that the error occurs when using the Simeji keyboard app. According to the users, the app crashes when they repeatedly press the Enter or arrow keys while the keyboard is set to Roman character input mode.​

We're seeing approximately 1.8K error events per day reported through Sentry, and similar reports are also appearing in the Google Play Console.

Snack or a link to a repository

none

Reanimated version

3.17.2

React Native version

0.78.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Release app & production bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing EventHandler.receiveEvent and NodesManager.handleEvent/onEventDispatch in the stack trace, then investigate the Simeji keyboard's repeated Enter or arrow-key events on Android. A useful outcome requires identifying the malformed event data and establishing a reproducible case or regression coverage for the reported JSON parse failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.