Intermittent UNAUTHENTICATED: Session expired (timeout: 120s) across all games (local + remote)

Subject: Intermittent UNAUTHENTICATED: Session expired (timeout: 120s) across all games (local + remote)

What’s happening:

  • For all games (2048, Mario, Pokémon, StarCraft), in both local and remote runs, sessions sometimes fail with:

StatusCode.UNAUTHENTICATED: Session expired (timeout: 120s)

The runner then stops the game server.

Traceback (most recent call last):
File “E:\project\orak\orak-challenge\run.py”, line 66, in
main()
File “E:\project\orak\orak-challenge\run.py”, line 52, in main
asyncio.run(runner.evaluate_all_games())
File “C:\Users\caozh\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\asyncio\runners.py”, line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File “C:\Users\caozh\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\asyncio\runners.py”, line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\caozh\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\asyncio\base_events.py”, line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge\evaluation_utils\runner.py”, line 162, in evaluate_all_games
await asyncio.gather(*tasks)
File “E:\project\orak\orak-challenge\evaluation_utils\runner.py”, line 232, in start_game
result = await self._call_in_thread(env.dispatch_final_action, action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge\evaluation_utils\runner.py”, line 191, in _call_in_thread
return await asyncio.to_thread(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\caozh\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\asyncio\threads.py”, line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\caozh\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\concurrent\futures\thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge\evaluation_utils\game_env.py”, line 125, in dispatch_final_action
response = self._call_with_retry(self.stub.Step, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge\evaluation_utils\game_env.py”, line 58, in _call_with_retry
return method(request, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge.venv\Lib\site-packages\grpc_channel.py”, line 1166, in call
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “E:\project\orak\orak-challenge.venv\Lib\site-packages\grpc_channel.py”, line 996, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAUTHENTICATED
details = “Session expired (timeout: 120s)”
debug_error_string = “UNKNOWN:Error received from peer {grpc_status:16, grpc_message:“Session expired (timeout: 120s)”}”

1 Like

The sessions are ideally supposed to reauthenticate and continue normally. Can you share with us some script using which we can reproduce this error?

I am also facing the same issue.

Just “uv run python run.py”

1 Like

I am also facing the same issue.

This happens quite frequently.
and this also happens not only --local test but also remote test for submission.

This error is increasing my token prices due to failed test.

I hope to fix this bug quickly.

Hey, we are still struggling to reproduce this issue. Can you please share the submission IDs for which this has happened? From what we understand, the most likely cause is that one of the games is getting stuck on one of the steps and it’s causing the gRPC server to stall. This means that the issue is likely with one of the game environments itself.

We will reach out to you if we need any more information to reproduce this issue.