flutter-webrtc / flutter-webrtc

WebRTC plugin for Flutter Mobile/Desktop/Web
MIT License
3.98k stars 1.07k forks source link

MediaStream.dispose() bug (mediastream not found on linux OS) #1543

Open shivanshtalwar0 opened 2 months ago

shivanshtalwar0 commented 2 months ago

Describe the bug When calling MediaStream.dispose() library throw an exception that media stream is not found, this only happens on linux OS

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(MediaStreamDisposeFailed, stream [98C2C75D-0C4D-48F5-8387-67A667C09A62] not found!, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310:18)
<asynchronous suspension>
#2      MediaStreamNative.dispose (package:flutter_webrtc/src/native/media_stream_impl.dart:93:5)
<asynchronous suspension>

it is affecting videroom plugin on flutter_janus_client To Reproduce simply run app on linux and call MediaStream.dispose() Expected behavior it should not throw an exception Platform information Linux

• No issues found!