When I send a push the user's token disappears

Hey guys,

The user’s token are stored correctly on each profile (checking on apps.ionic.io). However when I send a push using curl, the results is that the token is removed from that specific profile, and the user never receives the push. If I register the user again, then he gets the very same token, but after sending a push the history is the same.

Any thoughts?

ionic plugin list
cordova-plugin-datepicker 0.9.2 "DatePicker"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-deploy 0.5.6 "IonicDeploy"
phonegap-plugin-push 1.6.3 “PushPlugin”

Thanks guys!

Hi,
Follow this official ngCordova documentation
http://ngcordova.com/docs/plugins/pushNotifications/ . I used to store user tokens in database .
What is apps.ionic.io…?

Thanks @nagarjunbn8, I will check it out the latest version (V5). apps.ionic.io is the dashboard that Ionic provides in order to upload your apps, send pushs, manage the users, and so on. Its the place where you can also check the token of the users, so you can specify that info if you want to target specific users for the pushs.

Cheers!

Hi there,

I have recently noticed I am having the same problem. This is something that was working fine and suddenly the tokens started to be removed from a user when sending a push. This happens even if you do a test push through the ionic.io interface.

I have also noticed that it doesn’t seem to remove the tokens of android devices, only that of iOS.

Regards

@iontofer I seem to have gotten this working again. I had to re-setup my environment as I had an unrelated issue with my Mac. After setting up Xcode again and loading the push certificates back into my Keychain and then rebuilding my app the iOS device tokens no longer disappear when I send push notifications. Perhaps try and make sure all your certificates are correctly setup in your keychain.

Hope this helps
Cheers

Apologies for the back and forth here but this actually only started working for one device and isn’t actually resolved. Other devices/users are still having their tokens disappear when you try send to them.

thats pretty bad! Ionics support have not andwered my question yet, we have to find another service for push notificacion, it seems to be far far far away from been trustable :frowning:

I finally managed to figure this out for myself. What I was seeing was that if I installed the app on my phone directly using XCode then the device token was not disappearing. It would only disappear when I installed the app using Test Flight. Then I noticed that in apps.Ionic.io under certificates I only had a development security profile setup. So I created a Production security profile and uploaded my production certificate. After doing that and sending my push using the newly created production security profile my device tokens were no longer disappearing and my notifications are being received. Hope this helps anybody else struggling with this.

thanks for sharing your steps, however I was trying since the begining with my prod environment :frowning:

I’m testing external push services in order to avoid these kind of problems.

Cheers!

This is also happening to me… I’m puzzled… I’ve just updated my certs because I changed the Apple Developer program from personal to company, and the app gets the registration token correctly from Apple, but when I send a notification via API, the token in the Ionic.io dashboard disappears…

@Aaronwmorse I’ve created a new security profile in the ionic.io dashboard but still not working… how did you solve it? any additional tweak?

Edit:

SOLVED

The error was that I was trying to install the app via ad-hoc but the device wasn’t included in the provisioning profile… after including it everything works ok apparently. I will report back if something continues failing…