Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKs

オープン 初心者向け
#1,243 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@RaphaelFakhri がすでに取り組んでいます。

2026年10月17日 から。

  • #1244 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, flutter

調査の方向性

lib/src/token_source/room_configuration.dartと、現在snake_caseのキーを使っているトークンのroom設定パース用の既存テストを読みます。パーサーがemptyTimeoutやagentNameのようなprotobuf JSONのcamelCaseフィールドをどう扱うか確認します。issueの再現手順には、使用する最小限のトークンが示されています。そのトークンについてパースされた値が300とassistantになり、この形式をカバーするように既存テストが更新または拡張されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

TokenSourceResponse.jwtPayload?.roomConfiguration returns a RoomConfiguration whose numeric and boolean fields are null, and whose agents have a null agentName, even when the token sets them. For example, roomConfiguration.agents.first.agentName and roomConfiguration.emptyTimeout are null for a token whose room configuration dispatches an agent and sets an empty timeout. dispatchesAgent() still works because it only checks that the agents list is not empty.

Root cause

RoomConfiguration and RoomAgentDispatch in lib/src/token_source/room_configuration.dart read snake_case keys (agent_name, empty_timeout, max_participants, and so on). Those keys match the token endpoint request format, which uses the same classes. LiveKit tokens write the roomConfig claim as protobuf JSON, which uses camelCase keys:

  • livekit/protocol auth/grants.go: RoomConfiguration.MarshalJSON calls protojson.Marshal.
  • livekit-api (Python): claims["roomConfig"] = MessageToDict(self.room_config).
  • livekit-server-sdk (Node): the RoomConfiguration protobuf message is serialized with its JSON names.

The existing test builds its token with agent_name, so it passes. This is the same class of bug as #1236, for the roomConfig claim instead of the video claim.

To reproduce
final token = JWT({
  'sub': 'alice',
  'roomConfig': {
    'emptyTimeout': 300,
    'agents': [
      {'agentName': 'assistant'},
    ],
  },
}).sign(SecretKey('secret'));
final response = TokenSourceResponse(serverUrl: 'wss://example.livekit.cloud', participantToken: token);
final config = response.jwtPayload?.roomConfiguration;
print(config?.emptyTimeout);               // null
print(config?.agents?.first.agentName);    // null

Expected: 300 and assistant.
Actual: null and null.

Environment
  • livekit_client main (2.13.1)
主要言語
Dart
スター
421
フォーク
260
平均マージ
2日 11時間
マージ済み PR(30日)
21

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

livekit/client-sdk-flutter のほかの issue

livekit/client-sdk-flutter の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。