Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
Occurs rarely. Cannot reproduce. Possible race.
Expected behaviour
No internal error on spreed call page open from URL.
Actual behaviour
Noticed rare problem with null user (which displays Nextcloud internal error page) when opening spreed call page directly from external calendar (clicking URL https://my.nextcloud.domain.here/call/callidhere in mail application which opens web browser) after successful authentication on reverse proxy :
{"reqId":"[...]","level":3,"time":"2025-02-01T15:09:36+00:00","remoteAddr":"[...]","user":"--","app":"index","method":"GET","url":"/call/callidhere","message":"{\"Exception\":\"Exception\",\"Message\":\"OC\\\\Notification\\\\Notification::setUser(): Argument #1 ($user) must be of type string, null given, called in /var/www/nextcloud/apps/spreed/lib/Controller/PageController.php on line 180 in file '/var/www/nextcloud/lib/private/Notification/Notification.php' line 68\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":161,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1003,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":24,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"Line\":146,\"Previous\":{\"Exception\":\"TypeError\",\"Message\":\"OC\\\\Notification\\\\Notification::setUser(): Argument #1 ($user) must be of type string, null given, called in /var/www/nextcloud/apps/spreed/lib/Controller/PageController.php on line 180\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/apps/spreed/lib/Controller/PageController.php\",\"line\":180,\"function\":\"setUser\",\"class\":\"OC\\\\Notification\\\\Notification\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/spreed/lib/Controller/PageController.php\",\"line\":103,\"function\":\"pageHandler\",\"class\":\"OCA\\\\Talk\\\\Controller\\\\PageController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":208,\"function\":\"showCall\",\"class\":\"OCA\\\\Talk\\\\Controller\\\\PageController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":114,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":161,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1003,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":24,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/Notification/Notification.php\",\"Line\":68},\"message\":\"OC\\\\Notification\\\\Notification::setUser(): Argument #1 ($user) must be of type string, null given, called in /var/www/nextcloud/apps/spreed/lib/Controller/PageController.php on line 180 in file '/var/www/nextcloud/lib/private/Notification/Notification.php' line 68\",\"exception\":{},\"CustomMessage\":\"OC\\\\Notification\\\\Notification::setUser(): Argument #1 ($user) must be of type string, null given, called in /var/www/nextcloud/apps/spreed/lib/Controller/PageController.php on line 180 in file '/var/www/nextcloud/lib/private/Notification/Notification.php' line 68\"}","userAgent":"<Firefox ESR 128>","version":"30.0.5.1"}
Authentication is based on user_saml, getting login from apache env var (checked that reverse proxy identifies user correctly before sending request to nextcloud).
Such problem occurs rarely only on first page open (fresh session); after refreshing Nextcloud internal error page, spreed call page works ok with correct user identified.
Didn't notice such problem in other Nextcloud pages but log details contain "user":"--" in such situations so probably it's problem in user_saml not in spreed.
Similar error described in nextcloud/spreed#13517
server: v30.0.5
user_saml: v6.4.1
spreed: v20.1.3
Server configuration
Web server: Apache
Database: Maria
PHP version: 8.2
Browser
Browser name: Firefox
Browser version: 128 ESR 64-bit
Operating system: Linux