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

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • End of input at character 0 of
    via GitHub by pedrojb
    ,
  • Get Data from Mysql Android
    via Stack Overflow by TheLietuvis
    ,
  • pastebin - Miscellany - post number 3043778
    via by Unknown author,
  • *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.
    via by Wilson Luu,
  • GitHub comment 119#216730446
    via GitHub by gouravd
    ,
  • Post JSON Array to a webservice in android
    via Stack Overflow by Naveen
    ,
    • org.json.JSONException: End of input at character 0 of at org.json.JSONTokener.syntaxError(JSONTokener.java:450) at org.json.JSONTokener.nextValue(JSONTokener.java:97) at org.json.JSONObject.<init>(JSONObject.java:156) at org.json.JSONObject.<init>(JSONObject.java:173) at com.example.theol.opsc7312_assign2_14001515_theolin_naidoo.MainActivity$ReadJSONFeed.onPostExecute(MainActivity.java:74) at com.example.theol.opsc7312_assign2_14001515_theolin_naidoo.MainActivity$ReadJSONFeed.onPostExecute(MainActivity.java:46) at android.os.AsyncTask.finish(AsyncTask.java:636) at android.os.AsyncTask.access$500(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

    Users with the same issue

    Unknown User
    Unknown User5 times, last one,
    pranavprakash
    pranavprakash4 times, last one,
    dmitry
    dmitry32 times, last one,
    Hiren Amaliyar
    Hiren Amaliyar4 times, last one,
    justCodeit
    justCodeit12 times, last one,
    82 more bugmates