UP-NextPush / server-app

UnifiedPush provider for Nextcloud - server application - Moved to https://codeberg.org/NextPush/uppush
GNU Affero General Public License v3.0
67 stars 8 forks source link

Matrix push not working (nextcloud 25, php-fpm8.1, nginx) #28

Closed danielegobbetti closed 1 year ago

danielegobbetti commented 1 year ago

Hi,

I installed unified push provider 1.1.2 on the configuration mentioned in the title configured according to the instructions in this repo. Tests with up-example work fine hence I believe the whole constellation of services is working correctly, nextcloud log show no errors.

Yet I receive no notification for matrix messages on my phone. Element is configured for using unified push and it shows no error (even its test notification works when setting it up).

I disabled battery optimization for both element and the unified push app.

Can someone please give me instructions for testing what the culprit might be? Thanks!

p1gp1g commented 1 year ago

Could you test that script: https://github.com/UP-NextPush/server-app/blob/main/script/tests.sh

danielegobbetti commented 1 year ago

Output below:

$ bash tests.sh https://my.server.address
[+] Checking URL
[*] Nextcloud server found.
[+] Checking matrix gateway
[*] Matrix gateway correctly set up
Testing sync ? [Yy/Nn]
Y
[+] Testing sync
Username: my.user.name
Password: 
[+] Create device
[+] Create app
[+] Sync
[*] Synchronization worked
danielegobbetti commented 1 year ago

I tried changing some settings in nginx, since I am using fastcgi connection to php-fpm and not proxy, henceforth I swapped the proxy_ settings with their fastcgi_ corresponding options:

#for unifiedpush                                                                                                                                                                             
fastcgi_connect_timeout   10m;                                                                                                                                                               
fastcgi_send_timeout      10m;                                                                                                                                                               
fastcgi_read_timeout      10m;  
p1gp1g commented 1 year ago

Do you have any soft like fail2ban ? Did you run the checks from Internet (not your LAN) ? Every steps in the element's troubleshooting list and the script are fine : the only remaining possible issue is that your matrix homeserver can't reach your nextcloud server.

danielegobbetti commented 1 year ago

Looks like using fastcgi_* directives fixed the issue. I've waited a few days to be sure but now I feel like this can be closed.

If anybody has the same issue: if you are using an nginx configuration where nextcloud is reached via fastcgi as in the nextcloud documentation, you should use the fastcgi_* timeout directives instead of the proxy_* ones.