Nextcloud version: 13.0.4
Operating system and version: OpenSuSE Leap 15
Apache or nginx version: Apache 2.4.33
PHP version: 7.2.5
The issue you are facing:
Push notifications work of web/desktop clients, but not on Android. I originally reported this to the NextCloud Talk app, but Mario suggested it was a problem with the server or server configuration.
When I first install & register the app a message briefly appears saying “push notifications disabled”.
Around that time, there are many next cloud log messages, which all look OK to my untrained eye, but one in the apache log may be pivotal is:
- uuuuu [27/Jun/2018:14:07:20 +1000] “POST /ocs/v2.php/apps/notifications/api/v2/push?proxyServer=https://push-notifications.nextcloud.com&devicePublicKey=-----BEGIN%20PUBLIC%20KEY----------END%20PUBLIC%20KEY-----%0A&pushTokenHash= < LOTS OF HEX > &format=json HTTP/1.1” 400 112
The result code of 400 is presumably a problem.
Is this the first time you’ve seen this error?: N
Steps to replicate it:
- Install NC, install talk app (in NC),
- install NextCloud Talk Android app (fresh install) on phone
- start android app, specify server, register -> Message appears briefly.
In the nextcloud logs I see two “login attempt” messages, followed by one “login success” message around the time of the above 400 result; both attempts are from the same device at the same time.
This double-attempt seems to happen always.
The output of your Nextcloud log in Admin > Logging:
{"reqId":"BX8jTwZaqnztBkj6768r","level":1,"time":"2018-06-27T04:07:19+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/apps\/spreed\/api\/v1\/room","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"BX8jTwZaqnztBkj6768r","level":1,"time":"2018-06-27T04:07:19+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"<USER>","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/apps\/spreed\/api\/v1\/room","message":"Login successful: \"<user>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Stv8fPiRNCXgkmur26EU","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"POST","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v2\/push?proxyServer=https:\/\/push-notifications.nextcloud.com&devicePublicKey=-----BEGIN%20PUBLIC%20KEY----- < STUFF > ----END%20PUBLIC%20KEY-----%0A&pushTokenHash= < TOKEN > & format=json","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Stv8fPiRNCXgkmur26EU","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"POST","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v2\/push?proxyServer=https:\/\/push-notifications.nextcloud.com&devicePublicKey=-----BEGIN%20PUBLIC%20KEY--- < STUFF > ---END%20PUBLIC%20KEY-----%0A&pushTokenHash= < TOKEN > &format=json","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Stv8fPiRNCXgkmur26EU","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"<USER>","app":"admin_audit","method":"POST","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v2\/push?proxyServer=https:\/\/push-notifications.nextcloud.com&devicePublicKey=-----BEGIN%20PUBLIC%20KEY--- < STUFF > ---END%20PUBLIC%20KEY-----%0A&pushTokenHash= < TOKEN > &format=json","message":"Login successful: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Hiz9sM16iBAUCy6nKem7","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/cloud\/capabilities","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Hiz9sM16iBAUCy6nKem7","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/cloud\/capabilities","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"Hiz9sM16iBAUCy6nKem7","level":1,"time":"2018-06-27T04:07:20+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"<USER>","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/cloud\/capabilities","message":"Login successful: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"KkJrOrNcgwLtvWyKNY6n","level":1,"time":"2018-06-27T04:07:21+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/apps\/spreed\/api\/v1\/room","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"KkJrOrNcgwLtvWyKNY6n","level":1,"time":"2018-06-27T04:07:21+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"--","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/apps\/spreed\/api\/v1\/room","message":"Login attempt: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
{"reqId":"KkJrOrNcgwLtvWyKNY6n","level":1,"time":"2018-06-27T04:07:21+00:00","remoteAddr":"xxx.yyy.zzz.ttt","user":"<USER>","app":"admin_audit","method":"GET","url":"\/ocs\/v2.php\/apps\/spreed\/api\/v1\/room","message":"Login successful: \"<USER>\"","userAgent":"Mozilla\/5.0 (Android) Nextcloud-Talk v2.0.2","version":"13.0.4.0"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'instanceid' => 'XXXXXX',
'passwordsalt' => 'YYYYYY',
'secret' => 'ZZZZZ',
'trusted_domains' =>
array (
...etc...
),
'datadirectory' => '<DIR>',
'overwrite.cli.url' => '<SOMETHING>',
'dbtype' => 'sqlite3',
'version' => '13.0.4.0',
'logtimezone' => 'UTC',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_from_address' => '<HOST>',
'mail_domain' => '<DOMAIN>',
'mail_smtphost' => '<IP-ADDR>',
'theme' => '',
'maintenance' => false,
'loglevel' => 1,
'trashbin_retention_obligation' => 'auto',
'updatechecker' => false,
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
);
The output of your Apache/nginx/system log in /var/log/____
:
<IP ADDR> - uuuuu [27/Jun/2018:14:07:20 +1000] "POST /ocs/v2.php/apps/notifications/api/v2/push?proxyServer=https://push-notifications.nextcloud.com&devicePublicKey=-----BEGIN%20PUBLIC%20KEY-----<STUFF>-----END%20PUBLIC%20KEY-----%0A&pushTokenHash=<LOTS OF HEX>&format=json HTTP/1.1" 400 112