Open errajibadr opened 1 year ago
Me too, did try catch temporarily
Where did you try catch @YouROK ? In your code? where?
Where did you try catch @YouROK ? In your code? where?
I think they probably mean they're wrapping the .close() / .dispose() method of the controller in a try/catch
e.g.
@override
void dispose() {
try {
_controller.close();
} catch(e) {
print(e);
}
}
nope, still get this error:
Error: UnimplementedError: removeJavaScriptChannel is not implemented on the current platform C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 266:49 throw packages/webview_flutter_platform_interface/src/platform_webview_controller.dart 205:5 removeJavaScriptChannel packages/webview_flutter/src/webview_controller.dart 271:21 removeJavaScriptChannel packages/youtube_player_iframe/src/controller/youtube_player_controller.dart 671:29 close
Any fix for this yet?
I have the same issue
I have the same issue
Console log:
The platformViewRegistry getter is deprecated and will be removed in a future release. Please import it from `dart:ui_web` instead.
Error: UnimplementedError: removeJavaScriptChannel is not implemented on the current platform
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_
packages/webview_flutter_platform_interface/src/platform_webview_controller.dart 206:5 removeJavaScriptChannel
packages/webview_flutter/src/webview_controller.dart 306:21 removeJavaScriptChannel
packages/youtube_player_iframe/src/controller/youtube_player_controller.dart 674:29 close
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
dart-sdk/lib/async/zone.dart 1661:54 runUnary
dart-sdk/lib/async/future_impl.dart 162:18 handleValue
dart-sdk/lib/async/future_impl.dart 838:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 867:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 643:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 542:11 <fn>
packages/flutter/src/foundation/synchronous_future.dart 43:39 then
dart-sdk/lib/async/future_impl.dart 538:13 [_chainForeignFuture]
dart-sdk/lib/async/future_impl.dart 896:19 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 464:9 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7 <fn>
As per log the error causing code is at
packages/youtube_player_iframe/src/controller/youtube_player_controller.dart 674:29 close
/// Disposes the resources created by [YoutubePlayerController].
Future<void> close() async {
await stopVideo();
await webViewController.removeJavaScriptChannel(_youtubeJSChannelName); <--This line
await _eventHandler.videoStateController.close();
await _valueController.close();
}
same here
Describe the bug there is an issue when disposing the youtube controller
Error: UnimplementedError: removeJavaScriptChannel is not implemented on the current platform dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw packages/webview_flutter_platform_interface/src/platform_webview_controller.dart 205:5 removeJavaScriptChannel packages/webview_flutter/src/webview_controller.dart 215:21 removeJavaScriptChannel packages/youtube_player_iframe/src/controller/youtube_player_controller.dart 671:29 close
To Reproduce basic steps
Expected behavior dispose without errors
Technical Details:
Additional context when scrolling in sliverList. disposing it raises error.