Setup problem notify_push

Hello everyone,
I have a small problem with the setup of the notify_push app.

As far as I can tell, the furnishings look good and all the points I asked about are confirmed positively.

Only the last point looks as if the version is not displayed correctly.

I hope someone has an idea what I could do or how I could investigate the error further.

The Basics

  • Nextcloud Server version 31.0.6.2:
    • replace me
  • Operating system and version Debian 12:
  • PHP version 8.3:
  • Is this the first time you’ve seen this error? Yes

Summary of the issue you are facing:

✓ 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
An unhandled exception has been thrown:
TypeError: strrpos(): Argument #1 ($haystack) must be of type string, false given in /var/www/cloud/html/apps/notify_push/lib/SelfTest.php:197
Stack trace:
#0 /var/www/cloud/html/apps/notify_push/lib/SelfTest.php(197): strrpos()
#1 /var/www/cloud/html/apps/notify_push/lib/Command/Setup.php(48): OCA\NotifyPush\SelfTest->test()
#2 /var/www/cloud/html/3rdparty/symfony/console/Command/Command.php(326): OCA\NotifyPush\Command\Setup->execute()
#3 /var/www/cloud/html/3rdparty/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#4 /var/www/cloud/html/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#5 /var/www/cloud/html/3rdparty/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#6 /var/www/cloud/html/lib/private/Console/Application.php(187): Symfony\Component\Console\Application->run()
#7 /var/www/cloud/html/console.php(87): OC\Console\Application->run()
#8 /var/www/cloud/html/occ(33): require_once(‘…’)

Steps to replicate it (hint: details matter!):

  1. Install clean Nextcloud
  2. Enable notify_push
  3. Adjust settings according to specifications
  4. run “occ notify_push:setup [URL]/push”
1 Like

looks the problem occurs in this code part

where in the line 197 in checks for minor version of the binary but fails for some reason.

I would recommend you open a github issue and report all details, especially (debug) logs before the problem.
I’m not a dev but for me the code looks valid ant it doesn’t fail extracting $binaryVersion but the result seem not a version string as expected but $false binary value..

and yes I found your issue would be great you would have reported this here as well

Hello,
First of all, thank you very much for your quick response.

Right, it looks like something is not working correctly with the part you mentioned.

Sorry, you’re right, I could have added that I created issue on github.

It looks like the error is caused by strrpos() receiving false instead of a string, likely due to a failed file_get_contents() or similar function. Check the code around line 197 in SelfTest.php to see what’s being passed. Most likely, a file or config value couldn’t be read properly. Make sure the config.php and required paths are accessible and not returning false. Also, try running occ notify_push:setup with full logs enabled (-vvv) to get more detail.

Unfortunately, with full logs activated, I don’t get any more displayed than before.

however, i have set the debug level for notify_push, here is the log excerpt:

{"reqId":"7AdwtPaBHEonpcC7BLMY","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"10.11.0.8","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/cookie","message":"OCA\\NotifyPush\\Controller\\TestController::cookie uses the @PublicPage annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\PublicPage] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}
{"reqId":"7AdwtPaBHEonpcC7BLMY","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"10.11.0.8","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/cookie","message":"OCA\\NotifyPush\\Controller\\TestController::cookie uses the @NoCSRFRequired annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\NoCSRFRequired] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}
{"reqId":"7AdwtPaBHEonpcC7BLMY","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"10.11.0.8","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/cookie","message":"OCA\\NotifyPush\\Controller\\TestController::cookie uses the @NoCSRFRequired annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\NoCSRFRequired] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}
{"reqId":"WBA0tTB25H6cAgPsFJUg","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"1.2.3.4","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/remote","message":"OCA\\NotifyPush\\Controller\\TestController::remote uses the @PublicPage annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\PublicPage] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}
{"reqId":"WBA0tTB25H6cAgPsFJUg","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"1.2.3.4","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/remote","message":"OCA\\NotifyPush\\Controller\\TestController::remote uses the @NoCSRFRequired annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\NoCSRFRequired] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}
{"reqId":"WBA0tTB25H6cAgPsFJUg","level":0,"time":"2025-07-08T07:29:41+02:00","remoteAddr":"1.2.3.4","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/notify_push/test/remote","message":"OCA\\NotifyPush\\Controller\\TestController::remote uses the @NoCSRFRequired annotation and should use the #[OCP\\AppFramework\\Http\\Attribute\\NoCSRFRequired] attribute instead","userAgent":"--","version":"31.0.6.2","data":[]}

the output of the test_client looks like this:

./test_client https://test-cloud. xxx.de [USER] [PASS]
[2025-07-08 07:43:29.125626 +02:00] INFO [test_client] test_client/src/main.rs:39: Found push server at wss://test-cloud. xxx.de/push/ws
[2025-07-08 07:43:30.354723 +02:00] INFO [test_client] test_client/src/main.rs:73: Authenticated

nginx log:

/var/log/nginx/test-cloud.xxx.de.access.log:10.11.0.8 - - [08/Jul/2025:07:29:41 +0200] "GET /index.php/apps/notify_push/test/cookie HTTP/1.1" 200 9 "-" "-"
/var/log/nginx/test-cloud.xxx.de.access.log:10.11.0.8 - - [08/Jul/2025:07:29:41 +0200] "GET /index.php/apps/notify_push/test/remote HTTP/1.1" 200 7 "-" "-"
/var/log/nginx/test-cloud.xxx.de.access.log:10.11.0.8 - - [08/Jul/2025:07:38:06 +0200] "GET /index.php/apps/notify_push/test/version HTTP/1.1" 200 4 "-" "-"```