[GH-ISSUE #233] Crash on sending a SMS which fails #171

Closed
opened 2026-02-28 01:23:31 +03:00 by kerem · 6 comments
Owner

Originally created by @sorinpohontu on GitHub (Jan 21, 2015).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/233

Originally assigned to: @eyedol on GitHub.

Hello.

I'm in the final steps of integration with SMSSync and I've made a test with a SMS which will fail (in my case, Insufficient credit available).

In this case, SMSSync is crashing, after trying to re-send the message 10 or 11 times.

Android version: 4.2.2
SMSSync: 2.7.3

Here is the SMSync Log:

21-01 12:10 TaskCheckResponse: SmssyncResponse{payload=Payload{messages=[Message{message='Test Error', to='+40xxxxxxxxx', timestamp='null', uuid='df5edd9b-a143-11e4-aac1-2a042924705e', mMessageType=0, mSentResultCode=-2, mSentResultMessage='', mDeliveryResultCode=-2, mDeliveryResultMessage='', mMessageList=[]}], task='send', secret='567890', error='null', success=true}}
21-01 12:10 SMSsync has completed processing this message.
21-01 12:10 Sending - [ Test Error ] as SMS to [ +40xxxxxxxxx ]
21-01 12:10 Processed task to send message - [ Test Error ] as SMS
21-01 12:10 Successfully finished performing task checking null
21-01 12:10 Failed to send SMS - Maybe insufficient air time on the phone.
21-01 12:10 Received SMS - [ Insufficient credit to send this message. ] from [ Notification ]
21-01 12:10 HTTP Entity format is [ URLEncoded ]
21-01 12:10 SMS [ Insufficient credit to send this message. ] successfully sent to [ http://www.example.com/sync/1 ] 

The message is still in SMSSync queue and will be retried a few times (note: it should be possible to set the number of retries), until the app crash.
There is no error in SMSSync log.

But, there are some errors and exceptions in system logs:

W/System.err(19080):    at org.addhen.smssync.controllers.MessageResultsController.parseMessagesUUIDSResponse(MessageResultsController.java:207)
W/System.err(19080):    at org.addhen.smssync.controllers.MessageResultsController.sendMessageResultGETRequest(MessageResultsController.java:178)
W/System.err(19080):    at org.addhen.smssync.services.MessageResultsScheduledService.executeTask(MessageResultsScheduledService.java:37)
W/System.err(19080):    at org.addhen.smssync.services.SmsSyncServices.onHandleIntent(SmsSyncServices.java:130)

followed by

W/Intent  (  542): java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = org.addhen.smssync.models.Message)
W/Intent  (  542): Caused by: java.lang.ClassNotFoundException: org.addhen.smssync.models.Message
W/Intent  (  542): Caused by: java.lang.NoClassDefFoundError: org/addhen/smssync/models/Message
W/Intent  (  542): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.addhen.smssync.models.Message" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

You'll find the complete log here: https://gist.github.com/sorinpohontu/5c571dcd1beb69c6511f

Let me know if you need more info.

Have a nice day,
/Sorin

Originally created by @sorinpohontu on GitHub (Jan 21, 2015). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/233 Originally assigned to: @eyedol on GitHub. Hello. I'm in the final steps of integration with SMSSync and I've made a test with a SMS which will fail (in my case, Insufficient credit available). In this case, SMSSync is crashing, after trying to re-send the message 10 or 11 times. Android version: 4.2.2 SMSSync: 2.7.3 Here is the SMSync Log: ``` 21-01 12:10 TaskCheckResponse: SmssyncResponse{payload=Payload{messages=[Message{message='Test Error', to='+40xxxxxxxxx', timestamp='null', uuid='df5edd9b-a143-11e4-aac1-2a042924705e', mMessageType=0, mSentResultCode=-2, mSentResultMessage='', mDeliveryResultCode=-2, mDeliveryResultMessage='', mMessageList=[]}], task='send', secret='567890', error='null', success=true}} 21-01 12:10 SMSsync has completed processing this message. 21-01 12:10 Sending - [ Test Error ] as SMS to [ +40xxxxxxxxx ] 21-01 12:10 Processed task to send message - [ Test Error ] as SMS 21-01 12:10 Successfully finished performing task checking null 21-01 12:10 Failed to send SMS - Maybe insufficient air time on the phone. 21-01 12:10 Received SMS - [ Insufficient credit to send this message. ] from [ Notification ] 21-01 12:10 HTTP Entity format is [ URLEncoded ] 21-01 12:10 SMS [ Insufficient credit to send this message. ] successfully sent to [ http://www.example.com/sync/1 ] ``` The message is still in SMSSync queue and will be retried a few times (note: it should be possible to set the number of retries), until the app crash. There is no error in SMSSync log. But, there are some errors and exceptions in system logs: ``` W/System.err(19080): at org.addhen.smssync.controllers.MessageResultsController.parseMessagesUUIDSResponse(MessageResultsController.java:207) W/System.err(19080): at org.addhen.smssync.controllers.MessageResultsController.sendMessageResultGETRequest(MessageResultsController.java:178) W/System.err(19080): at org.addhen.smssync.services.MessageResultsScheduledService.executeTask(MessageResultsScheduledService.java:37) W/System.err(19080): at org.addhen.smssync.services.SmsSyncServices.onHandleIntent(SmsSyncServices.java:130) ``` followed by ``` W/Intent ( 542): java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = org.addhen.smssync.models.Message) W/Intent ( 542): Caused by: java.lang.ClassNotFoundException: org.addhen.smssync.models.Message W/Intent ( 542): Caused by: java.lang.NoClassDefFoundError: org/addhen/smssync/models/Message W/Intent ( 542): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.addhen.smssync.models.Message" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]] ``` You'll find the complete log here: https://gist.github.com/sorinpohontu/5c571dcd1beb69c6511f Let me know if you need more info. Have a nice day, /Sorin
kerem 2026-02-28 01:23:31 +03:00
Author
Owner

@sorinpohontu commented on GitHub (Jan 21, 2015):

Hello. I've tried debug the application and to see on log exactly when "Unfortunately, SMSsync has stopped" and it seems to be here:

E/AndroidRuntime(20253): java.lang.RuntimeException: Unable to create service org.addhen.smssync.services.AutoSyncScheduledService: java.lang.IllegalArgumentException: Producer method for type boolean found on type class org.addhen.smssync.services.AutoSyncScheduledService, but already registered by type class org.addhen.smssync.services.SmsReceiverService.
E/AndroidRuntime(20253): Caused by: java.lang.IllegalArgumentException: Producer method for type boolean found on type class org.addhen.smssync.services.AutoSyncScheduledService, but already registered by type class org.addhen.smssync.services.SmsReceiverService.
E/AndroidRuntime(20253):    at org.addhen.smssync.SyncBus.register(SyncBus.java:43)
E/AndroidRuntime(20253):    at org.addhen.smssync.services.SmsSyncServices.onCreate(SmsSyncServices.java:100)

Hope that would help :)

<!-- gh-comment-id:70860497 --> @sorinpohontu commented on GitHub (Jan 21, 2015): Hello. I've tried debug the application and to see on log exactly when "Unfortunately, SMSsync has stopped" and it seems to be here: ``` E/AndroidRuntime(20253): java.lang.RuntimeException: Unable to create service org.addhen.smssync.services.AutoSyncScheduledService: java.lang.IllegalArgumentException: Producer method for type boolean found on type class org.addhen.smssync.services.AutoSyncScheduledService, but already registered by type class org.addhen.smssync.services.SmsReceiverService. E/AndroidRuntime(20253): Caused by: java.lang.IllegalArgumentException: Producer method for type boolean found on type class org.addhen.smssync.services.AutoSyncScheduledService, but already registered by type class org.addhen.smssync.services.SmsReceiverService. E/AndroidRuntime(20253): at org.addhen.smssync.SyncBus.register(SyncBus.java:43) E/AndroidRuntime(20253): at org.addhen.smssync.services.SmsSyncServices.onCreate(SmsSyncServices.java:100) ``` Hope that would help :)
Author
Owner

@sorinpohontu commented on GitHub (Jan 21, 2015):

And an additional note: The app still crashed if "Enable Message Results API" is disabled, with same error in syslog as above (Producer method for type boolean found ...).

Initially, I had the impression that it related to Message Results API response.

<!-- gh-comment-id:70863704 --> @sorinpohontu commented on GitHub (Jan 21, 2015): And an additional note: The app still crashed if "Enable Message Results API" is disabled, with same error in syslog as above (Producer method for type boolean found ...). Initially, I had the impression that it related to Message Results API response.
Author
Owner

@eyedol commented on GitHub (Jan 21, 2015):

@sorinpohontu These are helpful. We will push a fix soon. Thanks

<!-- gh-comment-id:70941165 --> @eyedol commented on GitHub (Jan 21, 2015): @sorinpohontu These are helpful. We will push a fix soon. Thanks
Author
Owner

@eyedol commented on GitHub (Jan 24, 2015):

@sorinpohontu want to test the fix? I can't really produce it on my device. You can catch me on IRC freenode.net, #ushahidi

<!-- gh-comment-id:71296371 --> @eyedol commented on GitHub (Jan 24, 2015): @sorinpohontu want to test the fix? I can't really produce it on my device. You can catch me on IRC freenode.net, #ushahidi
Author
Owner

@eyedol commented on GitHub (Apr 20, 2015):

@sorinpohontu could you confirm this is fixed in v2.8.0-rc.1

<!-- gh-comment-id:94455839 --> @eyedol commented on GitHub (Apr 20, 2015): @sorinpohontu could you confirm this is fixed in [v2.8.0-rc.1](https://github.com/ushahidi/SMSSync/releases/tag/v2.8.0-rc.1)
Author
Owner

@sorinpohontu commented on GitHub (Apr 20, 2015):

@eyedol Seems to be fixed :)

<!-- gh-comment-id:94466345 --> @sorinpohontu commented on GitHub (Apr 20, 2015): @eyedol Seems to be fixed :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#171
No description provided.