Ionic Push one-time push notifications stopped working even though code didn't change [solved]

Yesterday, after following the directions on, I successfully sent many one-time push notifications from the dashboard.

I then wanted to test target push notifications, which requires using the Ionic User service.

I added this code per the docs:

// kick off the platform web client;

// this will give you a fresh user or the previously saved 'current user'
var user = Ionic.User.current();

// if the user doesn't have an id, you'll need to give it one.
if (! { = Ionic.User.anonymousId();
  // = 'your-custom-user-id';

//persist the user;

At that point, I re-ran ionic build ios and then, with my phone plugged in via usb to my computer, re-built the app from Xcode, which relaunched the app. I then tried to use target push notifications, but they weren’t going through. So, just to test push notifications in general, I tried sending a one-time push notification again. This time, the push notification did not work. Eventually, I realized that the target notifications were trying to use user_ids and not device tokens. This was the state of my code at that time:

So, I removed the Ionic User code above and tried resetting my code back to the state it was in when I first got one-time pushes to work. Unfortunately, I can no longer get the pushes to trigger.

This is an example response code when I send a one-time push:


and this is an example message status if I check on that message id:


I tried getting support from the developers on Ionic Platform services (at, but one of the developers told me: “I’d remove the; call from after your push code. Other than that, you code looks good. The push server appears stable on our end, however, so I’m wondering if anything’s up with your credentials or the token you’re using.”

I haven’t been able to get any guidance on how to verify my credentials or tokens.

Anyway, I’m completely blocked on this and would love some guidance.


I don’t see a onNotification handler in you app.js file. See this link: here you can see what you need use to get notifications on you device.

1 Like

Hey Johnno, thanks for getting back to me. I finally learned that I hadn’t set dev_push to false and that was prevent the pushes from going through. Now that I have the pushes working, I definitely need to review the Push Usage docs to setup configuration. Thank you!