Ionic Push API Error 415 Unsupported Media Type ....HELP!

I am trying to get Ionic Push Notifications working in dev mode. I have the web-platform installed, got my GCM project number, done all the steps in the tutorial, added my code to $ionicPlatform.ready(function()

var push = new Ionic.Push({
			"debug": true
		push.register(function (token) {
			console.log("Device token:", token.token);

But when it makes the push.register call I am getting an error saying 415 Unsupported Media Type

POST 415 (Unsupported Media Type)

after a few minutes also get this error:
Ionic Push (dev): error connecting development push service.

Any ideas why it will not connect? I am connecting fine when I test it from the cmd line.



So I have now created a new project from scratch, made sure ionic and cordova were up to date. Followed the ionic push setup step by step…but I am still getting the 415 Unsupported Media Type error.

When I send a push notification from the ionic platform console it doesn’t come through on the app. I can see the activity on my GCM account but the app will not register and receive the notification.

Any ideas?



415 (Unsupported Media Type) may be overcome by trying to configure CORS on the server (i.e. your app on Heroku) to whitelist your client domain, POST methods, and expose “Content-Type” and “Accept”, which are associated with media types.

Ionic Push (dev): error connecting development push service may be overcome by updating index.html and adding the following to the Content-Security-Policy meta tag connect-src self