NativeScript / NativeScript/android

Fresh app works anywhere, except on Redmi devices!

Open
#404 47 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

From @calebeaires on March 25, 2016 14:50

Fresh Nativescript app (with no modification) stop working on Xiaomi Redimi 2 Prime smartphones. I have tested the same app on Sansung, Nexus, Genymotion and Android emulator. Everting goes well, except on Redimi 2. Here are the reporting log:

W/dalvikvm(24260):              in Lcom/tns/Platform;.callJSMethodNative:(ILjava/lang/String;IZ[Ljava/lang/Object;)Ljava/lang/Object; (CallVoidMethodA)
I/dalvikvm(24260):   at com.tns.Platform.callJSMethodNative(Native Method)
I/dalvikvm(24260):   at com.tns.Platform.dispatchCallJSMethodNative(Platform.java:816)
I/dalvikvm(24260):   at com.tns.Platform.callJSMethod(Platform.java:715)
I/dalvikvm(24260):   at com.tns.Platform.callJSMethod(Platform.java:694)
I/dalvikvm(24260):   at com.tns.Platform.callJSMethod(Platform.java:684)
W/ErrorReport(  950): org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
W/ErrorReport(  950):   at org.json.JSON.typeMismatch(JSON.java:111)
W/ErrorReport(  950):   at org.json.JSONObject.<init>(JSONObject.java:159)
W/ErrorReport(  950):   at org.json.JSONObject.<init>(JSONObject.java:172)

Redimi 2: Android 4.4
NativesScript 1.7.1

Copied from original issue: NativeScript/NativeScript#1851

Contributor guide

Open the contributing guide

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

Reproduce a fresh NativeScript app on the Redmi 2 Prime running Android 4.4 and compare it with the working devices listed in the report. Start by examining the call path around Platform.java lines 684, 694, 715, and 816 and the JSON parsing failure; done means the unmodified app starts successfully on the affected device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.