mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 07:45:53 +03:00
[GH-ISSUE #463] Message Results API always returns an empty message_result array #327
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#327
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrAutoIt on GitHub (Jan 8, 2017).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/463
Expected behavior
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
Actual behavior
The message_results array always comes back empty.
Steps to reproduce the behavior
Per the documentation we are sending "message_uuids" through the GET task=result. It response to the API with something like this:
However, the POST task=results always sends back an empty array. Like this:
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.
@rjmackay commented on GitHub (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 commented on GitHub (Jan 25, 2017):
SMSSync v3.0.5
The wrong data is sent back by SMSSync. Or to be more clear just an empty array.
@damien-roche commented on GitHub (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 commented on GitHub (Jan 29, 2017):
@dalezak @brandonrosage flagging this as well for you to look into
@khilje125 commented on GitHub (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 commented on GitHub (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 commented on GitHub (Nov 2, 2017):
PR above fixes the issue, tested with my production app and everything has cleaned up and marked delivered.