python-sdks icon indicating copy to clipboard operation
python-sdks copied to clipboard

Get TwirpError(code=not_found, message=requested room does not exist, status=404)

Open aurotripathy opened this issue 7 months ago • 12 comments

I get the following error while running egress sample code from: https://docs.livekit.io/agents/ops/recording/ I've verified that my AWS credentials are good by using a boto3-based upload with the credentials.

(.venv) aurobindotripathy@mac 1st-voice-app % python on-s3-with-recording-main.py console                                                     
AWS_ACCESS_KEY_ID: xx...
AWS_SECRET_ACCESS_KEY: yyy...
2025-05-18 09:26:08,330 - DEBUG asyncio - Using selector: KqueueSelector 
==================================================
     Livekit Agents - Console
==================================================
Press [Ctrl+B] to toggle between Text/Audio mode, [Q] to quit.

2025-05-18 09:26:08,330 - INFO livekit.agents - starting worker {"version": "1.0.20", "rtc-version": "1.0.7"}
2025-05-18 09:26:08,330 - INFO livekit.agents - starting inference executor 
AWS_ACCESS_KEY_ID: xxx...
AWS_SECRET_ACCESS_KEY: yyy...
2025-05-18 09:26:08,678 - INFO livekit.agents - initializing inference process {"pid": 53845, "inference": true}
2025-05-18 09:26:08,678 - DEBUG livekit.agents - initializing inference runner {"runner": "lk_end_of_utterance_multilingual", "pid": 53845, "inference": true}
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2025-05-18 09:26:09,645 - INFO livekit.agents - inference process initialized {"pid": 53845, "inference": true}
2025-05-18 09:26:09,645 - DEBUG asyncio - Using selector: KqueueSelector {"pid": 53845, "inference": true}
2025-05-18 09:26:09,648 - INFO livekit.agents - see tracing information at http://localhost:64095/debug 
2025-05-18 09:26:09,649 - INFO livekit.agents - initializing job runner {"tid": 1667531}
2025-05-18 09:26:09,649 - INFO livekit.agents - job runner initialized {"tid": 1667531}
2025-05-18 09:26:09,649 - DEBUG asyncio - Using selector: KqueueSelector 
ctx.room.name: fake_room
2025-05-18 09:26:10,180 - ERROR livekit.agents - unhandled exception while running the job task 
Traceback (most recent call last):
  File "/Users/aurobindotripathy/1st-voice-app/on-s3-with-recording-main.py", line 59, in entrypoint
    res = await lkapi.egress.start_room_composite_egress(req)
  File "/Users/aurobindotripathy/.venv/lib/python3.9/site-packages/livekit/api/egress_service.py", line 41, in start_room_composite_egress
    return await self._client.request(
  File "/Users/aurobindotripathy/.venv/lib/python3.9/site-packages/livekit/api/twirp_client.py", line 129, in request
    raise TwirpError(
livekit.api.twirp_client.TwirpError: TwirpError(code=not_found, message=requested room does not exist, status=404)

aurotripathy avatar May 18 '25 16:05 aurotripathy

@aurotripathy could you provide an example session ID where this had occurred?

davidzhao avatar May 18 '25 19:05 davidzhao

@davidzhao , first of, thank you, second, could you give me a hint, I'm a newbie livekit user. where can I get the session ID?

aurotripathy avatar May 18 '25 19:05 aurotripathy

I have the same problem. Session Id didn't show up in dashboard job_id": "AJ_bZamSWJV7XEX", "dispatch_id": "", "room_name": "voice_assistant_mind-movie-maker_1553"

vishnukool avatar May 24 '25 01:05 vishnukool

@vishnukool, could you share how you got hold of the session ID? I'm new to LiveKit. Thank you, Sir

aurotripathy avatar May 24 '25 21:05 aurotripathy

Here's another session ID with the same error "RM_nxBMxejAahDx" @davidzhao

And also the roomId if you need it "the-storytellers-mind-movie_2778" at EDT: Jun 5 07:21:52 PM

vishnukool avatar Jun 06 '25 04:06 vishnukool

Hi. I am also coming across same error. Please help.

adarshkaushal18 avatar Jun 19 '25 12:06 adarshkaushal18

thanks for the report.. looks like this is a race condition on the server side. we are working on a fix.

in the mean time, you can retry 404 responses to get around the timing issue

davidzhao avatar Jun 19 '25 16:06 davidzhao

@aurotripathy @davidzhao , hey guys, is this fixed or was it a bug on code?

experiencing the same issue

dthejaka avatar Jul 17 '25 00:07 dthejaka

which API are you experiencing the issue with? the Egress issues should be fixed

davidzhao avatar Jul 17 '25 00:07 davidzhao

it happens when im calling: lkapi.egress.start_room_composite_egress(req).

gives the error: livekit.api.twirp_client.TwirpError: TwirpError(code=not_found, message=requested room does not exist, status=404)

sorry, im a newbie to livekit too

dthejaka avatar Jul 17 '25 01:07 dthejaka

@aurotripathy I just realized you can't test this on your local, have to setup the UI too (with Auth token) and test. Just putting it here in case you haven't figured it out yet :)

dthejaka avatar Jul 17 '25 02:07 dthejaka

I'm still facing the issue when using console mode and have setup egress for voice recording.

rohitkhatri avatar Sep 26 '25 10:09 rohitkhatri