Closed jgw96 closed 6 years ago
From @madEng84 on June 28, 2017 16:41
Ionic version: (check one with "x") [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x ] 3.x
I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: I have called the API https://api.ionic.io/push/notifications/ (http://docs.ionic.io/api/endpoints/push.html#post-notifications).
https://api.ionic.io/push/notifications/
After that i call https://api.ionic.io/push/notifications/:notification_id/ (http://docs.ionic.io/api/endpoints/push.html#get-notifications-notification_id)
https://api.ionic.io/push/notifications/:notification_id/
The response from this API was:
{ "data": { "status": "locked", "config": { "profile": "development_profile", "tokens": [ "a736a6c1a5f432762e02383b90d17530b6b5b97b5b4857b6d1c4b196960b7d4c", "37314d3572813e00a6efaaf47d96bd3eb88576090d10902dcc5995039e5348dc", ], "send_to_all": false, "notification": { "android": { "message": "Your event has been successfully updated" }, "payload": { ... }, "title": "Event Updated", "message": "Your event has been successfully updated", "ios": { "title": "Event Updated", "message": "Your event has been successfully updated" } } }, "uuid": "21db3657-2a9a-44c2-a1d2-e97d3e4ec339", "state": "enqueued", "app_id": "xxxxxx", "created": "2017-06-28T10:01:26.317346+00:00" }, "meta": { "status": 200, "request_id": "ef361853-59c0-4f00-cf66-72839c69a36f", "version": "2.0.0-beta.0" } }
and then if I call https://api.ionic.io/push/notifications/:notification_id/messages/ (http://docs.ionic.io/api/endpoints/push.html#get-notifications-notification_id-messages) i have this response:
https://api.ionic.io/push/notifications/:notification_id/messages/
{ "data": [], "meta": { "status": 200, "request_id": "9dde60bb-c598-43b6-c317-c77ab4701810", "version": "2.0.0-beta.0" } }
Why no messages has been sent even if:
"status": "locked","state": "enqueued"
and there are 2 tokens associated?
In the docs i can read :
state --> Possible Values: ... enqueued : Notification successfully processed. Messages should now be generated. ...
state --> Possible Values:
...
enqueued : Notification successfully processed. Messages should now be generated.
and
status --> Possible Values: ... locked : No modifications can be made as the Notification has already generated messages. ...
status --> Possible Values:
locked : No modifications can be made as the Notification has already generated messages.
I cannot see errors. maybe i have to refresh tokens? If so what exception could i catch to do it?
Expected behavior: For every token i should se a sent message
Thanks in advance!
Copied from original issue: ionic-team/ionic#12195
Hello @madEng84. Would you mind going here and opening an issue for this? Thanks!
From @madEng84 on June 28, 2017 16:41
Ionic version: (check one with "x") [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x ] 3.x
I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: I have called the API
https://api.ionic.io/push/notifications/
(http://docs.ionic.io/api/endpoints/push.html#post-notifications).After that i call
https://api.ionic.io/push/notifications/:notification_id/
(http://docs.ionic.io/api/endpoints/push.html#get-notifications-notification_id)The response from this API was:
and then if I call
https://api.ionic.io/push/notifications/:notification_id/messages/
(http://docs.ionic.io/api/endpoints/push.html#get-notifications-notification_id-messages) i have this response:Why no messages has been sent even if:
and there are 2 tokens associated?
In the docs i can read :
and
I cannot see errors. maybe i have to refresh tokens? If so what exception could i catch to do it?
Expected behavior: For every token i should se a sent message
Thanks in advance!
Copied from original issue: ionic-team/ionic#12195