flutter-plugins
flutter-plugins copied to clipboard
[desktop_webview_window] Create a window and close it immediately, but an error message will appear saying 'Warning: Failed to respond to a message. This is a memory leak. Lost connection to device.'
A clear and concise description of what the bug is.
Reproduce Steps
Steps to reproduce the behavior:
- await WebviewWindow.create() Create a webview window
- Close the window within less than 1 second (presumably before the window is successfully created, click the "x" button on the white screen window to close the window)
- The program crashes and reports error 'Warning: Failed to respond to a message. This is a memory leak.'
- Simultaneously pop up an error pop-up window
Expected behavior
Closing the window immediately will not result in an error
Version (please complete the following information):
- Flutter Version: 3.19.5
- OS: Windows11
- plugin: [desktop_webview_window]
The detailed log is as follows
[ +142 ms] flutter: args: [web_view_title_bar, 1] [ +900 ms] ../../flutter/shell/platform/embedder/embedder.cc (2472): 'FlutterEngineSendPlatformMessage' returned 'kInvalidArguments'. Invalid engine handle. [ ] Warning: Failed to respond to a message. This is a memory leak. [+2240 ms] Service protocol connection closed. [ +1 ms] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/%E9%BE%9A%E5%8F%AF/AppData/Local/Temp/exampleb34795ca/example/) [ +265 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed