ushahidi / SMSSync

SMS gateway for Android powered phones
http://smssync.ushahidi.com
GNU Lesser General Public License v3.0
1.14k stars 492 forks source link

SMSSync Crashing constantly #371

Open aoduor opened 8 years ago

aoduor commented 8 years ago

Via Renee Black

"All devices get the 'SMS has stopped' error at some point. The frequency is a deal breaking on our Blu phone. Less problematic on the Nexus 5 and the Samsung Duos but still an issue.

PeaceGeeks commented 8 years ago

Hi all -

We have been trying this on several devices and using two versions 2.8.3 and 3.0.4.

3.0.4 is much easier to set up, but it ultimately unusable because it crashes so frequently.

2.8.3 crashes less, but crashes to the point of being useless on our Blu device. It also crasheds on my LG Nexus 5 and on the Samsung Duos which Ushahidi purchased and set up on our behalf for the purpose of this project.

We had - with Robbie's help - gotten 2.8.3 successfully working a few days ago, however when I was in the field (Nakuru town, Kenya) trying to demo the exact same setup at our partner's office, it did not work. I will paste the logs below. We can find nothing specific enough in the logs to be of value. The only theory I could come up with is that the internet was too weak, though it was strong enough to download SMSSync, access FB and Gmail.

PeaceGeeks commented 8 years ago

Phone status Battery level[ 24 ] Data connection[ Yes ]

Log entries below

          <div class="site-slogan">Incidents reported from the field</div>

          <nav id="navigation" class="container menu ">
      <div class="container-inner">
          <div class="region region-navigation-region">
<div id="block-superfish-1" class="block block-superfish block-odd first clearfix">
``` ```
      </div>
    </nav> <!-- /navigation -->
      </div>

```

Page not found

```
```
The requested page "/http://sms.cepo-southsudan.org/amani/sms?task=send&secret=12345678" could not be found.
```
```
```
``` 02-15 14:00 Task crashed: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ response: Page not found | CEPO SMS Reporting
```

Page not found

```
```
The requested page "/http://sms.cepo-southsudan.org/amani/sms?task=send&secret=12345678" could not be found.
```
```
```
```
02-15 14:00 Successfully finished performing task checking null 02-15 14:00 Sending message to the server failed. Server error: bad http return code Server returned HTTP status code is 404. 02-15 14:20 The device has shutdown at 2:20 PM 02-15 14:22 The device has rebooted 02-15 14:22 Updated scheduler interval 02-15 14:22 Updated scheduler interval 02-15 14:22 Performing task checking 02-15 14:22 setHttpEntity format JSON 02-15 14:22 There is active data connection 02-15 14:22 Task crashed: Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname response: null 02-15 14:22 Successfully finished performing task checking null 02-15 14:22 Performing task checking 02-15 14:22 Task crashed: Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname response: null 02-15 14:22 Successfully finished performing task checking null 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Sending message to the server failed. Server error: Request failed. Unable to resolve host "sms.cepo-southsudan.org": No address associated with hostname 02-15 14:23 setHttpEntity format JSON 02-15 14:23 Performing task checking 02-15 14:24 Task crashed: Connect to /172.22.2.38:8080 timed out response: null 02-15 14:24 Sending message to the server failed. Server error: Request failed. Connect to /172.22.2.38:8080 timed out 02-15 14:24 Successfully finished performing task checking null 02-15 14:24 setHttpEntity format JSON
DPanger13 commented 8 years ago

Just started looking into this project so I apologize if I'm not totally knowledgeable yet. But if all this log output is coming from the Android app, this:

02-15 14:00 Task crashed: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

happens in one of the *HttpClient classes when attempting to use a JSON parser on something else (looks like it's HTML). The code looks good but the app is getting a response that isn't JSON.

Also, I'm still trying to get fully knowledgeable on the project, but the various "Unable to resolve host" errors seem to point to the server as well. Has the endpoint for sending messages been changed or not set up? Also, is the server configured to properly return JSON?

***Also, I haven't been able to test the app due to not being able to set up a Sync URL. Any reference/help to the values I can input to custom create one (as the Twitter one does not work) would be greatly appreciated.