Open whisperdancer opened 3 years ago
You can run occ notify_push:self-test
to re-do the setup tests to be sure.
You can download the test_client
from https://github.com/nextcloud/notify_push/actions/runs/606033251 and run it as
test_client https://cloud.example.com username password
which will print a message every time a push notification is received. (If you have 2fa or a non-standard login you'll have to use an app password)
I'd love to do this, but unsure how. Can you please provide instructions for how to install the test_client on my server?
Also, I ran the test you suggested and all passed
sudo -u www-data php occ notify_push:self-test ✓ redis is configured ✓ push server is receiving redis messages ✓ push server can load mount info from database ✓ push server can connect to the Nextcloud server ✓ push server is a trusted proxy ✓ push server is running the same version as the app
But users still not receiving notifications on Talk test
The test client instructions were just updated: https://github.com/nextcloud/notify_push#test-client
Please note: the Test client only works on x86_64 Linux currently.
Unfortunately, I don't have a server that can run the test client. Any other ideas on how I can troubleshoot this issue. Notifications are currently broken for all users.
Thanks
It doesn't have to be a server it also can be any other PC or VM with x86_64 Linux. The important thing is that it can reach your server via https.
The only Linux servers I have are Rasp Pi's. They are not x86_64. They are Arm7
Yes, but the test_client doesn't need to get installed on your server!
Would it work on a RaspPi4?
Would it work on a RaspPi4?
No
So you have not even one PC with x86_64 architecture at hand? (you could e.g. also spin up a Linux VM on a x86_64 Windows PC)
Yes, I have an intel I7 laptop running Win 10, but it's not Linux. All Linux stuff is done on the Pi's
Okay, so in this case, just spin up a 64-bit Linux VM on the laptop and run the test_client there! Or you could also boot up 64-bit Linux from a USB-stick on that laptop and run the binary there.
What do you suggest is the best way to spin up a 64 bit Linux VM on a Win 10 machine?
VirtualBox is an easy open source way. Running a LiveCD from an ISO image is pretty straight forward including a graphical UI. Docker is another way if you happen to use it for something else and have it already set up and keeps things simpler with just a shell interface. If you do this kind of stuff from Windows a lot you probably want to setup WSL, which would let you run this "natively" in your Windows environment.
I currently don't have VirtualBox installed on my laptop, but can install it. How about Windows subsystem for Linux as on option?
Yes, this should work, too. Here is an example guide: https://maurogiusti.medium.com/running-ubuntu-on-windows-10-with-wsl2-c4f06b3c353 (didn't test it myself)
How about Windows subsystem for Linux as on option?
I offered three possible solutions. WSL was one of them.
I have another idea which I didn't initially think of. Can I spin up an Ubuntu 20.04 LTS instance on AWS Lightsail and use that to run the test client?
That should theoretically work, too. But at least I have no experience in that.
Good news! uname -mrs Linux 5.4.0-1030-aws x86_64
This should work, correct?
If sudo uname -p
returns x86_64
you are safe to go 👍
Yay! sudo uname -p x86_64
Ok, instance setup and verified x86_64. I ran into an issue. I tried to download the test client wget https://github.com/nextcloud/notify_push/suites/2162868561/artifacts/44388618
Resolving github.com (github.com)... 192.30.255.113 Connecting to github.com (github.com)|192.30.255.113|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-03-03 20:22:26 ERROR 404: Not Found.
Note, I'm not a rust developer so may need a bit of guidance on how to get this test-client setup and running. Thanks in advance!
It seems like you need to be logged in to github to be able to download the file. So a simple wget won't work. Since that seems to be the case, I guess a Linux VM or e.g. WSL with GUI will be the better option.
Can I download it to my windows laptop, then file transfer it to the instance?
Yes, should also be possible via ssh. But I've myself never done that.
Alternatively you could upload the file to your nextcloud, share it vial link (without password protection) and download the file using the public download link...
I solved it. I used WinSCP and now have the file on my ubuntu server. Do I just run it like this: sudo ./test_client https://cloud.example.com username password or do I need to install any dependencies first?
or do I need to install any dependencies first?
No
sudo ./test_client https://cloud.example.com username password
Yes, this should work. (though probably you need to use an app-password as password.)
I created a test account on the server for just this purpose. No 2FA for this user. Do I need to first make test_client executable?
Do I need to first make test_client executable?
Maybe. I actually haven't tried it myself, yet.
Error: 0: notify_push app not enabled, invalid credentials or invalid capabilities response
Location: src/main.rs:66
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets.
Does this mean the notify_push is not reachable?
Also wondering if the password should be surrounded with single quotes? Though I don't think so
Maybe try the same again but like this?
RUST_BACKTRACE=1 ./test_client https://cloud.example.com username password
Hold on, I am trying to login with the new user and it's not letting me. I should have done that first
This is super bizarre, I created a new user, but I can't log in with the new user.
Did you try to login in a Browser?
Did you try to login in a Browser?
Yes, and now it's throttling me We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds.
Bizarre, but something seems broken in NC 21 create user. The password entered does not work. I needed to reset password via email. Now I can login
Could be incompatible apps...
Could be incompatible apps...
Creating a new user is not an app. It's built in to nextcloud.
But incompatible apps could theoretically break the login procedure
Whatever, did you try this?
RUST_BACKTRACE=1 ./test_client https://cloud.example.com username password
Yes, this is the output:
Error: 0: notify_push app not enabled, invalid credentials or invalid capabilities response
Location: src/main.rs:66
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 2 frames hidden ⋮
3: test_client::main::hf8775f5c792bc291
at
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. Run with RUST_BACKTRACE=full to include source snippets.
And do you still get this?
Error: 0: notify_push app not enabled, invalid credentials or invalid capabilities response
But incompatible apps could theoretically break the login procedure
good point as I noticed guest login with 2fa is broken in NC 21
And do you still get this?
Error: 0: notify_push app not enabled, invalid credentials or invalid capabilities response
Yes, just updated previous output
Hm... maybe try this next?
RUST_BACKTRACE=full ./test_client https://cloud.example.com username password
BTW: could you please share some more infos about your setup? I have the feeling that something else is broken here.
I need the output of occ config:list system
and occ app:list
Ok, so this gets more interesting. I'm currently logged into browser with same user as running test. After running the output of the full backtrace a dialog popped in the browser asking for authorization. I can't see how to attach it so you can see it so I'll describe it. And nextcloud disabled the user.
https://ncdomain.com is requesting your username and password. The site says: “Authorisation Required” and has a textbox to enter username and textbox to enter password
Error: 0: notify_push app not enabled, invalid credentials or invalid capabilities r esponse
Location: src/main.rs:66
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━
⋮ 2 frames hidden ⋮
3: test_client::main::hf8775f5c792bc291
at
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
BTW: could you please share some more infos about your setup? I have the feeling that something else is broken here. I need the output of
occ config:list system
andocc app:list
Nextcloud Server: Nextcloud version (eg, 20.0.5): 21 Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10 (buster) Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2 PHP version (eg, 7.4): v7.4.15
Nginx Reverse Proxy ( on a separate physical server ):
Note, I have not added a location block to the nginx reverse proxy as I'm unsure the correct way to do that. I surmise that may be the issue of why it isn't working.
On the nextcloud server: I setup the notify_push service successfully. As least according to the setup wizard.
push server seems to be functioning correctly reverse proxy seems to be setup already reverse proxy seems to be setup correctly configuration saved.
I tested the service with sudo service notify_push status and it's active and running so all good there
I then tested with 2 users using Nextcloud Talk. User #1 initiates a conversation with User #2. User #2 does not receive a notification. User #1 mentions User #2 and User #2 does not receive a notification.
I checked the logs within nextcloud and no errors reported.
In your docs, you mention something about Metrics as a way to troubleshoot, but do not provide instructions for how to do that. Perhaps that would help troubleshoot. In addition, what do you suggest in terms of troubleshooting the issue.
Metrics The push server can expose some basic metrics about the number of connected clients and the traffic flowing through the server by setting the METRICS_PORT environment variable. Once set the metrics are available in a prometheus compatible format at /metrics on the configured port.
Thank you.