One of the reasons for that is when an "app owner check" fails. Unfortunately, the message returned is unclear at this point... Something to improve.
This is what "app owner check" means: When you post a message, GCM for Chrome verifies that the user account that was used to obtain the Oauth tokens is the same as the one used to publish the Chrome app that is the receiver in Chrome Web Store. If they don't match, the message post fails with the 500 error. This is done to prevent someone else from posting notifications for your app.
That means that if you created an app and never published it in Web Store (and just load it unpackaged for testing for example) - it will always fail like this because GCM does not know who owns the app. When publishing the app to the Store, use the same google account that was used in Api Console to create a project and Oauth clientId/client secret etc. The publishing works only if those google accounts match.
Note that you can continue to debug/test your app locally after that, you don't need to publish it to Store and update every time you made a change.. What you need to do for it is a bit weird, but please just bear with me here:
- Install your app from the Store. Make sure it can receive Push Messages.
- Find the location of your app on the disk (something like ~/Library/Application Support/Google/Chrome/Default/Extensions/<appid> on Mac for example)
- grab "key": "<string>" from the manifest.json of your installed app. Web Store added this pair into manifest and it contains magic.
- insert that "key" value into your local manifest.json.
- uninstall the app you've got from Store
- load your unpackaged app for testing. It now is able to receive the messages for debugging.
- before uploading it to the Store for update, remove "key" value from manifest - Web Store won't upload the manifest with it. Subsequent uploads don't modify the magic key value inside the Store so the app will continue to receive notifications.
Hope this helps, I can not be sure this is exactly what your issue is though :-)
Dmitry