-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to get notification using fcm http v1 api ,from parse dashboard it is showing successful pushes #269
Comments
Thanks for opening this issue!
|
Could you add more details to the issue description please. Did you setup ever send successful pushes, and if yes, with which push adapter version? |
We are in the process of upgrading from parse server 2.x to 6.x, and were experiencing the same issue with Android. I narrowed it down to a schema change. We were sending push notifications in parse cloud code as follows (this is how we have been configured since 2014 or so):
Off the bat, after updating to parse server 6, the badge:0 line was getting rejected with the error: Our client is an Ionic React app, and we are using the @capacitor/push-notifications plugin. The notifications were coming in, but the capacitor plugin was ignoring them, because they do not have the expected payload. After some research, I found that the payload schema must have changed and needs to be accounted for with the migration from legacy to v1 FCM. While there appears to be a schema change in firebase notifications, it doesn't appear related to this. I'm assuming the original parse schema of "data -> alert, badge, sound" were not consistent with GCM and were maybe a proxy? Specifically, the capacitor plugin expects the payload to look something like this:
So the solution is to add that to the payload. I'm not sure where the badge fits into all of this. You can likely leave it in the data payload along with the alert and sound fields if required, but just add the notification field. I don't think this is a bug in the push adapter (maybe the bug was that the old one had a non-standard schema, but again I'm not sure), although the "string" error I mentioned above might be worth looking into on the parse server 6 line. |
@mtrezza
Your assumption is correct. Parse has its own payload abstraction for payloads around Android/iOS push notifications which convert to the raw payload FCM expects. Although it is somewhat loosely defined at the moment as things have evolved over the years so it can be quite confusing. If you handle push notifications using a client SDK that is Parse-related (e.g. Parse Android SDK), notifications will pop up when you only use the This is not the case for non-Parse related libraries that use FCM as a provider such as As you noticed, adding the There is some related discussion around improving things around this in #286. |
@jimnor0xF In your deployment try this to figure out what push adapter version was pulled in. For 6.x chances are that it's the old version without the fixes.
|
Parse Server 6.5.8 comes bundled with push adapter 5.1.1, as you can see here. We don't make any particular effort to always keep Parse Server bundled with the adapter latest version, since one can easily replace the bundled adapter. The updates are automatically done by Snyk, and we can't predict when Snyk opens a PR to upgrade the adapter, but as long as there is no security issue I believe these PRs are not prioritized and can take some time. |
New Issue Checklist
Issue Description
Steps to reproduce
Actual Outcome
Expected Outcome
should send notification to device
Environment
Client
Parse server:3.9.0,parse-push-adapter:5.2.0
Server
3.9.0,
mac
Database
Logs
No error showing
The text was updated successfully, but these errors were encountered: