You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Message Results API always returns an empty message_result array #463
When the Message Results API doses a post task results it should post the message_result array like in the example the documentation.
POST http://localhost/sms/index.php?task=result
However, the POST task=results always sends back an empty array. Like this:
{
"message_result": []
}
Any help would be greatly appreciated. We have tried everything we can think of and are out of ideas on why the delivery report does not seem be working.
.. it proceeds to POST an empty message_result to /sync?task=result..
Started POST "/api/sync?task=result" for 68.104.79.58 at 2017-01-27 22:10:45 +0000
Processing by Api::MessagesController#post as JSON
Parameters: {"message_result"=>"[]", "task"=>"result", "message"=>{}}
Application settings:
Settings >> General >> SMS Delivery Report (enabled)
Settings >> Task >> Enable Task Checking (enabled)
Settings >> Task >> Set A Specific Time Frequency (1 minute)
Settings >> Task >> Enable Message Results API (enabled)
SMSSync Version 3.1.1
I have an API all is working fine. Even Delivery reports activated on Network provider. But SMSSync always respond back an empty Json Array while getting Delivery response.
For Example i send following In Get Request From API to SMSSync
URL : http://mydomain.com/api/SMSAPI/SMSSyncGateway?task=result
Response Data From API to SMSSync :
Suppose these UUID's awaiting for Delivery report.
But in Post Request From SMSSync to API
Delivery Result :{
"message_result": "[]"
}
Please respond me back where i doing wrong in setting. In SMSSync SMS Develiery repost is Checked.
If any one have some solution is would be greatly Thanks full.
Easy one to fix. Issue is its only sending pending messages back to the API (which by this step there shouldnt be any) and failed messages because its using mMessageDataSource.fetchPendingByUuid(uuid).
Message message = mMessageDataSource.fetchByUuid(uuid); if (message.status != Message.Status.UNCONFIRMED.name()) {
I'll open a PR if it'll get merged. This is untested at the moment will fork, compile and test unless you guys (@eyedol) can do in the next couple of hours?
Activity
rjmackay commentedon Jan 25, 2017
Its not clear. Is this the wrong data sent to your API by SMSSync? or the wrong data return by the API (Ushahidi v2 or v3) ?
MrAutoIt commentedon Jan 25, 2017
SMSSync v3.0.5
The wrong data is sent back by SMSSync. Or to be more clear just an empty array.
damienrch commentedon Jan 27, 2017
@rjmackay I have recently created a simple service to test this and run into exactly the same problem.
Everything works up until delivery reports - creating messages, queuing, sending..
But despite the android app receiving the correct message uuids from the GET /sync?task=result endpoint (from logs triggered by android app):
..triggered by console..
.. it proceeds to POST an empty
message_resultto /sync?task=result..Application settings:
Settings >> General >> SMS Delivery Report (enabled)
Settings >> Task >> Enable Task Checking (enabled)
Settings >> Task >> Set A Specific Time Frequency (1 minute)
Settings >> Task >> Enable Message Results API (enabled)
aoduor commentedon Jan 29, 2017
@dalezak @brandonrosage flagging this as well for you to look into
khilje125 commentedon Apr 30, 2017
SMSSync Version 3.1.1
I have an API all is working fine. Even Delivery reports activated on Network provider. But SMSSync always respond back an empty Json Array while getting Delivery response.
For Example i send following In Get Request From API to SMSSync
URL : http://mydomain.com/api/SMSAPI/SMSSyncGateway?task=result
Response Data From API to SMSSync :
Suppose these UUID's awaiting for Delivery report.
But in Post Request From SMSSync to API
Please respond me back where i doing wrong in setting. In SMSSync SMS Develiery repost is Checked.
If any one have some solution is would be greatly Thanks full.
MajorChump commentedon Nov 2, 2017
Easy one to fix. Issue is its only sending pending messages back to the API (which by this step there shouldnt be any) and failed messages because its using
mMessageDataSource.fetchPendingByUuid(uuid).https://github.com/ushahidi/SMSSync/blob/master/smssync/src/main/java/org/addhen/smssync/data/message/ProcessMessageResult.java#L97
Code should be something a long the lines of:
Message message = mMessageDataSource.fetchByUuid(uuid);if (message.status != Message.Status.UNCONFIRMED.name()) {I'll open a PR if it'll get merged. This is untested at the moment will fork, compile and test unless you guys (@eyedol) can do in the next couple of hours?
MajorChump commentedon Nov 2, 2017
PR above fixes the issue, tested with my production app and everything has cleaned up and marked delivered.