silly-baker-11446
09/11/2025, 4:24 AMtall-airline-16756
09/11/2025, 4:24 AMtall-airline-16756
09/11/2025, 4:25 AMawait_start_signal
option but haven’t sent the signal yet through a webhook or API call. Just double-check that this option is set on purpose and that the start signal is sent programmatically when you’re ready to go.
2. Handling TwirpError: The TwirpError with code FailedPrecondition
can happen if you try to stop an egress that’s already been aborted. To manage this smoothly:
◦ Catch the error and look out for the FailedPrecondition
code.
◦ You might also want to check the egress status with ListEgress
or GetEgress
before stopping it.
◦ In your app’s logic, treat this error as a sign that the stop was successful since the egress is already ended.
1. Timing Requirements: There’s no strict timing to worry about after calling start_room_composite_egress
. The process runs asynchronously, so feel free to continue with other parts of your application right away. Use the egress_id
you get back to keep an eye on or manage the egress whenever you need.
If anything is unclear or you’d like more help, please don’t hesitate to ask—I’m here to support you!
Sources: pkg/service/egress.go | Docs::Home | cmd/lk/egress.go | lib/livekit/proto/livekit_egress_twirp.rb | packages/livekit-server-sdk/src/EgressClient.tssilly-baker-11446
09/11/2025, 4:31 AMtall-airline-16756
09/11/2025, 4:32 AMINVALID_ARGUMENT
, NOT_FOUND
, or FAILED_PRECONDITION
.
• Message: A clear explanation of what went wrong.
• Optional Metadata: Extra details about the error, such as HTTP status codes.
For instance, if you try to stop an Egress that’s already been aborted, you might see a TwirpError with the code FAILED_PRECONDITION
and a message saying "egress with status EGRESS_ABORTED cannot be stopped." This really helps you pinpoint and tackle specific issues in your application.
If you’d like me to walk you through this further or have any questions, just let me know—I’m here to help!
Sources: livekit-api/livekit/api/__init__.py | packages/livekit-server-sdk/src/TwirpRPC.ts | SIP troubleshooting guide | LiveKit Docs | livekit/livekit_ingress.twirp.go | livekit-api/src/services/mod.rssilly-baker-11446
09/11/2025, 4:34 AMtall-airline-16756
09/11/2025, 4:35 AMsilly-baker-11446
09/11/2025, 4:40 AMtall-airline-16756
09/11/2025, 4:41 AMenableChromeLogging: true
to your egress configuration. This will generate a chrome.log
file that captures the browser console output, including important signals like START_RECORDING
and END_RECORDING
. It’s a great way to get more insight into what’s happening behind the scenes.
2. Verify START_RECORDING and END_RECORDING Signals: Make sure your template or frontend is logging console.log('START_RECORDING')
when recording begins and console.log('END_RECORDING')
when it ends. If you’re using the default EgressHelper SDK, it should handle this for you automatically, but it’s good to double-check!
3. Check Chrome Startup and Navigation: Confirm that Chrome is starting up properly with all the necessary dependencies like Xvfb and PulseAudio. Keep an eye out in the egress logs for any errors such as "chrome failed to start" or "navigation timed out"—these clues can be really helpful.
4. Handle Room Disconnection: It’s important to ensure that the egress participant stays connected to the room and that network issues aren’t causing it to disconnect too soon. The recording should keep going even if users leave the room, so let’s make sure that’s happening as expected.
5. Review Egress Lifecycle: Remember, the egress process relies on Chrome rendering the room and logging the right signals. If Chrome closes unexpectedly, take a look at the chrome.log
file for any JavaScript errors or exceptions that might give us a hint.
I hope these steps help you get to the bottom of why the source is closing prematurely. Please don’t hesitate to reach out if you need any more help—I’m here for you!
Sources: pkg/pipeline/controller.go | Custom recording templates | LiveKit Docs | pkg/pipeline/source/sdk.go | Custom recording templates | LiveKit Docs | Docs::Home