Bug #1155
JSONObject casting error on server response
Status: | Closed | Start date: | 04/18/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | 04/18/2013 | |
Assignee: | n8fr8 | % Done: | 0% | |
Category: | - | |||
Target version: | InformaCam - Public Preview v1 | |||
Component: |
Description
Seems like server returned an error message, and code was expecting JSON.
so 1) what is the error all about, and 2) we should handle the error message!
04-18 16:21:25.225: E/******************** InformaCam : Transport ************(29818): java.lang.ClassCastException: java.lang.String cannot be cast to org.json.JSONObject
04-18 16:21:25.233: W/System.err(29818): java.lang.ClassCastException: java.lang.String cannot be cast to org.json.JSONObject
04-18 16:21:25.241: W/System.err(29818): at org.witness.informacam.transport.HttpUtility.parseResponse(HttpUtility.java:88)
04-18 16:21:25.241: W/System.err(29818): at org.witness.informacam.transport.HttpUtility.access$0(HttpUtility.java:68)
04-18 16:21:25.241: W/System.err(29818): at org.witness.informacam.transport.HttpUtility$2.call(HttpUtility.java:158)
04-18 16:21:25.241: W/System.err(29818): at org.witness.informacam.transport.HttpUtility$2.call(HttpUtility.java:1)
04-18 16:21:25.241: W/System.err(29818): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
04-18 16:21:25.241: W/System.err(29818): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
04-18 16:21:25.248: W/System.err(29818): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
04-18 16:21:25.248: I/Posix(29818): path: /24ecc8346bf832b72311f91f9098105ae44883/IMG_20130418_154752_thumb.jpg 0 0
04-18 16:21:25.248: W/System.err(29818): at java.lang.Thread.run(Thread.java:856)
04-18 16:21:25.248: D/******************** InformaCam : Transport ************(29818): REQUEST RESULT:
04-18 16:21:25.248: D/******************** InformaCam : Transport ************(29818): HTTP/1.1 405 Method Not Allowed
04-18 16:21:25.248: D/******************** InformaCam : Transport ************(29818): <html><title>405: Method Not Allowed</title><body>405: Method Not Allowed</body></html>
04-18 16:21:25.248: I/Posix(29818): sqlfs_proc_open
History
#1 Updated by n8fr8 almost 5 years ago
Here is the IConnection JSON:
04-18 16:21:23.483: D/******************** InformaCam : Transport ************(29818): Sending to server: {"port":8080,"_id":1366311091847,"knownCallback":0,"isHeld":true,"data":[{"source":201,"key":"publicCredentials","entityName":"publicCredentials"}],"numTries":37,"method":"post","params":[{"value":"742257f4d69a7b1750c580b9d6222f612f7b0a44","key":"pgpKeyFingerprint"},{"value":"natmanfoo","key":"alias"}],"type":799,"url":"https:\/\/ec2-107-22-45-79.compute-1.amazonaws.com","isSticky":false,"destination":{"organizationDetails":"London, UK","identity":{},"organizationFingerprint":"d6beb35df8e332380d38caab62c36cb914534ff5","requestPort":443,"organizationName":"International Bar Association","transportCredentials":{},"requestUrl":"https:\/\/ec2-107-22-45-79.compute-1.amazonaws.com:8080"}}
#2 Updated by harlo almost 5 years ago
i think the error is that it's attempting to hit port 443 rather than 8080.
#3 Updated by blmak almost 5 years ago
If you need some assistance with this let me know. Harlo, I'd just need ssh access to instance you have setup. I'm not sure of the full setup you have running. But I do know that the tornado api stuff is set for 443/ssl in the code i pulled from your git repo, so maybe this is causing a conflict, if you have the hidden services still running on lighttd??
#4 Updated by harlo almost 5 years ago
barbra-- just sent you the key
#5 Updated by harlo over 4 years ago
- Status changed from New to Closed
I'm pretty sure this issue is solved, but please re-open if necessary.