MixinNetwork / MixinNetwork/flutter-plugins

Zone mismatch. desktop_webview_window 0.2.3

Open
#327 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

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.
The Flutter 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.
It is important to use the same zone when calling `ensureInitialized` on the binding as when calling `runApp` later.
To make this warning fatal, set BindingBase.debugZoneErrorsAreFatal to true before the bindings are initialized (i.e. as the first statement in `void main() { }`).

When the exception was thrown, this was the stack:
#0      BindingBase.debugCheckZone.<anonymous closure> (package:flutter/src/foundation/binding.dart:495:29)
binding.dart:495
#1      BindingBase.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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at runWebViewTitleBarWidget in desktop_webview_window/src/title_bar.dart, especially lines 31 and 34 shown in the stack trace. Reproduce the supplied call on Windows with Flutter 3.19.4, then verify that the Zone mismatch and invalid engine handle no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.