mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
Android push_token field is empty #573
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thefiredragon on GitHub.
Subject of the issue
I followed up the wiki to enable push notifications.
Over web I can confirm that websocket is still working:
but im running into the issue push_token is empty
Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: DOMAIN, SIGNUPS_ALLOWED, INVITATIONS_ALLOWED, ADMIN_TOKEN, SMTP_HOST, SMTP_SECURITY, SMTP_PORT, SMTP_FROM, SMTP_FROM_NAME, SMTP_USERNAME, SMTP_PASSWORD
Install method: Docker image
Clients used: Android
Reverse proxy and version: nginx latest debian
Steps to reproduce
Enable push notification like described at the wiki
Try to reconnect an android client
Expected behaviour
push_token should be provided
Actual behaviour
no push token is given
@stefan0xC commented on GitHub:
Ah, I think the problem is that we try to register on login before the device token is saved, so this warning will be shown even on successful registrations. Can you check the database if the fields really are empty?
@thefiredragon commented on GitHub:
It's not empty:
@stefan0xC commented on GitHub:
Not really. We could remove the warnings?
@BlackDex commented on GitHub:
@stefan0xC, any ideas on how to fix this?
Do we need to have a quick fix and release a 1.30.3?
@BlackDex commented on GitHub:
Only if that warning is false. Else it is good i think.
I really need to start working on my admin updates again, that would also help.
@stefan0xC commented on GitHub:
We could also add an additional warning that the previous one can be ignored if the registration when saving the device token was successful?
@stefan0xC commented on GitHub:
Now we just need to test the fix.
edit: the warning is not displayed wrongly anymore. 🎉
@stefan0xC commented on GitHub:
Oh, looking at the code, I think we can simply fix this by not calling the
register_push_device()fn whennew_deviceistrue.ad1d65bdf8/src/api/identity.rs (L251)@thefiredragon commented on GitHub:
Removing the warning would not solve the problem that push notifications will work or?
I could test it if it's related to 2fa email
@stefan0xC commented on GitHub:
It's not false per se but misleading because I was not taking the order of operations in account but only thinking about users that connected a device previously to #3792 and not the common case.
Currently, if push notifications are setup a new device will
push_tokenand print that warning.@stefan0xC commented on GitHub:
Push notifications should work (they do on my test system). If they still don't on yours even though the
push_tokenhas been added to the database then there's something else wrong with your setup.You can test if the push notifications work by adding/renaming a folder in the web-vault and see if the change is auto-synchronized to the android app after a few seconds.
@stefan0xC commented on GitHub:
Not with
LOG_LEVEL=warn(like OP). I think you need to set it todebugto see logs related to push notifications.@BlackDex commented on GitHub:
If you switched, you also need to get new keys. And i think you should deregister your mobile devices, fully logout, clear data, and login again. Else they are probably not registered at the eu servers.
@karazonanas commented on GitHub:
I started to get this error since I changed the notification server from .com to .eu with the last update
does anyone else have the same problem?
@ghost commented on GitHub:
Hello, I seem to be in the same situation, that is, I see the warning when I make the first login with my Android phone running Bitwarden from the Play Store.
Note: I didn't check whether the push_token was eventually added to the database.
Oh, am I supposed to see some log lines to indicate this push activity as well? (Other than that warning)
I did try to add a folder and a note from the web interface, however they didn't automatically replicate to the Bitwarden app that was open in front of me on my phone.
The changes were only reflected once I dragged down my finger to trigger the manual refresh gesture.
Note: I run Archlinux's vaultwarden package (1.30.2-1) and the push stuff is configured to use the *bitwarden.eu servers.
@thefiredragon commented on GitHub:
Okay I had tested everthing and it's working fine,
thank you for your great project here. :)