nextcloud / notify_push

Update notifications for nextcloud clients
GNU Affero General Public License v3.0
228 stars 42 forks source link

Error while sending authentication request to nextcloud - After upgrade to NC 30.0.0 #531

Closed AmatorPhasma closed 2 weeks ago

AmatorPhasma commented 2 weeks ago

How to use GitHub


After the upgrade to Nextcloud 30.0.0, a problem occurred. The service throws warnings, and corresponding errors can be found in the Nextcloud server logs. Here are some details; if more are needed, please ask:

Steps to reproduce

  1. Upgrade to Nextcloud version 30.0.0

Expected behaviour

should work? :)

Actual behaviour

The service throws warnings, and corresponding errors can be found in the Nextcloud server logs

Server configuration

Web server: Nginx

Database: Maria

PHP version: 8.2

Nextcloud version: 30.0.0

List of activated apps ``` - activity: 3.0.0 - admin_audit: 1.20.0 - announcementcenter: 7.0.1 - bruteforcesettings: 3.0.0 - calendar: 5.0.1 - circles: 30.0.0-dev - cloud_federation_api: 1.13.0 - collectives: 2.14.4 - comments: 1.20.1 - contacts: 6.1.0 - contactsinteraction: 1.11.0 - dashboard: 7.10.0 - dav: 1.31.1 - deck: 1.14.1 - external: 5.5.1 - federatedfilesharing: 1.20.0 - federation: 1.20.0 - files: 2.2.0 - files_antivirus: 5.6.0 - files_downloadlimit: 3.0.0 - files_external: 1.22.0 - files_pdfviewer: 3.0.0 - files_reminders: 1.3.0 - files_sharing: 1.22.0 - files_trashbin: 1.20.1 - files_versions: 1.23.0 - forms: 4.3.1 - group_default_quota: 0.1.10 - groupfolders: 18.0.3 - logreader: 3.0.0 - lookup_server_connector: 1.18.0 - mail: 4.0.1 - music: 2.0.1 - nextcloud_announcements: 2.0.0 - notifications: 3.0.0 - notify_push: 0.7.0 - oauth2: 1.18.1 - ocs_api_viewer: 1.0.7 - password_policy: 2.0.0 - photos: 3.0.2 - polls: 7.2.4 - previewgenerator: 5.6.0 - privacy: 2.0.0 - provisioning_api: 1.20.0 - quota_warning: 1.20.0 - recommendations: 3.0.0 - related_resources: 1.5.0 - richdocuments: 8.5.1 - serverinfo: 2.0.0 - settings: 1.13.0 - sharebymail: 1.20.0 - spreed: 20.0.1 - support: 2.0.0 - systemtags: 1.20.0 - tables: 0.8.1 - tasks: 0.16.1 - text: 4.1.0 - theming: 2.5.0 - twofactor_backupcodes: 1.19.0 - twofactor_nextcloud_notification: 4.0.0 - twofactor_totp: 12.0.0-dev - twofactor_webauthn: 2.0.0 - updatenotification: 1.20.0 - user_status: 1.10.0 - viewer: 3.0.0 - weather_status: 1.10.0 - webhook_listeners: 1.1.0-dev - workflowengine: 2.12.0 ```
Nextcloud configuration ``` { "system": { "activity_use_cached_mountpoints": true, "minimum.supported.desktop.version": "3.9.2", "config_is_read_only": true, "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.example.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "30.0.0.14", "overwrite.cli.url": "https:\/\/cloud.example.com", "overwritehost": "cloud.example.com", "overwriteprotocol": "https", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "maintenance_window_start": 1, "trusted_proxies": "10.0.0.1", "forwarded_for_headers": [ "x-http-forwarded-for" ], "upgrade.disable-web": true, "activity_expire_days": 30, "auth.bruteforce.protection.enabled": false, "default_phone_region": "DE", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "password": "***REMOVED SENSITIVE VALUE***", "timeout": 0.5, "dbindex": 1 }, "share_folder": "\/Freigaben", "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\Movie", "OC\\Preview\\PDF", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\HEIC", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOffice2007", "OC\\Preview\\MSOfficeDoc" ], "maintenance": false, "theme": "", "logtimezone": "Europe\/Berlin", "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "logfile_audit": "\/var\/log\/nextcloud\/audit.log", "log.condition": { "apps": [ "admin_audit" ] }, "log_query": false, "loglevel": 2, "log_rotate_size": 0, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_smtpport": "465", "mail_smtpsecure": "ssl", "mail_smtpauth": 1, "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "twofactor_enforced": "true", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "forbidden_filename_basenames": [ "con", "prn", "aux", "nul", "com0", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "com\u00b9", "com\u00b2", "com\u00b3", "lpt0", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "lpt\u00b9", "lpt\u00b2", "lpt\u00b3" ], "forbidden_filename_characters": [ "<", ">", ":", "\"", "|", "?", "*", "\\", "\/" ], "forbidden_filename_extensions": [ " ", ".", ".filepart", ".part" ] } } ```

Browser

Browser name: Firefox

Browser version: 131

Operating system: Linux/Debian Bookworm

Service logs ``` Oct 14 18:06:17 cloud notify_push[338161]: [2024-10-14 18:06:17.188561 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error Oct 14 18:06:21 cloud notify_push[338161]: [2024-10-14 18:06:21.288463 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error Oct 14 18:07:02 cloud notify_push[338161]: [2024-10-14 18:07:02.314081 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error ```
Server logs ``` { "reqId": "5cDqOdCawd9ug2dOALIC", "level": 3, "time": "2024-10-14T18:06:17+02:00", "remoteAddr": "a0a0:a0a0:a0a0:0:a0a0:a0a0:a0a0:a0a0, 10.0.0.1", "user": "--", "app": "index", "method": "GET", "url": "/index.php/apps/notify_push/uid", "message": "Given IP address can’t be parsed", "userAgent": "--", "version": "30.0.0.14", "exception": { "Exception": "InvalidArgumentException", "Message": "Given IP address can’t be parsed", "Code": 0, "Trace": [ { "file": "/srv/nextcloud/lib/private/Security/Ip/RemoteAddress.php", "line": 30, "function": "__construct", "class": "OC\\Security\\Ip\\Address", "type": "->" }, { "function": "__construct", "class": "OC\\Security\\Ip\\RemoteAddress", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 61, "function": "newInstanceArgs", "class": "ReflectionClass", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 106, "function": "buildClass", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 124, "function": "resolve", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 42, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 175, "function": "get", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 153, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php", "line": 118, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 120, "function": "offsetGet", "class": "Pimple\\Container", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 42, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/Server.php", "line": 469, "function": "get", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 153, "function": "OC\\{closure}", "class": "OC\\Server", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php", "line": 122, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 120, "function": "offsetGet", "class": "Pimple\\Container", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 42, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/Server.php", "line": 859, "function": "get", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 153, "function": "OC\\{closure}", "class": "OC\\Server", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php", "line": 122, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 120, "function": "offsetGet", "class": "Pimple\\Container", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 42, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 175, "function": "get", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 153, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php", "line": 118, "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 120, "function": "offsetGet", "class": "Pimple\\Container", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 74, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "function": "OC\\AppFramework\\Utility\\{closure}", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 61, "function": "array_map" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 106, "function": "buildClass", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 124, "function": "resolve", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/ServerContainer.php", "line": 155, "function": "query", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php", "line": 42, "function": "query", "class": "OC\\ServerContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/public/Server.php", "line": 39, "function": "get", "class": "OC\\AppFramework\\Utility\\SimpleContainer", "type": "->" }, { "file": "/srv/nextcloud/lib/base.php", "line": 656, "function": "get", "class": "OCP\\Server", "type": "::" }, { "file": "/srv/nextcloud/lib/base.php", "line": 1132, "function": "init", "class": "OC", "type": "::" }, { "file": "/srv/nextcloud/index.php", "line": 22, "args": [ "/srv/nextcloud/lib/base.php" ], "function": "require_once" } ], "File": "/srv/nextcloud/lib/private/Security/Ip/Address.php", "Line": 26, "message": "Given IP address can’t be parsed", "exception": [], "CustomMessage": "Given IP address can’t be parsed" }, "id": "670d4182892ef" } ```
Service logs ``` Oct 14 18:06:17 cloud notify_push[338161]: [2024-10-14 18:06:17.188561 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error Oct 14 18:06:21 cloud notify_push[338161]: [2024-10-14 18:06:21.288463 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error Oct 14 18:07:02 cloud notify_push[338161]: [2024-10-14 18:07:02.314081 +02:00] WARN [notify_push::connection] /build/source/src/connection.rs:99: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error ```
Selftest ``` sudo -u www-data php /srv/nextcloud/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 ```
Testclient with Nextcloud 30.0.0 ``` ./test_client-x86_64-unknown-linux-musl https://EXAMPLE.COM USER PASSWORD [2024-10-14 18:25:28.098021 +02:00] INFO [test_client] test_client/src/main.rs:39: Found push server at wss://cloud.ieradur.de/push/ws [2024-10-14 18:25:28.103543 +02:00] WARN [test_client] test_client/src/main.rs:64: Received error: Error while sending authentication request to nextcloud: Server error: 500 Internal Server Error ```
Testclient with Nextcloud 29.0.8 ``` ./test_client-x86_64-unknown-linux-musl https://CLOUD.EXAMPLE.COM USER PASSWORD [2024-10-14 18:15:10.330350 +02:00] INFO [test_client] test_client/src/main.rs:39: Found push server at wss://cloud.hbg.schule/push/ws [2024-10-14 18:15:10.997403 +02:00] INFO [test_client] test_client/src/main.rs:73: Authenticated ```
AmatorPhasma commented 2 weeks ago

Sorry for the noise... MY FAULT! I made "bullshit" and created a loop that kept adding more and more IP addresses to the X-Forwarded-For header... -.-