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

[$1000] Android crash: Unexpected end of input #14878

Closed
mountiny opened this issue Feb 6, 2023 · 11 comments
Closed

[$1000] Android crash: Unexpected end of input #14878

mountiny opened this issue Feb 6, 2023 · 11 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Needs Reproduction Reproducible steps needed

Comments

@mountiny
Copy link
Contributor

mountiny commented Feb 6, 2023

Problem

Coming from this Crashlytics record, we are seeing a new Android crash related to Reanimated it seems like.

Wasnt able to reproduce

Why is it important

Prevents the app from crashing

Solution

Investigate where the crash is happening and fix it

Logs:

Fatal Exception: java.lang.RuntimeException: JSON Parse error: Unexpected end of input

SyntaxError: JSON Parse error: Unexpected end of input
    at parse (native)
       at com.swmansion.reanimated.Scheduler.triggerUI(Scheduler.java)
       at com.swmansion.reanimated.Scheduler$1.run(Scheduler.java:24)
       at com.swmansion.reanimated.Scheduler$2.runGuarded(Scheduler.java:43)
       at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:30)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7682)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018f1d8df9cb5c4cda
  • Upwork Job ID: 1624177312497754112
  • Last Price Increase: 2023-02-10
@mountiny mountiny added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 6, 2023
@MelvinBot
Copy link

Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 6, 2023
@MelvinBot
Copy link

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Expensify Expensify unlocked this conversation Feb 6, 2023
tomekzaw added a commit to software-mansion/react-native-reanimated that referenced this issue Feb 7, 2023
## Summary

This PR should fix "JSON Parse error: Unexpected end of input" error
from Hermes VM happening when `JSON.parse` invoked by
`jsi::Value::createFromJsonUtf8` (see
[here](https://github.com/facebook/react-native/blob/62fa6d9dac185add0b8998fe1a443beaef3a49bc/ReactCommon/jsi/jsi/jsi.cpp#L139-L144))
fails due to malformed payload.

Related issues:
* Expensify/App#14878
* wordpress-mobile/WordPress-Android#16842
*
#2823

## Test plan

Run Example and FabricExample app on Android.
@melvin-bot melvin-bot bot added the Overdue label Feb 8, 2023
tomekzaw added a commit to software-mansion/react-native-reanimated that referenced this issue Feb 10, 2023
This PR should fix "JSON Parse error: Unexpected end of input" error
from Hermes VM happening when `JSON.parse` invoked by
`jsi::Value::createFromJsonUtf8` (see
[here](https://github.com/facebook/react-native/blob/62fa6d9dac185add0b8998fe1a443beaef3a49bc/ReactCommon/jsi/jsi/jsi.cpp#L139-L144))
fails due to malformed payload.

Related issues:
* Expensify/App#14878
* wordpress-mobile/WordPress-Android#16842
*
#2823

Run Example and FabricExample app on Android.
@MelvinBot
Copy link

@kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Feb 10, 2023
@melvin-bot melvin-bot bot changed the title Android crash: Unexpected end of input [$1000] Android crash: Unexpected end of input Feb 10, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~018f1d8df9cb5c4cda

@kevinksullivan kevinksullivan added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2023
@MelvinBot
Copy link

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)

@MelvinBot
Copy link

Triggered auto assignment to @nkuoch (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@kevinksullivan
Copy link
Contributor

@mountiny are we looking for someone proposing the solution to reproduce here? I don't have permission in firebase, so let me know what you're thinking for reproduction.

@melvin-bot melvin-bot bot removed the Overdue label Feb 10, 2023
@Santhosh-Sellavel
Copy link
Collaborator

@mountiny is that all log?

@Santhosh-Sellavel
Copy link
Collaborator

I guess we can get more stack traces from the play console.

@mountiny
Copy link
Contributor Author

It aslo hasnt happened since and seems to occur only on OnePlus device Android 10 so I think we can close this now
stacktrace

fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this issue Jun 5, 2023
## Summary

This PR should fix "JSON Parse error: Unexpected end of input" error
from Hermes VM happening when `JSON.parse` invoked by
`jsi::Value::createFromJsonUtf8` (see
[here](https://github.com/facebook/react-native/blob/62fa6d9dac185add0b8998fe1a443beaef3a49bc/ReactCommon/jsi/jsi/jsi.cpp#L139-L144))
fails due to malformed payload.

Related issues:
* Expensify/App#14878
* wordpress-mobile/WordPress-Android#16842
*
software-mansion#2823

## Test plan

Run Example and FabricExample app on Android.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

5 participants