org.json.JSONException: End of input at character 0 of

Appcelerator JIRA | Wilson Luu | 10 months ago
  1. 0

    *Details:* Creating a new record with Arrow Android SDK throws a {{org.json.JSONException}} in the {{onError}} callback. *Notes:* To workaround this issue, you will need to replace line 122 in {{API.java}} with the following: {code} JSONObject json = null; if(builder.length() != 0) { json = new JSONObject(builder.toString()); } {code} *Steps to reproduce:* # Download and unzip MonkeyArr.zip; this is a *Android Studio* project # Open the project in Android Studio # Next, create an Arrow project and run the Arrow project locally # In the Android project, open {{MainActivity.java}} and change the following: ## Replace the API key in {{MonkeySdk.setAuthorization("71YFaz201s55+Mmvzh5G62sqo3tUwwbS")}}. ## If you are planning to launch against the stock emulator, replace {{10.0.3.2}} with {{10.0.2.2}}; otherwise, leave as-is. # Launch Android app to emualtor or Genymotion emulator # Press the {{Test}} button *Actual:* In logcat, {{org.json.JSONException}} is thrown back in the {{onError}} callback: {code} 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: org.json.JSONException: End of input at character 0 of 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:450) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONTokener.nextValue(JSONTokener.java:97) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONObject.<init>(JSONObject.java:156) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONObject.<init>(JSONObject.java:173) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.API.execute(API.java:122) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.Testuser$5.doInBackground(Testuser.java:276) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.Testuser$5.doInBackground(Testuser.java:268) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.lang.Thread.run(Thread.java:818) {code} *Expected:* {{org.json.JSONException}} should not be thrown back when creating a record.

    Appcelerator JIRA | 10 months ago | Wilson Luu
    org.json.JSONException: End of input at character 0 of
  2. 0

    *Details:* Creating a new record with Arrow Android SDK throws a {{org.json.JSONException}} in the {{onError}} callback. *Notes:* To workaround this issue, you will need to replace line 122 in {{API.java}} with the following: {code} JSONObject json = null; if(builder.length() != 0) { json = new JSONObject(builder.toString()); } {code} *Steps to reproduce:* # Download and unzip MonkeyArr.zip; this is a *Android Studio* project # Open the project in Android Studio # Next, create an Arrow project and run the Arrow project locally # In the Android project, open {{MainActivity.java}} and change the following: ## Replace the API key in {{MonkeySdk.setAuthorization("71YFaz201s55+Mmvzh5G62sqo3tUwwbS")}}. ## If you are planning to launch against the stock emulator, replace {{10.0.3.2}} with {{10.0.2.2}}; otherwise, leave as-is. # Launch Android app to emualtor or Genymotion emulator # Press the {{Test}} button *Actual:* In logcat, {{org.json.JSONException}} is thrown back in the {{onError}} callback: {code} 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: org.json.JSONException: End of input at character 0 of 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:450) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONTokener.nextValue(JSONTokener.java:97) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONObject.<init>(JSONObject.java:156) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at org.json.JSONObject.<init>(JSONObject.java:173) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.API.execute(API.java:122) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.Testuser$5.doInBackground(Testuser.java:276) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at com.monkeysdk.Testuser$5.doInBackground(Testuser.java:268) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 02-09 19:36:11.361 23054-23175/com.appc.monkeyarr W/System.err: at java.lang.Thread.run(Thread.java:818) {code} *Expected:* {{org.json.JSONException}} should not be thrown back when creating a record.

    Appcelerator JIRA | 10 months ago | Wilson Luu
    org.json.JSONException: End of input at character 0 of
  3. 0

    Crashlytics NDK failes to parse NDK crash data

    Stack Overflow | 1 year ago | Fabian Köbel
    org.json.JSONException: End of input at character 0 of
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    End of input at character 0 of

    GitHub | 1 year ago | pedrojb
    org.json.JSONException: End of input at character 0 of

  1. filpgame 50 times, last 6 days ago
  2. bluebunnty 1 times, last 1 month ago
  3. ajinkya_w 4 times, last 2 months ago
  4. pranavprakash 4 times, last 2 months ago
  5. Ranjana Dangol 2 times, last 5 months ago
12 more registered users
32 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.json.JSONException

    End of input at character 0 of

    at org.json.JSONTokener.syntaxError()
  2. Android Platform
    JSONObject.<init>
    1. org.json.JSONTokener.syntaxError(JSONTokener.java:450)
    2. org.json.JSONTokener.nextValue(JSONTokener.java:97)
    3. org.json.JSONObject.<init>(JSONObject.java:156)
    4. org.json.JSONObject.<init>(JSONObject.java:173)
    4 frames
  3. com.monkeysdk
    Testuser$5.doInBackground
    1. com.monkeysdk.API.execute(API.java:122)
    2. com.monkeysdk.Testuser$5.doInBackground(Testuser.java:276)
    3. com.monkeysdk.Testuser$5.doInBackground(Testuser.java:268)
    3 frames
  4. Android Platform
    AsyncTask$2.call
    1. android.os.AsyncTask$2.call(AsyncTask.java:288)
    1 frame
  5. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:237)
    1 frame
  6. Android Platform
    AsyncTask$SerialExecutor$1.run
    1. android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    1 frame
  7. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    3. java.lang.Thread.run(Thread.java:818)
    3 frames