Dart-Code: [Analyser] Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
Hi,
I encounter this issue quitte a lot recently and one of my friend also :
Dart Code extension: 3.7.1
Flutter extension: 3.7.1 (activated)
VS Code: 1.41.0
Platform: win
Workspace type: Flutter
Multi-root?: false
Dart SDK:
Loc: C:\Users\Bounty1342\Desktop\flutter\bin\cache\dart-sdk
Ver: 2.7.0-dev.2.1
Flutter SDK:
Loc: C:\Users\Bounty1342\Desktop\flutter
Ver: 1.12.13+hotfix.5
HTTP_PROXY: undefined
NO_PROXY: undefined
Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
at doWrite (_stream_writable.js:413:19)
at writeOrBuffer (_stream_writable.js:401:5)
at Socket.Writable.write (_stream_writable.js:301:11)
at m.sendMessage (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:45556)
at m.sendMessage (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:39197)
at c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:45364
at new Promise (<anonymous>)
at m.sendRequest (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:45176)
at m.editGetFixes (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:290549)
at t.FixCodeActionProvider.<anonymous> (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:436166)
at Generator.next (<anonymous>)
at c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:435700
at new Promise (<anonymous>)
at r (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:435445)
at t.FixCodeActionProvider.provideCodeActions (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:436006)
at c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:441239
at Array.map (<anonymous>)
at t.RankingCodeActionProvider.<anonymous> (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:441230)
at Generator.next (<anonymous>)
at c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:440679
at new Promise (<anonymous>)
at r (c:\Users\Bounty1342\.vscode\extensions\dart-code.dart-code-3.7.1\out\dist\extension.js:1:440424)
at t.RankingCodeActionProvider.provideCodeActions (c:\U…
[22:15:08] [Analyzer] [Info] Spawning C:\Users\Bounty1342\Desktop\flutter\bin\cache\dart-sdk\bin\dart.exe with args ["C:\\Users\\Bounty1342\\Desktop\\flutter\\bin\\cache\\dart-sdk\\bin\\snapshots\\analysis_server.dart.snapshot","--client-id=Dart-Code.dart-code","--client-version=3.7.1"]
Let’s me know if I can provide more informations. Regards
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 20 (9 by maintainers)
Hello devs! I managed to solve this by doing the following steps:
It was a success! I hope I can help them 😀
The original issue linked above was accidentally re-introduced in the Dart SDK and has recently been re-fixed (see https://github.com/dart-lang/sdk/issues/40348#issuecomment-689468824). That fix hasn’t made Flutter’s stable channel yet, so I suspect you’re seeing the same thing.
I am on master, still an issue
I’m also facing this issue. The Dart Analyzer has crashed much more frequently the last month or two, not exactly sure when it started. Using flutter daily and I’m on the beta branch of Flutter (currently 1.12.13+hotfix.6). It seems like it crashes every time I start my flutter app now.
I’m using VS Code on Windows but I cannot install the vsix posted above. I get this error when I try to install the vsix:
The log from the dart analyzer seems very similar to the one from Todd above:
I can test new debug builds if you have more tricks up your sleeve