Skip to content

Warning logged on user logout (DoesNotExistException) #1265

@cfanta06

Description

@cfanta06

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

  1. User logins in with OIDC (authentik)
  2. User Logs out with the logout menu item
  3. Check Next Cloud Log

Expected behaviour

I want to find a way to not generate a warning log on user logout action

Actual behaviour

Warning log produced

Server configuration

Web server: Apache

Database: Maria

PHP version: PHP 8.2.29

Nextcloud version: 32.0.2

List of activated apps
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

Browser

Browser name: Firefox & chrome

Browser version: 145.0.2

Operating system: Mac/…

NextCloud log
Insert your browser log here, this could for example include:
 DoesNotExistException Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*user_oidc_sessions` WHERE (`authtoken_id` = :dcValue1) AND (`user_id` = :dcValue2)";
[TokenInvalidatedListener] Could not find the OIDC session related with an invalidated token 


{"reqId":"ZL4oFXdcKyHI9VRf4TXC","level":2,"time":"2025-12-06T00:31:50+00:00","remoteAddr":"10.0.5.1","user":"57119287-60f2-4218-93ba-193d524b7db7","app":"user_oidc","method":"GET","url":"/index.php/apps/user_oidc/sls?requesttoken=hodGpI9U2GYCGcRrgIRnaeL7H8jCUL1pnl8TK2y3kaU%3D:6uB3lrY47CJId5wn5cEtJqTNcfChOdcu8StGYhWAw98%3D","message":"[TokenInvalidatedListener] Could not find the OIDC session related with an invalidated token","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0","version":"32.0.2.2","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*user_oidc_sessions` WHERE (`authtoken_id` = :dcValue1) AND (`user_id` = :dcValue2)\"; ","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":375,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_oidc/lib/Db/SessionMapper.php","line":127,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_oidc/lib/Listener/TokenInvalidatedListener.php","line":57,"function":"getSessionByAuthTokenAndUid","class":"OCA\\UserOIDC\\Db\\SessionMapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\UserOIDC\\Listener\\TokenInvalidatedListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":282,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/Manager.php","line":184,"function":"invalidateToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":941,"function":"invalidateToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/user_oidc/lib/Controller/LoginController.php","line":728,"function":"logout","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"singleLogoutService","class":"OCA\\UserOIDC\\Controller\\LoginController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":277,"message":"[TokenInvalidatedListener] Could not find the OIDC session related with an invalidated token","token_id":22,"user_id":"57119287-60f2-4218-93ba-193d524b7db7","exception":[],"CustomMessage":"[TokenInvalidatedListener] Could not find the OIDC session related with an invalidated token"},"id":"69337fb917b15"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions