flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
163.74k stars 26.94k forks source link

Flutter UI goes completely blank when trying to run video call example #108483

Closed shivanshtalwar0 closed 2 years ago

shivanshtalwar0 commented 2 years ago

Steps to Reproduce

Run video_call_example and in the new chrome tab open janus_video_call_demo now register with any username on both flutter app and demo, now call the demo website user from the flutter app call dialog and on receiving a call on demo website, accept it. Now after accepting you will see flutter throws an error and everything goes away from UI (becomes a blank white screen)

Expected results: flutter should not crash and the video call example should work.

Actual results: All widgets are removed from the tree and exceptions provided in logs is thrown and UI goes blank, same example used to work in an older version of flutter.

Logs ``` [+16620 ms] [INFO] JanusClient: Creating Session [ ] [FINE] JanusClient: fine message [ +788 ms] [INFO] JanusClient: Session Created [ +1 ms] [FINE] JanusClient: {janus: attach, transaction: 04155865-5dd9-4986-bf31-4e8165c6d94d, token: null, apisecret: null, session_id: 6044233050108875, plugin: janus.plugin.videocall} [ ] [INFO] JanusClient: using web socket transport for creating plugin handle [ +198 ms] [FINE] JanusClient: {janus: success, session_id: 6044233050108875, transaction: 04155865-5dd9-4986-bf31-4e8165c6d94d, data: {id: 6985123279738193}} [ ] [INFO] JanusClient: Plugin Initialized [ ] [FINE] JanusClient: peer connection configuration [ ] [FINE] JanusClient: {iceServers: [{username: , credential: , urls: stun:stun.voip.eutelia.it:3478}], sdpSemantics: unified-plan} [ ] [FINE] JanusClient: webRTC stack intialized [+8981 ms] kk [+15678 ms] [FINE] JanusClient: {audio: true, video: true} [+3097 ms] [FINE] JanusClient: using unified plan [ ] [FINE] JanusClient: adding track in peerconnection [ ] [FINE] JanusClient: Track(id: fae237c7-1144-4194-82b9-4e2de198a5e6, kind: audio, label: Default - MacBook Pro Microphone (Built-in), enabled: true, muted: false) [ ] [FINE] JanusClient: adding track in peerconnection [ ] [FINE] JanusClient: Track(id: 8031f416-3a68-4eb2-8b4d-33a8e1b3f627, kind: video, label: FaceTime HD Camera, enabled: true, muted: false) [ ] using transrecievers in prepare transrecievers [ +8 ms] [FINE] JanusClient: sending jsep [ +1 ms] [FINE] JanusClient: {sdp: v=0 o=- 3786492754425914194 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE 0 1 a=extmap-allow-mixed a=msid-semantic: WMS utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:+q6t a=ice-pwd:EcSraO0dbsHJ/k/e/KrUNK14 a=ice-options:trickle a=fingerprint:sha-256 55:90:49:70:2E:AF:CC:64:B1:4B:12:D3:3B:06:6E:EB:E1:E8:4B:3C:0E:97:14:9B:82:32:E6:33:BD:EE:BD:17 a=setup:actpass a=mid:0 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid a=sendrecv a=msid:utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV fae237c7-1144-4194-82b9-4e2de198a5e6 a=rtcp-mux a=rtpmap:111 opus/48000/2 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:63 red/48000/2 a=fmtp:63 111/111 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:110 telephone-event/48000 a=rtpmap:112 telephone-event/32000 a=rtpmap:113 telephone-event/16000 a=rtpmap:126 telephone-event/8000 a=ssrc:2877088614 cname:n+RCidhAk5oicdhj a=ssrc:2877088614 msid:utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV fae237c7-1144-4194-82b9-4e2de198a5e6 m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 121 125 107 108 109 124 120 123 119 35 36 41 42 114 115 116 117 118 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:+q6t a=ice-pwd:EcSraO0dbsHJ/k/e/KrUNK14 a=ice-options:trickle a=fingerprint:sha-256 55:90:49:70:2E:AF:CC:64:B1:4B:12:D3:3B:06:6E:EB:E1:E8:4B:3C:0E:97:14:9B:82:32:E6:33:BD:EE:BD:17 a=setup:actpass a=mid:1 a=extmap:14 urn:ietf:params:rtp-hdrext:toffset a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:13 urn:3gpp:video-orientation a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id a=sendrecv a=msid:utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV 8031f416-3a68-4eb2-8b4d-33a8e1b3f627 a=rtcp-mux a=rtcp-rsize a=rtpmap:96 VP8/90000 a=rtcp-fb:96 goog-remb a=rtcp-fb:96 transport-cc a=rtcp-fb:96 ccm fir a=rtcp-fb:96 nack a=rtcp-fb:96 nack pli a=rtpmap:97 rtx/90000 a=fmtp:97 apt=96 a=rtpmap:98 VP9/90000 a=rtcp-fb:98 goog-remb a=rtcp-fb:98 transport-cc a=rtcp-fb:98 ccm fir a=rtcp-fb:98 nack a=rtcp-fb:98 nack pli a=fmtp:98 profile-id=0 a=rtpmap:99 rtx/90000 a=fmtp:99 apt=98 a=rtpmap:100 VP9/90000 a=rtcp-fb:100 goog-remb a=rtcp-fb:100 transport-cc a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=fmtp:100 profile-id=2 a=rtpmap:101 rtx/90000 a=fmtp:101 apt=100 a=rtpmap:127 H264/90000 a=rtcp-fb:127 goog-remb a=rtcp-fb:127 transport-cc a=rtcp-fb:127 ccm fir a=rtcp-fb:127 nack a=rtcp-fb:127 nack pli a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f a=rtpmap:121 rtx/90000 a=fmtp:121 apt=127 a=rtpmap:125 H264/90000 a=rtcp-fb:125 goog-remb a=rtcp-fb:125 transport-cc a=rtcp-fb:125 ccm fir a=rtcp-fb:125 nack a=rtcp-fb:125 nack pli a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f a=rtpmap:107 rtx/90000 a=fmtp:107 apt=125 a=rtpmap:108 H264/90000 a=rtcp-fb:108 goog-remb a=rtcp-fb:108 transport-cc a=rtcp-fb:108 ccm fir a=rtcp-fb:108 nack a=rtcp-fb:108 nack pli a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:109 rtx/90000 a=fmtp:109 apt=108 a=rtpmap:124 H264/90000 a=rtcp-fb:124 goog-remb a=rtcp-fb:124 transport-cc a=rtcp-fb:124 ccm fir a=rtcp-fb:124 nack a=rtcp-fb:124 nack pli a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f a=rtpmap:120 rtx/90000 a=fmtp:120 apt=124 a=rtpmap:123 H264/90000 a=rtcp-fb:123 goog-remb a=rtcp-fb:123 transport-cc a=rtcp-fb:123 ccm fir a=rtcp-fb:123 nack a=rtcp-fb:123 nack pli a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f a=rtpmap:119 rtx/90000 a=fmtp:119 apt=123 a=rtpmap:35 H264/90000 a=rtcp-fb:35 goog-remb a=rtcp-fb:35 transport-cc a=rtcp-fb:35 ccm fir a=rtcp-fb:35 nack a=rtcp-fb:35 nack pli a=fmtp:35 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f a=rtpmap:36 rtx/90000 a=fmtp:36 apt=35 a=rtpmap:41 AV1/90000 a=rtcp-fb:41 goog-remb a=rtcp-fb:41 transport-cc a=rtcp-fb:41 ccm fir a=rtcp-fb:41 nack a=rtcp-fb:41 nack pli a=rtpmap:42 rtx/90000 a=fmtp:42 apt=41 a=rtpmap:114 H264/90000 a=rtcp-fb:114 goog-remb a=rtcp-fb:114 transport-cc a=rtcp-fb:114 ccm fir a=rtcp-fb:114 nack a=rtcp-fb:114 nack pli a=fmtp:114 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f a=rtpmap:115 rtx/90000 a=fmtp:115 apt=114 a=rtpmap:116 red/90000 a=rtpmap:117 rtx/90000 a=fmtp:117 apt=116 a=rtpmap:118 ulpfec/90000 a=ssrc-group:FID 682098967 2897533967 a=ssrc:682098967 cname:n+RCidhAk5oicdhj a=ssrc:682098967 msid:utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV 8031f416-3a68-4eb2-8b4d-33a8e1b3f627 a=ssrc:2897533967 cname:n+RCidhAk5oicdhj a=ssrc:2897533967 msid:utmALOvM7krNnbt9T0hdSED8kegOxQcrcVPV 8031f416-3a68-4eb2-8b4d-33a8e1b3f627 , type: offer} [ +1 ms] sending trickle [ ] sending trickle [ +188 ms] sending trickle [ ] sending trickle [+6972 ms] [FINE] JanusClient: onTrack called with event [ ] [FINE] JanusClient: Instance of 'RTCTrackEvent' [ ] [FINE] JanusClient: Handling Remote Track [ ] [FINE] JanusClient: Adding onended callback to track:Track(id: 0aeb37fb-40a6-4ae8-92ee-c42b08401ec7, kind: audio, label: 0aeb37fb-40a6-4ae8-92ee-c42b08401ec7, enabled: true, muted: true) [ ] [FINE] JanusClient: onTrack called with event [ ] [FINE] JanusClient: Instance of 'RTCTrackEvent' [ ] [FINE] JanusClient: Handling Remote Track [ ] [FINE] JanusClient: Adding onended callback to track:Track(id: f180360b-5dc9-4038-a980-82878958daa8, kind: video, label: f180360b-5dc9-4038-a980-82878958daa8, enabled: true, muted: true) [ ] [FINE] JanusClient: Remote track flowing again:Track(id: 0aeb37fb-40a6-4ae8-92ee-c42b08401ec7, kind: audio, label: 0aeb37fb-40a6-4ae8-92ee-c42b08401ec7, enabled: true, muted: false) [ ] [FINE] JanusClient: Remote track flowing again:Track(id: f180360b-5dc9-4038-a980-82878958daa8, kind: video, label: f180360b-5dc9-4038-a980-82878958daa8, enabled: true, muted: false) [+1643 ms] ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ [ ] The following assertion was thrown during a scheduler callback: [ ] Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have [ ] been deleted." [ ] When the exception was thrown, this was the stack: [ ] dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw_ [ ] lib/_engine/engine/canvaskit/embedded_views.dart 555:9 submitFrame [ ] lib/_engine/engine/canvaskit/rasterizer.dart 36:33 draw [ ] lib/_engine/engine/platform_dispatcher.dart 586:7 render [ ] lib/ui/window.dart 104:50 render [ ] packages/flutter/src/rendering/view.dart 231:15 compositeFrame [ ] packages/flutter/src/rendering/binding.dart 508:18 drawFrame [ ] packages/flutter/src/widgets/binding.dart 892:13 drawFrame [ ] packages/flutter/src/rendering/binding.dart 370:5 [_handlePersistentFrameCallback] [ ] packages/flutter/src/scheduler/binding.dart 1146:15 [_invokeFrameCallback] [ ] packages/flutter/src/scheduler/binding.dart 1083:9 handleDrawFrame [ ] packages/flutter/src/scheduler/binding.dart 997:5 [_handleDrawFrame] [ ] lib/_engine/engine/platform_dispatcher.dart 1090:13 invoke [ ] lib/_engine/engine/platform_dispatcher.dart 160:5 invokeOnDrawFrame [ ] lib/_engine/engine/initialization.dart 194:45 [ ] ════════════════════════════════════════════════════════════════════════════════════════════════════ [ +7 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +2 ms] Error: PlatformException(unregistered_view_type, trying to create a view with an unregistered type, unregistered view type: RTCVideoRenderer-2, null) at Object.throw_ [as throw] (http://localhost:51427/dart_sdk.js:5080:11) at StandardMethodCodec.decodeEnvelope (http://localhost:51427/packages/flutter/src/services/restoration.dart.lib.js:2366:19) at MethodChannel._invokeMethod (http://localhost:51427/packages/flutter/src/services/restoration.dart.lib.js:1569:47) at _invokeMethod.next () at http://localhost:51427/dart_sdk.js:40641:33 at _RootZone.runUnary (http://localhost:51427/dart_sdk.js:40511:59) at _FutureListener.thenAwait.handleValue (http://localhost:51427/dart_sdk.js:35438:29) at handleValueCallback (http://localhost:51427/dart_sdk.js:35999:49) at _Future._propagateToListeners (http://localhost:51427/dart_sdk.js:36037:17) at [_completeWithValue] (http://localhost:51427/dart_sdk.js:35872:23) at async._AsyncCallbackEntry.new.callback (http://localhost:51427/dart_sdk.js:35906:35) at Object._microtaskLoop (http://localhost:51427/dart_sdk.js:40778:13) at _startMicrotaskLoop (http://localhost:51427/dart_sdk.js:40784:13) at http://localhost:51427/dart_sdk.js:36261:9 [ +2 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +4 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +6 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +6 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +9 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +16 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +7 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +8 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +3 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +15 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +4 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +8 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +4 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [ +5 ms] Another exception was thrown: Assertion failed: "Cannot render platform views: 0. These views have not been created, or they have been deleted." [+13125 ms] [INFO] JanusClient: keep alive using WebSocketTransport [ ] [FINE] JanusClient: keepalive request sent to webSocket [ +191 ms] [FINE] JanusClient: {janus: ack, session_id: 6044233050108875, transaction: c77d3b0a-f38d-499c-a09d-ec79827f92df} ```
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.5 21G72 darwin-arm, locale
    en-IN)
    • Flutter version 3.0.5 at /Users/shivanshtalwar/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (2 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/shivanshtalwar/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.69.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.44.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.5 21G72 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.134

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

maheshj01 commented 2 years ago

Hi @shivanshtalwar0, flutter_janus_client is a third-party plugin, I would suggest filing the issue with the maintainer of the plugin.

Closing as this is not an issue with flutter. In case you disagree feel free to write in the comments and we will reopen it.

shivanshtalwar0 commented 2 years ago

I am the owner of that package and i want to get closure on this bug that's why i opened it here

maheshj01 commented 1 year ago

@shivanshtalwar0 Please share a minimal and complete sample project without the use of third-party libraries to investigate further.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.