Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception from analysis server (running from VSCode / Dart Code), FileSystemException: Directory watcher closed unexpectedly #38853

Closed
escamoteur opened this issue Oct 12, 2019 · 9 comments
Assignees
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@escamoteur
Copy link

What I was doing

Just loaded a new project, jumped via F12 into vector2.dart and was navigating there through code by F12 and Alt + <- ->

Versions

  • Flutter SDK 1.10.15-pre.79
  • Visual Studio Code 1.38.1
  • Dart Code 3.5.1

Analyzer Info

The analyzer was launched using the arguments:

C:\Entwicklung\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=3.5.1
--enable-completion-model

Exception (fatal)

Failed to handle request: {id: 6, method: analysis.setAnalysisRoots, params: {excluded: [], included: [C:\Entwicklung\projects\Aaronia\trunk\Sources\RTSAMobileDev\aartos, C:\Entwicklung\projects\Aaronia\trunk\Sources\RTSAMobileDev\packages\rtsa_map]}, clientRequestTime: 1570888657966}

FileSystemException: Directory watcher closed unexpectedly, path = 'C:\Entwicklung\projects\Aaronia\trunk\Sources\RTSAMobileDev\aartos'
#0      _FileSystemWatcher._listenOnSocket.<anonymous closure> (dart:io-patch/file_patch.dart:307:11)
#1      _ExpandStream._handleData (dart:async/stream_pipe.dart:248:23)
#2      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:164:13)
#3      _rootRunUnary (dart:async/zone.dart:1136:13)
#4      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#5      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
#9      _StreamController._add (dart:async/stream_controller.dart:640:7)
#10     _StreamController.add (dart:async/stream_controller.dart:586:5)
#11     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1384:35)
#12     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:890:18)
#13     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#14     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#15     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#16     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

Diagnostics requested after the error occurred are:

[
    {
        "name": "C:\\Entwicklung\\projects\\Aaronia\\trunk\\Sources\\RTSAMobileDev\\packages\\rtsa_map\\example\\rtsa_map_test",
        "explicitFileCount": 1,
        "implicitFileCount": 778,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Entwicklung\\projects\\Aaronia\\trunk\\Sources\\RTSAMobileDev\\packages\\rtsa_map",
        "explicitFileCount": 21,
        "implicitFileCount": 757,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Entwicklung\\projects\\Aaronia\\trunk\\Sources\\RTSAMobileDev\\aartos",
        "explicitFileCount": 61,
        "implicitFileCount": 2214,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    }
]
@lrhn lrhn added analyzer-crash-report Issues which have been reported due to an analysis server crash area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 14, 2019
@srawlins srawlins added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Oct 21, 2019
@devoncarew
Copy link
Member

Possible related to #37233.

@keertip
Copy link
Contributor

keertip commented Nov 11, 2019

@stereotype441, could you take a look at this and see if there needs to be changes made to the analyzer. Seeing quite a few reports with this exception in bleeding edge.

@MichaelRFairhurst
Copy link
Contributor

This was fixed in dart-lang/watcher#75 plus https://dart-review.googlesource.com/c/sdk/+/125765

I am closing, but if we see this occur again with a newer SDK we can reopen.

@a-siva
Copy link
Contributor

a-siva commented Dec 6, 2019

@MichaelRFairhurst apparently this issue was seen again with Dart 2.7.0 so I am reopening this issue for investigation.

@a-siva a-siva reopened this Dec 6, 2019
@MichaelRFairhurst
Copy link
Contributor

Closing, none of those 2.7 versions include the fix.

@a-siva
Copy link
Contributor

a-siva commented Dec 7, 2019

@MichaelRFairhurst can you indicate which version of the Dart SDK has the fix, if none of the 2.7 versions has a fix maybe we need to cherry pick this fix and make a release.

@RB-93
Copy link

RB-93 commented Jun 17, 2022

The same issue occurs in Dart SDK 2.17.3.

Socket error: FileSystemException: Directory watcher closed unexpectedly

Flutter Doctor output:
flutter doctor -v
[√] Flutter (Channel stable, 3.0.2, on Microsoft Windows [Version 10.0.19044.1706], locale en-IN)
• Flutter version 3.0.2 at C:\Users\rohit\Documents\Flutter SDK\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd495 (9 days ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\rohit\AppData\Local\Android\sdk
• Platform android-32, build-tools 31.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.15)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.32510.428
• Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.68.0)
• VS Code at C:\Users\rohit\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.42.0

[√] Connected device (4 available)
• Moto Z2 Play (mobile) • 192.168.29.253:5555 • android-arm • Android 8.0.0 (API 26)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1706]
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.63
• Edge (web) • edge • web-javascript • Microsoft Edge 102.0.1245.41

[√] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

vssocketerror

@devoncarew
Copy link
Member

@RB-93 - can you file a new issue? What you're seeing is almost certainly a different problem - this was closed several years ago. Thanks!

@dart-lang dart-lang locked as resolved and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

9 participants