-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
2.6.5 not sending pushes, went back to 2.4.2, pushes are ok #4313
Comments
Can you provide your push configuration please? |
Over on SO there is lots of chatter about APNS arbitrarily throttling delivery of data pushes and a new process DuetActivitySchedulerDaemon that can intercept a push notification that has been successfully delivered to your device and prevent it from being delivered to your appDelegate based on things like frequency of the silent notifications and battery state. I spent two days trying to figure out why my server's silent push notifications would mysteriously stop being received by my test devices until I restarted them. I haven't 100% verified that this is the cause but if you are using silent notifications to trigger activity you need to handle the use case that they could be throttled by APNS or blocked at the device which means your appDelegate may never see them. |
What's bugging me is that the push adapter is not reporting/logging the error when sending the push. As you're running with VERBOSE=1, and the failure was related to APNS not being able to transmit, it should be logged. There isn't any other logs related to the parse-server-push-adapter? Can you try the same running the sever locally and targeting the push with your test device? (also, provide your push configuration please). |
I'm running with VERBOSE=1 My push configuration is: push: { I'll try running it locally, and report my results. Thank you in advance! |
Small point not directly related bundleId is deprecated and replaced with topic. |
brianyyz, thanks for reply, yeah, I have had deprecation warning, but I already tried using topic instead of bundleId, same story... |
@dongalor do you have some more logs for us? |
@dongalor would you be able to share the code that is creating the push payload as well ? |
Here's my code, which I use to test my pushes: this exact code is working well on parse-server@2.4.2 |
If you run the query on itself does it work? ie: does it return installations? |
I have the same problem here @dongalor. What is the database you are using? My problem is because Im using Postgres. The 2.6.5 version support "expiration_interval" now. When we update the version, the column in _PushStatus is missing then, the push notification stops. I added the column manually and works now. When schema change, we need a better option to solve problems like this. The log trace:
|
@paulovitin If that's the case using 2.6.3 would work, as the |
@montymxb we have a docker auto-redeploy, and the auto-updated for schema doesnt happened. |
I'll take a look and see if I can replicate this upgrade issue regarding |
@paulovitin I can confirm that there is a Schema upgrade issue, but only in postgres. Mongodb looks to handle it properly. I'm going to open up a separate issue with further details on that specifically, including reproducability. @dongalor if you're using postgres as your database it's possible that you're experiencing the same issue post-upgrade. ::EDIT:: Postgres upgrade issue opened under #4338 |
@flovilmart > If you run the query on itself does it work? ie: does it return installations? @montymxb, @paulovitin at this moment i'm still using 2.4.2, i wish I could come back to 2.6.5 :) |
Ok, I may have an idea, to be clear, your users hold the deviceTokens as well as the installation right? |
installationId? yes! |
@dongalor the gist you provided don’t mention installationId at all, just matching on device token. Also, just a note on architecture, usually a user can have many installation, so I would recommend you set the user on the installation objects, instead of storing the installationId’s on the users. |
@flovilmart sorry, now I understand the question, do my users table hold installationId? No, but I have system table Installation, which is being filled automatically. So, my users table doesn't hold installationId, but my users table hold deviceToken field. |
Ok so the gist is correct, I'll have a look. |
So far, I can pin point the issue in the push adapter, as everything in parse-server is going smooth. It is an issue with all your push’s, or just some? |
@flovilmart actually i've provided my gist (https://gist.github.com/dongalor/96d13ee1b0344d222f4a4caf899bd8ed), all other pushes use the same Push class, so none of them work ( also when I downgrade to 2.4.2, everything works fine.. |
Did you try sending a push through the dashboard? |
@flovilmart yeah, same result :( is there anything i can show you in my configuration to check? |
Ok, the issue seem to lie in the push adapter itself, I need more time to investigate the issue. |
if i go back to 2.4.2 , do i have to downgrade parse-dashboard as well to work well sending pushes throught it ? npm install parse-server@2.4.2 --save |
@hopye actually this is the only command I used to downgrade parse without downgrading dashboard, I guess there's no need in additional actions, also I think there are dependencies between dashboard and parse-server |
We are also having problems with push for 2.6.5. There are constant error messages from parse-push-adapter and push are sometime delayed rather significantly (a few hours). However, our users can still receive push notifications, both iOS and Android devices. The errosr we get look like:
and
|
@flovimart Damn it🥇, Bingo! Now I got it, we don't have appIdentifier in our Installation table, so, with parse 2.4.2 (which is sending pushes right now) we don't need apIdentifier, I guess, right? :) Is it possible to assign apIdentifier manually without IOS SDK? |
@dongalor Sure you can just fire up mongo cli and modify I'm deliberately not copy pasting any command to do it as this will be a massive (harmless) update, so I'd like you to understand what are you doing... |
@mman First of all, thank you so much for the support in solving my problem! I have a development server, where I can do any dangerous stuff :) So, I've made a small experiment, I've entered my appId from my parse's index.js file to every installation record and tried doing the same test push sending as here, what I've got in logs is:
By the way, am I getting right this value, which is able to be in appIdentifier field in Installation table? |
@dongalor Please try once again with |
@mman so, I run my parse 3.1.1 instance this way, without pm2 for test purposes:
and I get this in my log:
|
Add a column in your installation class with the name appIdentifier and the type string. Then populate all your existing installation objects with your app id eg com.blahblah. Then try sending again |
Will need to ensure new installation objects are populated with this field on push registration client side |
One could as well make a fix in the adapter. |
I would suggest removing the appIdentifier as a requirement in the installation class as this is specified in the push adaptor settings in index.js. I can have a look at a pull request for this if that would help? |
That certainly would help |
Ok I’ll get on it |
@antonfire are you thinking that this would be an either / or approach (look for appIdentifier first and if absent use push adapter settings from index.js) or just ignore the appIdentifier in Installation and rely solely on config from index.js? |
That’s not that simple, if the installation does not specify an app identifier and multiple are configured, the adapter need to retry. In any case you should also fix your clients so they set a proper appIdentifier. Not setting an appIdentifier is not conform to the specification. And for all that I care, I don’t have to merge or provide a fix. All the official SDKs set this value. |
@flovilmart that is where I was headed. This starts to feel like it would be breaking away from the way that the sdks behave. |
Initially, the fact that we didn’t take into account the appIdentifier was a bug. |
Not everyone uses the sdk to register push, a waterfall approach would be best to prevent breaking changes for users that haven’t upgraded or installed since the breaking change |
@antonfire how do we know how many users of parse are not using an sdk? I think this would be an important metric to evaluate whether a breaking change is justified. At a minimum it would inform how to approach the change. |
@antonfire I am not sure where you’re getting at. The spec in the rest documentation has always been to pass an appIdentifier. That the server before 2.6 was permissive was a bug on the server. If you feel any of this is wrong, this is an opensource project, so you know what to do. |
@antonfire Oh My God! Now, when I'm using topic/bundleId value in my test user Installation record, I have an error! I think we are very close to beat this problem of my. Thank you so much in advance, guys! Here's what log says:
|
That’s likely because the token is invalid |
@dongalor Error 400 happens when you try to send push from parse server using a production certificate or token to a debug build of your app, IOW the push token of your app is a one that is valid for sandbox. servers. |
@dongalor Set up like this so works on production and development: push: { } |
@flovilmart @brianyyz I was just thinking of a fallback to the bundle id where appIdentifier is undefined |
@dongalor Ensure your certificates are current and valid. Ensure you are sending to current valid device tokens. |
@dongalor (going all the way back to the beginning) In your AppDelegate are you saving the device token that returns in
before sending a push to the device? The last updated time stamp on the Installation should get updated if you are. Just want to make sure we’re covering all the bases. |
@flovilmart @mman @antonfire I @brianyyz My IOS developer registered a new user on 3.1.1 parse and it's working! :) So, I guess the problem now was with deviceToken. Thank you so much for the support, now I can move all backend to 3.1.1! P.S. We can remove wontfix label now, I guess! |
Glad to hear. Also the issue is on the push adapter, so it won’t be fixed in this version of parse-server |
Excellent news! |
@flovilmart got it, right :) |
Issue Description
Updated to 2.6.5, pushes not working, i'm having problems with pushes:
Went back to 2.4.2:
npm install parse-server@2.4.2 --save
everything is working well
I've seen #4256, and I've seen this comment, which might be related to my problems:
Expected Results
I'd like to have most recent version, cause I feel like lack of performance issues updates in last versions.
Environment Setup
Logs/Trace
The text was updated successfully, but these errors were encountered: