-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Mobile push notifications not working: There are not tokens for this user #13608
Comments
Same here - but only in a docker environment. Debian 9, native Rocket.Chat (= without docker): push works. Debian 9, Docker: push doesn't work. (Rocket.Chat 0.74.3) |
This may help you check the settings: |
@31337 Intersting, I really wonder if Docker might be an issue. Have no clue so far. This is the Docker-compose file I use: @reetp Thanks! Checked, all OK in my config. Still no notifs. |
@sampaiodiego Hi Guys I am using the latest docker image, and can successfully reproduce this error. I activated the Push debugging and when I restarted the instance here are the events/logs I could record: Fresh Start
Test Push
BehaviorAll I get is the error message: InformationServer
App
Mobile device model and OS version: Nexus 7 / Nexus 5 / HUAWEI /P6 / P9 / P20 - Android 6.0.1 / 7.x / 9.0 |
@MathiasRenner I saw on your compose file you have settings for proxy is that correct? as I can see from the logs you've posted your server could not reach our gateway, having incorrect proxy setting might explain that. @franckadil you issue is different. the log says something about the user
|
@sampaiodiego Thank you for your time and help, the user Id: vYzwqzkXSBpodzSm is my admin account (support) that I was using to click the test button in the RocketChat Admin section. |
thanks @franckadil .. and have you logged in using the mobile app using this same account? |
@sampaiodiego That's a good point, So I logged in with both my account and the support account to no avail. I have compiled the android client and I am using the apk in the |
@franckadil that explains the issue. Using a custom app and our push gateway will not work. You'll have to disable push gateway and fill in the same certificates you used to compile your app. |
@sampaiodiego I am really new to Android studio and App development, I will try to do some research about how to do that, I also found this thread, hope it can be helpful for other people as well for reference: #8692 Thank you very much for your help, I saw how you handle some other issues and that's one of the reasons why I love this community! Keep up the good work! |
@sampaiodiego One question though, when I geerate my keys do I have to fill in the information in |
@franckadil exactly. You'll also need to restart the server after that to apply the new keys. |
I removed these two lines of proxy settings and restartet the server. Same issue ("No token for this user") |
@MathiasRenner just to make sure, are you using our official mobile apps to connect to your server? have you logged in on the mobile app with the same user you're hitting the test button from the admin panel? |
Hi! @sampaiodiego @MathiasRenner What worked for our team is to follow this guide and self configure the app for Android. When there is a release all we do is update the Google Json file, and build a signed application with the same certificate we used to make FCM work. Here are my personal notes if that can be helpful:
After you create your upload key and keystore, you need to generate a public certificate from your upload key using keytool, with the following command: "C:\Program Files\Java\jdk1.8.0_211\bin\keytool.exe" -export -rfc -keystore "C:\Users\franc[REDACTED]\Keys[REDACTED]\signature.jks" -alias [redacted] -file output_upload_certificate.pem
"C:\Program Files\Java\jdk1.8.0_211\bin\keytool.exe" -list -v -alias [redacted] -keystore "C:\Users\franc[REDACTED]\signature.jks" For Current Updated Android Studio 2.3 users this answer is for you as hardly people use eclipse nowadays for Android development as Android studio has huge advancements.
In Android Studio, go to Build > Generate Signed apk.
Keep smiling! |
Sure, let's narrow down the problem: Yes, I downloaded the latest App from Github releases (FOSS version) and just updated Server version to 1.1.1 I just tried again. Same error. @franckadil Thanks for your notes. For me, I prefer the simpler option for now, using the default push infrastructure provided by rocket.chat. Update: The logs seem better to me now:
But on the phone there are still no notifs :-/ |
Update: IT WORKS :) |
thanks @franckadil for the instructions, they'll be helpful. @MathiasRenner thanks for giving it a try as well.. so, the FOSS version doesn't include any Google Services, which are needed for push notifications because we only support push notifications through FCM.. so it seems a blocker for you.. in the future we might want to support other push notification services (like Pushy), but right now we depend on Google Services. |
Maybe I need to open a new issue, but we recently changed to O365 authentication via OpenID. When we did that we all got new accounts based on our O365 identities. Since that transition, we get the same error as described above, and no push notifications. |
I have version 2.2.0 and was having problems with push notifications. Eventually I got push notifications working. Later down the road (today) I had to remove my user and import a different user from ldap. Now I get, "There are not tokens for this user" when doing the push notification test. |
Hello @franckadil, @sampaiodiego
If any could you provide me more details about the steps you did? Many thanks.
|
|
Description:
Push notifications are not working. Testing the feature in the admin section results in an error message: "There are not tokens for this user"
I checked issue #10142 but were not successful applying the hints given there.
Steps to reproduce:
-> see the error in the screenshot above
Expected behavior:
No error message and push notifs on phone.
Actual behavior:
Server Setup Information:
Due to privacy reasons, I set these to false, but I guess this does not cause the problem.
Relevant logs:
On Server I see lots of instances of this message:
rocketchat:logger server.js:199 System ➔ error Error sending push to gateway (7 try) -> { Error: tunneling socket could not be established, statusCode=404 at ClientRequest.onConnect (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/tunnel-agent/index.js:166:19) at Object.onceWrapper (events.js:319:30) at emitThree (events.js:136:13) at ClientRequest.emit (events.js:217:7) at Socket.socketOnData (_http_client.js:474:11) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:597:20) code: 'ECONNRESET' }
The text was updated successfully, but these errors were encountered: