parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.92k stars 4.78k forks source link

Errors with Push Notifications on Parse Server #2275

Closed sprabs closed 8 years ago

sprabs commented 8 years ago

I have the latest version of the parse-server code, running on AWS Elastic Beanstalk with an mLab database:

I am hitting some issues with push notifications between my clients. All the credentials were set up fine for iOS and Android and it was working great. Then, after some time, when I perform some client-to-client operations (for testing) in which one client sends push notifications to another client or group of clients through a Cloud Code method, I start to see some problems.

I get this error in Android Studio: failed with error: Invalid classname: PushStatus, classnames can only have alphanumeric characters and , and must start with an alpha character while sending push notification.

Subsequently, when I send any additional push notification through an Android device, it errors out (same error message). Also, when I then try to load the data browser (hosted on parse.com), I see that it fails.

After some debugging, the issue is "resolved" (until it happens the next time) when I remove the _PushStatus document in the _SCHEMA collection. This has happened three times now in the last 24 hours...and is obviously not something that would fly in production.

Is anyone else hitting this problem? How did you fix it? I think the problem is that _PushStatus is not a supported collection that should belong in the mLab schema.

sprabs commented 8 years ago

@flovilmart I think I found the root issue. I'll add a pr shortly...

grd888 commented 8 years ago

@flovilmart I have deployed 2.2.17 and can confirm that this issue has been resolved for me. Thanks!

sprabs commented 8 years ago

@flovilmart Here's my pr: https://github.com/ParsePlatform/parse-server/pull/2375

I feel the issue that @grd888 has mentioned is different.

kevin-wildcatconnect commented 8 years ago

I am still having an issue with push notifications send from the Parse.com API. Targeted pushes to particular channels succeed but never reach any devices. I attempted to remove the _PushStatus entry from the SCHEMA collection in my MongoDB instance - this did not help.

I am running Parse Server 2.2.18 on AWS...

64bit Amazon Linux 2016.03 v2.1.3 running Node.js

As of now, no push notifications are resolving from Cloud Code. Any support is greatly appreciated.

flovilmart commented 8 years ago

push notifications send from the Parse.com if you're using the dashboard, it's using the original parse.com api endpoint not parse-server. So the issue is unrelated.

kevin-wildcatconnect commented 8 years ago

@flovilmart I am sending the push notification using the JavaScript SDK in Cloud Code running on Parse Server. The push succeeds, but it is not sent to any devices even though there are devices subscribed to that particular channel.

flovilmart commented 8 years ago

I believe your error is completely unrelated to what was described on that error. Push notifications should work fine (I personally use them) if configured correctly. Please open a new issue and follow the Guidelines when filling the issue template.