Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Error when disposing VideoRoomPlugin #156

Open
ovc-serega opened this issue Jan 26, 2024 · 2 comments
Open

[Linux] Error when disposing VideoRoomPlugin #156

ovc-serega opened this issue Jan 26, 2024 · 2 comments

Comments

@ovc-serega
Copy link

When running the janus_client example in the ubuntu 23.04 operating system, we get errors when completing the call.
Library version 2.3.2

List of errors:

  • Error during execution of the command await videoPlugin?.hangup();:

    [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>
  • Error during execution of the command await videoPlugin?.dispose();:

    [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>
    #3      stopAllTracksAndDispose (package:janus_client/utils.dart:211:3)
    <asynchronous suspension>
    #4      JanusPlugin.dispose (package:janus_client/janus_plugin.dart:348:5)
    <asynchronous suspension>
    #5      _VideoRoomState.callEnd (package:janus_client_example/typed_examples/google_meet.dart:487:5)
    <asynchronous suspension>
    #6      _VideoRoomState.build.<anonymous closure> (package:janus_client_example/typed_examples/google_meet.dart:591:21)
    <asynchronous suspension>

There was no problem when running in Chrome or Android.

@shivanshtalwar0
Copy link
Collaborator

please test the latest commit i think it is caused because we were stopping individual tracks of stream before disposing but in latest flutter_webrtc changes they implicitly dispose tracks inside media stream, regardless of that let me know if the latest commit works for you or not

@ovc-serega
Copy link
Author

I checked the last commit and the error persists on Linux OS.

Here are the logs:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(MediaStreamDisposeFailed, stream [87F361B8-7EBF-4D11-BE9C-0AE51A2C1A80] 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>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(MediaStreamDisposeFailed, stream [87F361B8-7EBF-4D11-BE9C-0AE51A2C1A80] 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>
#3      stopAllTracksAndDispose (package:janus_client/utils.dart:208:3)
<asynchronous suspension>
#4      JanusPlugin.dispose (package:janus_client/janus_plugin.dart:348:5)
<asynchronous suspension>
#5      _VideoRoomState.callEnd (package:janus_client_example/typed_examples/google_meet.dart:487:5)
<asynchronous suspension>
#6      _VideoRoomState.build.<anonymous closure> (package:janus_client_example/typed_examples/google_meet.dart:591:21)
<asynchronous suspension>

Even after disabling the await stream?.dispose(); the error remains that the stream was not found

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(MediaStreamDisposeFailed, stream [F714BB62-C9FE-4B9F-B783-E06582A58C7D] 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>
#3      JanusPlugin.dispose (package:janus_client/janus_plugin.dart:354:5)
<asynchronous suspension>
#4      _VideoRoomState.callEnd (package:janus_client_example/typed_examples/google_meet.dart:487:5)
<asynchronous suspension>
#5      _VideoRoomState.build.<anonymous closure> (package:janus_client_example/typed_examples/google_meet.dart:591:21)
<asynchronous suspension>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants