-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Push token from android updates wrong userid in rocket chat #13101
Comments
Its unclear here. Are you using push gateway or your own? A self built app or our official app? Also self built Rocket.Chat or an official build? |
I am using the provided gateway and regular rocket chat app from google play store. |
I have a self-built rocket chat because I need additional SAML attributes. (see #12347) |
if you completely close the android app. Making sure its killed from background too. Then start it up again it should register the push token again. Using your steps to reproduce unfortunately are basically the normal flow we would use and I can't reproduce. So lets see if we can get your tokens loaded back up. Also in mongo if you run:
Might help us identify a setting related cause. Of course censor any setting values that are sensitive. I'm suspecting push gateway maybe with gcm information still being provided? We should be ignoring if gateway is provided... but i'm not certain we are. Your logs kind of make me think this is happening. |
thanks for your hints. I stopped the app via the settings and started it up again. I saw in the logfile the registration of my token again:
If you check closely the userid in the received JSON is different to the userid in the updated JSON array. For other users I see the same userid in both JSON arrays. I also only have this problem in our production environment. In our other two setups, everything is working as expected :( MongoDB Settings:
|
@rodrigok do you have any ideas on this one? |
I was able to fix this issue with removing the wrong entry in the mongodb:
It seems that there was an old userId still registered in the android app but the user was not available on the database (was probably from testing). This issue has never occured since and I hope that this was a one-time thing. Closing issue. |
Description:
On our production instance of rocket.chat I have an issue with the android app of rocket chat (3.1.1): It can't receive Push notifications.
I have now enabled push debug and I see the following for my user:
The userId received is my proper userid:
The userId in the push token (7smTD8QANZFowxbx9) is not found in the Users REST....
When I try to test the push notification, I receive the error:
"ERROR: There are no tokens for this user"
Steps to reproduce:
Expected behavior:
push notification works
Actual behavior:
push notification fails, because there is no push token for the user available.
Server Setup Information:
Additional context
Relevant logs:
The text was updated successfully, but these errors were encountered: