notify_push icon indicating copy to clipboard operation
notify_push copied to clipboard

Setup successfullly, but users not receiving notifications

Open whisperdancer opened this issue 3 years ago • 73 comments

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.

whisperdancer avatar Mar 02 '21 18:03 whisperdancer

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)

icewind1991 avatar Mar 02 '21 21:03 icewind1991

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

whisperdancer avatar Mar 02 '21 21:03 whisperdancer

The test client instructions were just updated: https://github.com/nextcloud/notify_push#test-client

szaimen avatar Mar 03 '21 18:03 szaimen

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

whisperdancer avatar Mar 03 '21 18:03 whisperdancer

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.

szaimen avatar Mar 03 '21 18:03 szaimen

The only Linux servers I have are Rasp Pi's. They are not x86_64. They are Arm7

whisperdancer avatar Mar 03 '21 18:03 whisperdancer

Yes, but the test_client doesn't need to get installed on your server!

szaimen avatar Mar 03 '21 18:03 szaimen

Would it work on a RaspPi4?

whisperdancer avatar Mar 03 '21 18:03 whisperdancer

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)

szaimen avatar Mar 03 '21 19:03 szaimen

Yes, I have an intel I7 laptop running Win 10, but it's not Linux. All Linux stuff is done on the Pi's

whisperdancer avatar Mar 03 '21 19:03 whisperdancer

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.

szaimen avatar Mar 03 '21 19:03 szaimen

What do you suggest is the best way to spin up a 64 bit Linux VM on a Win 10 machine?

whisperdancer avatar Mar 03 '21 19:03 whisperdancer

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.

alerque avatar Mar 03 '21 19:03 alerque

I currently don't have VirtualBox installed on my laptop, but can install it. How about Windows subsystem for Linux as on option?

whisperdancer avatar Mar 03 '21 19:03 whisperdancer

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)

szaimen avatar Mar 03 '21 19:03 szaimen

How about Windows subsystem for Linux as on option?

I offered three possible solutions. WSL was one of them.

alerque avatar Mar 03 '21 19:03 alerque

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?

whisperdancer avatar Mar 03 '21 19:03 whisperdancer

That should theoretically work, too. But at least I have no experience in that.

szaimen avatar Mar 03 '21 19:03 szaimen

Good news! uname -mrs Linux 5.4.0-1030-aws x86_64

This should work, correct?

whisperdancer avatar Mar 03 '21 19:03 whisperdancer

If sudo uname -p returns x86_64 you are safe to go 👍

szaimen avatar Mar 03 '21 20:03 szaimen

Yay! sudo uname -p x86_64

whisperdancer avatar Mar 03 '21 20:03 whisperdancer

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!

whisperdancer avatar Mar 03 '21 20:03 whisperdancer

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.

szaimen avatar Mar 03 '21 21:03 szaimen

Can I download it to my windows laptop, then file transfer it to the instance?

whisperdancer avatar Mar 03 '21 21:03 whisperdancer

Yes, should also be possible via ssh. But I've myself never done that.

szaimen avatar Mar 03 '21 21:03 szaimen

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...

szaimen avatar Mar 03 '21 21:03 szaimen

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?

whisperdancer avatar Mar 03 '21 21:03 whisperdancer

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.)

szaimen avatar Mar 03 '21 21:03 szaimen

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?

whisperdancer avatar Mar 03 '21 21:03 whisperdancer

Do I need to first make test_client executable?

Maybe. I actually haven't tried it myself, yet.

szaimen avatar Mar 03 '21 21:03 szaimen