ion-app-flutter icon indicating copy to clipboard operation
ion-app-flutter copied to clipboard

Flutter Web Unexpected Null Error on RTCVideoRenderer stream.

Open wms2537 opened this issue 4 years ago • 1 comments

Your environment.

  • Version: 0.5.3
  • Browser: Chrome Version 92.0.4515.131 (Official Build) (64-bit)
  • Other Information -
"Error: Unexpected null value.
   at Object.throw_ [as throw] (http://localhost:44309/dart_sdk.js:5061:11)
   at Object.nullCheck (http://localhost:44309/dart_sdk.js:5388:30)
   at rtc_video_renderer_impl.RTCVideoRendererWeb.new.findHtmlView (http://localhost:44309/packages/flutter_webrtc/src/rtc_video_renderer.dart.lib.js:752:24)
   at rtc_video_renderer_impl.RTCVideoRendererWeb.new.set srcObject [as srcObject] (http://localhost:44309/packages/flutter_webrtc/src/rtc_video_renderer.dart.lib.js:729:19)
   at rtc_video_renderer.RTCVideoRenderer.new.set srcObject [as srcObject] (http://localhost:44309/packages/flutter_webrtc/src/rtc_video_renderer.dart.lib.js:368:40)
   at ion$.Participant._internal.setupSrcObject (http://localhost:44309/packages/flutter_ion_conference/screens/chat_screen.dart.lib.js:1121:44)
   at setupSrcObject.next (<anonymous>)
   at http://localhost:44309/dart_sdk.js:38640:33
   at _RootZone.runUnary (http://localhost:44309/dart_sdk.js:38511:59)
   at _FutureListener.thenAwait.handleValue (http://localhost:44309/dart_sdk.js:33713:29)
   at handleValueCallback (http://localhost:44309/dart_sdk.js:34265:49)
   at Function._propagateToListeners (http://localhost:44309/dart_sdk.js:34303:17)
   at _Future.new.[_completeWithValue] (http://localhost:44309/dart_sdk.js:34151:23)
   at async._AsyncCallbackEntry.new.callback (http://localhost:44309/dart_sdk.js:34172:35)
   at Object._microtaskLoop (http://localhost:44309/dart_sdk.js:38778:13)
   at _startMicrotaskLoop (http://localhost:44309/dart_sdk.js:38784:13)
   at http://localhost:44309/dart_sdk.js:34519:9"

What did you do?

Run the ion app on flutter web. The app is working when I run it on macos and mobile devices. It crashes when I use web. This problem only appears when a second device join the room, and the error only occurs in flutter web.

Probably related to flutter-webrtc/flutter-webrtc#622

wms2537 avatar Aug 22 '21 14:08 wms2537

The issue seems to be related to the HTML Video tag when using RTCVideoView Widget. For me before i had two RTCVideoView widget for my local and remote stream in which the application failed to distinguish which video tag to use for my remote stream, but after removing a RTCVideoView (local stream one) the remote stream seems to be working now since the application was able to find the only existing video tag in HTML view. However, it is better to update to recent version, seems like the issue has been fixed in latest versions.

TepKeven avatar Aug 16 '22 17:08 TepKeven