Skip to content

problem with the push and installations #2009

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

Closed
adirgan opened this issue Jun 8, 2016 · 6 comments
Closed

problem with the push and installations #2009

adirgan opened this issue Jun 8, 2016 · 6 comments

Comments

@adirgan
Copy link

adirgan commented Jun 8, 2016

Describe your issue in as much detail as possible.

I have a problem with the parse server with respect to the installations, I have an application with many users, each time the user is authenticated by another server, I have a query that checks in a class if the user already exists, if there is the creates, and creates a pointer from the installation of the device until the user who believe in the user class, that in order to define which user sent him push, when I close my session, what I do is delete the object point in the installations, thus not reach him more push to that device that does not have associated any user, I have a serious problem about that, when the application's uninstall without closing session and reinstalling happens that continues to reach the push, the strange thing is that when I had this system in Parse.com never passed this, because when you uninstall the application and the previous installations was not associated with that device, therefore we did not reach the push when you desinstalabas the application and not borrabas the object pointer to that user installations.

do not know if this is a mistake or something happened to them, that should not be working well.

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

  1. create a pointer from the installation to another class with a specific user
  2. uninstall the application, without erasing the installation pointer
  3. application installed again without creating new pointer to the user in the other class
  4. send a push to the user that is pointing to the installation

Expected Results

what should happen is that as uninstall the application installation I stay in class pointing the user should be outdated and therefore not send push the device that had that obsolete installation

Actual Outcome

It is reaching the push of a previous installation, so if you install and uninstall the application 10 times, and 10 times not delete the pointer of the installation before uninstalling, sending a push users will reach 10 times the notification by the 10 installations that were in the class of installations

Environment Setup

  • Server
    • parse-server version: 2.2.11
    • Operating System: Ubuntu 14.04 LTS
    • Hardware: VPS
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Codero
  • Database
    • MongoDB version: 3.0.6
    • Storage engine: Mongo
    • Hardware: VPS
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Codero
@davimacedo
Copy link
Member

I suggest you invert the relation: add a pointer from User to Installation. By this way you will ensure that you will have one unique installation for each user.

@adirgan adirgan closed this as completed Jun 8, 2016
@adirgan adirgan reopened this Jun 8, 2016
@adirgan
Copy link
Author

adirgan commented Jun 8, 2016

It is a good idea, but does not apply in my application, a user can have multiple devices logged and all devices have the active session has to reach out the push

@davimacedo
Copy link
Member

You can keep an array of device tokens instead. But anyway, in order to solve this problem I think the push adapter has to be changed to not send push notifications to duplicated device tokens.

@adirgan
Copy link
Author

adirgan commented Jun 9, 2016

the strange thing is that the davice token is not duplicated each time the application is installed again create a new one, but for some reason are getting the push of davice previous token, I think it was GCM to change that logic recently that this is not happening to me two weeks ago with the server parse

@adirgan
Copy link
Author

adirgan commented Jun 9, 2016

the problem and the solution is expressed on this page:

http://stackoverflow.com/questions/23293444/android-gcm-and-multiple-tokens

@hramos
Copy link
Contributor

hramos commented Jul 27, 2016

We're closing this issue due to inactivity.

If this is a bug you care about that is not getting attention, consider opening a pull request with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants