org.json.JSONException: JSONObject["port"] not found.

Appcelerator JIRA | Bill Dawson | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    * Open Ti Studio (no emulator should be open already) * Open a mobile project * Set a breakpoint somewhere in app.js * Debug-launch the app Because the emulator isn't already running, it is -- of course -- launched. The app gets installed successfully, but the breakpoint is not hit. The problem is _not_ a timeout for the debugger, rather: {code} D/KrollProxy( 250): (main) [7,230] New: AndroidModule D/KrollProxy( 250): (main) [37,267] New: DebugModule D/DebugModule( 250): (main) [13,280] Read debug config: {"enabled":false} E/DebugModule( 250): (main) [3,283] JSONObject["port"] not found. E/DebugModule( 250): org.json.JSONException: JSONObject["port"] not found. E/DebugModule( 250): at org.json.JSONObject.get(JSONObject.java:287) E/DebugModule( 250): at org.json.JSONObject.getInt(JSONObject.java:347) E/DebugModule( 250): at ti.modules.titanium.debug.DebugModule.readDebugConfig(DebugModule.java:75) E/DebugModule( 250): at ti.modules.titanium.debug.DebugModule.<init>(DebugModule.java:39) E/DebugModule( 250): at com.billdawson.membust.MembustApplication.bootModules(MembustApplication.java:53) E/DebugModule( 250): at org.appcelerator.titanium.TiApplication.bindModules(TiApplication.java:99) E/DebugModule( 250): at org.appcelerator.titanium.kroll.KrollBridge.<init>(KrollBridge.java:39) E/DebugModule( 250): at org.appcelerator.titanium.TiContext.createTiContext(TiContext.java:318) E/DebugModule( 250): at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:89) E/DebugModule( 250): at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:40) E/DebugModule( 250): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) E/DebugModule( 250): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) E/DebugModule( 250): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) E/DebugModule( 250): at android.app.ActivityThread.access$2200(ActivityThread.java:119) E/DebugModule( 250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) E/DebugModule( 250): at android.os.Handler.dispatchMessage(Handler.java:99) E/DebugModule( 250): at android.os.Looper.loop(Looper.java:123) E/DebugModule( 250): at android.app.ActivityThread.main(ActivityThread.java:4363) E/DebugModule( 250): at java.lang.reflect.Method.invokeNative(Native Method) E/DebugModule( 250): at java.lang.reflect.Method.invoke(Method.java:521) E/DebugModule( 250): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/DebugModule( 250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/DebugModule( 250): at dalvik.system.NativeStart.main(Native Method) {code}

    Appcelerator JIRA | 6 years ago | Bill Dawson
    org.json.JSONException: JSONObject["port"] not found.
  2. 0

    * Open Ti Studio (no emulator should be open already) * Open a mobile project * Set a breakpoint somewhere in app.js * Debug-launch the app Because the emulator isn't already running, it is -- of course -- launched. The app gets installed successfully, but the breakpoint is not hit. The problem is _not_ a timeout for the debugger, rather: {code} D/KrollProxy( 250): (main) [7,230] New: AndroidModule D/KrollProxy( 250): (main) [37,267] New: DebugModule D/DebugModule( 250): (main) [13,280] Read debug config: {"enabled":false} E/DebugModule( 250): (main) [3,283] JSONObject["port"] not found. E/DebugModule( 250): org.json.JSONException: JSONObject["port"] not found. E/DebugModule( 250): at org.json.JSONObject.get(JSONObject.java:287) E/DebugModule( 250): at org.json.JSONObject.getInt(JSONObject.java:347) E/DebugModule( 250): at ti.modules.titanium.debug.DebugModule.readDebugConfig(DebugModule.java:75) E/DebugModule( 250): at ti.modules.titanium.debug.DebugModule.<init>(DebugModule.java:39) E/DebugModule( 250): at com.billdawson.membust.MembustApplication.bootModules(MembustApplication.java:53) E/DebugModule( 250): at org.appcelerator.titanium.TiApplication.bindModules(TiApplication.java:99) E/DebugModule( 250): at org.appcelerator.titanium.kroll.KrollBridge.<init>(KrollBridge.java:39) E/DebugModule( 250): at org.appcelerator.titanium.TiContext.createTiContext(TiContext.java:318) E/DebugModule( 250): at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:89) E/DebugModule( 250): at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:40) E/DebugModule( 250): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) E/DebugModule( 250): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) E/DebugModule( 250): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) E/DebugModule( 250): at android.app.ActivityThread.access$2200(ActivityThread.java:119) E/DebugModule( 250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) E/DebugModule( 250): at android.os.Handler.dispatchMessage(Handler.java:99) E/DebugModule( 250): at android.os.Looper.loop(Looper.java:123) E/DebugModule( 250): at android.app.ActivityThread.main(ActivityThread.java:4363) E/DebugModule( 250): at java.lang.reflect.Method.invokeNative(Native Method) E/DebugModule( 250): at java.lang.reflect.Method.invoke(Method.java:521) E/DebugModule( 250): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/DebugModule( 250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/DebugModule( 250): at dalvik.system.NativeStart.main(Native Method) {code}

    Appcelerator JIRA | 6 years ago | Bill Dawson
    org.json.JSONException: JSONObject["port"] not found.
  3. 0

    Cloud search for "alice" fails

    GitHub | 3 years ago | dschuermann
    com.textuality.keybase.lib.KeybaseException: JSON error in Keybase query
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to parse a JSON with 2 json merged in one

    Stack Overflow | 3 years ago | user3229208
    org.json.JSONException: No value for id_alumno
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

    JSONObject["port"] not found.

    at org.json.JSONObject.get()
  2. Android Platform
    JSONObject.getInt
    1. org.json.JSONObject.get(JSONObject.java:287)
    2. org.json.JSONObject.getInt(JSONObject.java:347)
    2 frames
  3. ti.modules.titanium
    DebugModule.<init>
    1. ti.modules.titanium.debug.DebugModule.readDebugConfig(DebugModule.java:75)
    2. ti.modules.titanium.debug.DebugModule.<init>(DebugModule.java:39)
    2 frames
  4. com.billdawson.membust
    MembustApplication.bootModules
    1. com.billdawson.membust.MembustApplication.bootModules(MembustApplication.java:53)
    1 frame
  5. org.appcelerator.titanium
    TiRootActivity.onCreate
    1. org.appcelerator.titanium.TiApplication.bindModules(TiApplication.java:99)
    2. org.appcelerator.titanium.kroll.KrollBridge.<init>(KrollBridge.java:39)
    3. org.appcelerator.titanium.TiContext.createTiContext(TiContext.java:318)
    4. org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:89)
    5. org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:40)
    5 frames
  6. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
    3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
    4. android.app.ActivityThread.access$2200(ActivityThread.java:119)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
    6. android.os.Handler.dispatchMessage(Handler.java:99)
    7. android.os.Looper.loop(Looper.java:123)
    8. android.app.ActivityThread.main(ActivityThread.java:4363)
    8 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:521)
    2 frames
  8. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    2 frames
  9. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame