Participant Id valid, but egress says not found

Here is the participant id: PA_edniub5P6ShQ

On egress

similar second case:

Here is the solution that works for me:

Server side:

At time the token generation:

const at = new livekitApi.AccessToken(key, secret, { identity: participantIdentityName, metadata: JSON.stringify(metadata) });

at.addGrant({ roomJoin: true, room: roomName, canPublish: true, canSubscribe: true });
const token = await at.toJwt();
return token;

Important part: participantIdentityName

Now at the time of startParticipantEgress

info = await egressClient.startParticipantEgress(egressObject.roomId, egressObject.participantIdentityName, { stream: streamOut }, { screenShare: false, encodingOptions: encodingOptions });

Important part:

  1. egressObject.participantIdentityName must be same as token participantIdentityName .
  2. screenShare must be false

Thanks for reporting back, I did spend a fair bit of time investigating yesterday but couldn’t see the issue, so I was going to ask Milos about it.