Skip to content

[ Widget Previews ] Watcher stream subscription should handle Directory watcher closed unexpectedly exception on Windows #173895

@RoarGronmo

Description

@RoarGronmo

Command

flutter widget-preview start

Steps to Reproduce

  1. ...
  2. ...
  3. ...

Logs

FileSystemException: Directory watcher closed unexpectedly, null

#0      _FileSystemWatcher._listenOnSocket.<anonymous closure> (dart:io-patch/file_patch.dart:408:11)
#1      _ExpandStream._handleData (dart:async/stream_pipe.dart:266:30)
#2      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:184:13)
#3      _rootRunUnary (dart:async/zone.dart:1546:13)
#4      _CustomZone.runUnary (dart:async/zone.dart:1429:19)
#5      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329:7)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798:19)
#9      _StreamController._add (dart:async/stream_controller.dart:663:7)
#10     _StreamController.add (dart:async/stream_controller.dart:618:5)
#11     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2338:33)
#12     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1648:18)
#13     _microtaskLoop (dart:async/schedule_microtask.dart:40:35)
#14     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#15     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:127:13)
#16     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:5)
�[32m[✓]�[39m Flutter (Channel beta, 3.36.0-0.1.pre, on Microsoft Windows [Version 10.0.26100.4946], locale nb-NO) [543ms]
    �[32m•�[39m Flutter version 3.36.0-0.1.pre on channel beta at c:\Flutter\flutter
    �[32m•�[39m Upstream repository https://github.com/flutter/flutter.git
    �[32m•�[39m Framework revision c84cdd0d0b (2 days ago), 2025-08-13 17:21:27 -0700
    �[32m•�[39m Engine revision 877970cbc9
    �[32m•�[39m Dart version 3.10.0 (build 3.10.0-75.1.beta)
    �[32m•�[39m DevTools version 2.49.0
    �[32m•�[39m Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-lldb-debugging

�[32m[✓]�[39m Windows Version (11 Pro 64-bit, 24H2, 2009) [3,2s]

�[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK version 36.0.0) [6,4s]
    �[32m•�[39m Android SDK at C:\Users\roarg\AppData\Local\Android\Sdk
    �[32m•�[39m Emulator version 36.2.3.0 (build_id 13865802) (CL:N/A)
    �[32m•�[39m Platform android-36, build-tools 36.0.0
    �[32m•�[39m ANDROID_HOME = C:\Users\roarg\AppData\Local\Android\Sdk
    �[32m•�[39m ANDROID_SDK_ROOT = C:\Users\roarg\AppData\Local\Android\Sdk
    �[32m•�[39m Java binary at: c:\program files\java\jdk-21\bin\java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    �[32m•�[39m Java version Java(TM) SE Runtime Environment (build 21.0.8+12-LTS-250)
    �[32m•�[39m All Android licenses accepted.

�[32m[✓]�[39m Chrome - develop for the web [204ms]
    �[32m•�[39m Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

�[32m[✓]�[39m Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.50) [203ms]
    �[32m•�[39m Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    �[32m•�[39m Visual Studio Community 2019 version 16.11.36324.18
    �[32m•�[39m Windows 10 SDK version 10.0.19041.0

�[32m[✓]�[39m Connected device (3 available) [409ms]
    �[32m•�[39m Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26100.4946]
    �[32m•�[39m Chrome (web)      • chrome  • web-javascript • Google Chrome 139.0.7258.67
    �[32m•�[39m Edge (web)        • edge    • web-javascript • Microsoft Edge 139.0.3405.86

�[32m[✓]�[39m Network resources [316ms]
    �[32m•�[39m All expected network resources are available.

�[32m•�[39m No issues found!

Flutter Application Metadata

Type: malformed
Version: 0.0.1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: null
Creation framework version: null

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingc: crashStack traces logged to the consoler: fixedIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions