Error with mediasoup-client and typescript (upgrade version?)

Hello everyone, how are you? I have an issue; I am using the transport.produce function, trying to pass a track to it. However, when doing so, it returns this error.

DOMException: Failed to execute 'structuredClone' on 'Window': #<Object> could not be cloned

I am using Linux, and thus, I use Chromium. But if I switch to Firefox or Google Chrome, I encounter this error: ‘DOMException: Proxy object could not be cloned.’

This is the line of my code that triggers the error.
const producer = await transport.produce({ track });

I pass a track, and I believe there should not be any issues since I am passing a MediaStreamTrack. Nevertheless, I encounter the error. Additionally, I would like to mention that the last version I used was 3.6.89, and it worked fine. However, after updating to version 3.7.2, I am experiencing this problem and I really need help, thanks!

I don’t think you are passing a MediaStreamTrack but a MediaStreamTrack stored in MobX or something like that, is it?

If not, please create an issue in mediasoup-client GitHub so I’ll check after a week.

Ok you did already. Please provide that info in the GitHub issue.

I don’t think so, even though I didn’t write this code myself, I ran checks and everything should be normal. Literally, the only thing I did in the code was update the mediasoup library to the new version (3.7.2), and this doesn’t work. I know this because when I roll back to the version 3.6.89, it works correctly. I’m learning about how this works, so apologies if I say something incorrect. I’m understanding how it works and trying to solve this issue in the code

Please let’s follow up in the GitHub issue rather than here.