Producer with id not found

Hi, this is kinda similar to Producer is created but not found!

Basically when I try to consume over a consumerTransport, it gives the error

Producer 245e5f88-4509-4411-a8b0-7331d7acdc87 is closed: false
Producer transport c65146d8-c630-4108-adcf-dcda9fe6ea7b is closed: false
Router 4f4fff3d-73fd-4bb5-bec5-aa3a9f4bb07c is closed: false
Producer with id "245e5f88-4509-4411-a8b0-7331d7acdc87" not found

The main difference is that nothing seems to be closed, I’m logging this through the following code:

console.log(`Producer ${producer.id} is closed: ${producer.closed}`)
console.log(`Producer transport ${producerTransport.id} is closed: ${producerTransport.closed}`)
console.log(`Router ${router.id} is closed: ${router.closed}`)
console.log(error.message)

When trying to consume through the producerTransport it seems to always find the producer but returns a black image.

(This is happening 9/10 of the time)

You’re likely not following proper asynchronous practice and/or utilizing queues to handle the order of operation.

I imagine this in a few steps:

  1. Create Transport (Client)
  2. Create Transport (Server)
  3. Produce/Connect (Client)
  4. Consume/Connect (Server)

You are likely doing all these out of order if the above async/queue practice is not appropriately applied.
So if the produced item is not yet produced by the server and the server is taking the next request to have this produced item to consume it you will error out each time but if you just waited it’d be there.

I based my code on this example: GitHub - jamalag/mediasoup: YouTube mediasoup tutorial

How would I create the SendTransport in the client before creating it in the server if I need the params of it?

That example is not one I can help you with, or any as a matter of fact, I don’t use them but can suggest you rely on the official ones before a side-project first.

As for that second question, you can pre-load capabilities client sided there should be no issues but some may want dynamic ability correct; but idea there is as long as the requirements are of a match nothing should go wrong with that approach and you can go ahead and activate your mediasoup client device immediately.

I will try to use an official example then. Will come back to tell how it went. Thanks!

Should probably be a bit more straight forward setting up and you can experiment from there.

So the problem was really in the server, following the GitHub - mkhahani/mediasoup-sample-app: Mediasoup v3 sample app example while using the same Android Client worked. Thanks for the help!

Perfect :slight_smile:

i have same issue

It will be some issue in the code, you will have to check and test where the issue happens. You can try running the demo app to trace out the issue in code.