OCA\Talk\Controller\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given,

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Some useful links to gather information about your Nextcloud Talk installation:
Information about Signaling server: /index.php/index.php/settings/admin/talk#signaling_server
Information about TURN server: /index.php/settings/admin/talk#turn_server
Information about STUN server: /index.php/settings/admin/talk#stun_server

Nextcloud version (eg, 24.0.1): Nextcloud Hub 25 Autumn (32.0.3) AIO

The issue you are facing:

It seems that Random error -> OCA\Talk\Controller\RoomController::setSessionState() is back on a different line of code.

The output of your Nextcloud log in Admin > Logging or errors in nextcloud.log in /var/www/:

OCA\Talk\Controller\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204 in file '/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php' line 2306

I see this error multiple times a day in the logs. I can’t observe any misbehaving of Talk.

Can you tell me which clients you’re seeing this? Web? Desktop? Mobile?

I see this in the error log at `/settings/admin/logging` in the Web UI.

This message is not visible in any client the users do use. Users do not experience any errors. This message just fills the error log.

Sorry for not being clear, not where you see that, but which clients are involved. You should also see it in the logs which user agent.
Multiple users or a single one?

The user agent is always

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

And it seems that it is always the same user

{
  "reqId": "OfbHO8QY36GeBd0yorYq",
  "level": 3,
  "time": "2026-01-12T09:29:51+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "XXXX",
  "app": "no app in context",
  "method": "PUT",
  "url": "/ocs/v2.php/apps/spreed/api/v4/room/cev7qxaj/participants/state",
  "message": "OCA\\Talk\\Controller\\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204 in file '/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php' line 2306",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
  "version": "32.0.3.2",
  "exception": {
    "Exception": "Exception",
    "Message": "OCA\\Talk\\Controller\\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204 in file '/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php' line 2306",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 153,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Talk\\Controller\\RoomController"
          },
          "setSessionState"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 321,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Talk\\Controller\\RoomController",
          "setSessionState",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "apiVersion": "v4",
            "token": "cev7qxaj",
            "_route": "ocs.spreed.room.setsessionstate"
          }
        ]
      },
      {
        "file": "/var/www/html/ocs/v1.php",
        "line": 61,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/spreed/api/v4/room/cev7qxaj/participants/state"
        ]
      },
      {
        "file": "/var/www/html/ocs/v2.php",
        "line": 8,
        "args": [
          "/var/www/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 150,
    "Previous": {
      "Exception": "TypeError",
      "Message": "OCA\\Talk\\Controller\\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 204,
          "function": "setSessionState",
          "class": "OCA\\Talk\\Controller\\RoomController",
          "type": "->",
          "args": [
            null
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 118,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Talk\\Controller\\RoomController"
            },
            "setSessionState"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 153,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Talk\\Controller\\RoomController"
            },
            "setSessionState"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 321,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Talk\\Controller\\RoomController",
            "setSessionState",
            {
              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
            },
            {
              "apiVersion": "v4",
              "token": "cev7qxaj",
              "_route": "ocs.spreed.room.setsessionstate"
            }
          ]
        },
        {
          "file": "/var/www/html/ocs/v1.php",
          "line": 61,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/apps/spreed/api/v4/room/cev7qxaj/participants/state"
          ]
        },
        {
          "file": "/var/www/html/ocs/v2.php",
          "line": 8,
          "args": [
            "/var/www/html/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php",
      "Line": 2306
    },
    "message": "OCA\\Talk\\Controller\\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204 in file '/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php' line 2306",
    "exception": [],
    "CustomMessage": "OCA\\Talk\\Controller\\RoomController::setSessionState(): Argument #1 ($state) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 204 in file '/var/www/html/custom_apps/spreed/lib/Controller/RoomController.php' line 2306"
  },
  "id": "696ba81c0fe5d"
}

Is there any chance to get information from that user? Like browser console or even the requests made? Doesn’t need to be shared in public of course.
It’s interesting, I have seen this exception before, but there seems to be no code path that could trigger this. So would be interesting to understand how it happens

This is the output of the browser console when running the talk app. Even when writing messages, nothing happened in the log.

[INFO] viewer: No OCP.Files app found, viewer is now in standalone mode {app: ‘viewer’, uid: ‘XXXX’, level: ‘2’}
browserCheck.ts:74 Detected browser Chrome 143 (143.0.0.0)
Viewer.vue:554 [INFO] viewer: 7 viewer handlers registered {app: ‘viewer’, uid: ‘XXXX’, level: ‘2’, handlers: Array(7)}
session-heartbeat.ts:80 [INFO] core: session heartbeat polling started {app: ‘core’, uid: ‘XXXX’, level: ‘2’}
bootstrap:19 [baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
80573 @ index.cjs:1
a @ bootstrap:19
94364 @ index.js:1
a @ bootstrap:19
3211 @ 7883-7883.js?v=d2536c175df70a100c19:1
a @ bootstrap:19
55348 @ 7883-7883.js?v=d2536c175df70a100c19:1
a @ bootstrap:19
77883 @ 7883-7883.js?v=d2536c175df70a100c19:1
a @ bootstrap:19
Promise.then
(anonymous) @ unsupported-browser-redirect.js:13Understand this warning
signaling.js:1178 Not connected to signaling server yet, defer joining room f3bp77nq

As soon as the chat is busier next week or when I see the error in the logs the next time. I’ll try to provide the requested information.

How can I send you the data in private? I have network logs from the browser and the error log. Unfortunately, from the browser console I don’t have any data.

I’ll reach out directly.