You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
Reproduce Steps
if (runWebViewTitleBarWidget(args)) {
return;
}
Error log
════════ Exception caught by Flutter framework ═════════════════════════════════
The following assertion was thrown during runApp:Zone mismatch.
TheFlutter bindings were initialized in a different zone than is now being used. This will likely cause confusion and bugs as any zone-specific configuration will inconsistently use the configuration of the original binding initialization zone or this zone based on hard-to-predict factors such as which zone was active when a particular callback was set.
Itis important to use the same zone when calling `ensureInitialized` on the binding aswhen calling `runApp` later.
To make this warning fatal, setBindingBase.debugZoneErrorsAreFatal to true before the bindings are initialized (i.e. as the first statement in `voidmain() { }`).
When the exception was thrown, this was the stack:
#0BindingBase.debugCheckZone.<anonymous closure> (package:flutter/src/foundation/binding.dart:495:29)
binding.dart:495
#1BindingBase.debugCheckZone (package:flutter/src/foundation/binding.dart:500:6)
binding.dart:500
#2 runApp (package:flutter/src/widgets/binding.dart:1212:18)
binding.dart:1212
#3 runWebViewTitleBarWidget.<anonymous closure> (package:desktop_webview_window/src/title_bar.dart:34:7)
title_bar.dart:34
#8 runWebViewTitleBarWidget (package:desktop_webview_window/src/title_bar.dart:31:3)
title_bar.dart:31
#9 main (package:walang/main.dart:19:7)
main.dart:19
#10 _runMain.<anonymous closure> (dart:ui/hooks.dart:299:23)
hooks.dart:299
#11 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
isolate_patch.dart:297
#12_RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
isolate_patch.dart:184
(elided 4 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════
../../flutter/shell/platform/embedder/embedder.cc (2472):'FlutterEngineSendPlatformMessage' returned 'kInvalidArguments'. Invalid engine handle.
**Version
Flutter Version: 3.19.4
OS: Windows
plugin: desktop_webview_window 0.2.3
The text was updated successfully, but these errors were encountered:
I fixed this by moving WidgetsFlutterBinding.ensureInitialized() to after the runWebViewTitleBarWidget check.
The reason this happens is because runWebViewTitleBarWidget run the titlebar widget in a guarded zone, which will be different than the one the widget binding is initialized in, if you initialize it before running the titlebar widget.
A clear and concise description of what the bug is.
Reproduce Steps
Error log
**Version
The text was updated successfully, but these errors were encountered: