remoteSDPStreamMetadata can be missing in pushRemoteFeed
Describe the bug
On trying to reproduce another bug, I got an exception where one side failed to place a call to the other because it threw an exception in pushRemoteFeed due to there being no entry for the stream in this.remoteSDPStreamMetadata.
I was repeatedly exiting the room and re-entering on the other client, so this is probably some kind of race where the metadata hasn't arrived fast enough?
I've seen something similar a long time ago (probably a different bug); it was caused by the other side using a wrong streamId in the metadata - it would be good to check what the metadata actually is
(oops :sweat_smile: )
I keep hitting this so have been adding some debugging to investigate it. The other side is sending an empty object for the stream metadata because it has no feeds, somehow. It looks like some kind of race where they're being deleted between pushing all the local feeds and sending the offer, while awaiting for the createAnswer / setLocalDescription. Looks like it happens if the previous call gets terminated in that time: somehow terminating one call is removing feeds from the other.
I haven't seen this in recent memory: closing.