question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Analyser] Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed

See original GitHub issue

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"]

image

Let’s me know if I can provide more informations. Regards

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
felipecastrosalescommented, Oct 27, 2020

Hello devs! I managed to solve this by doing the following steps:

  • Restarting VSCode,
  • Running “flutter clean” on the terminal,
  • and right after I ran the application!

It was a success! I hope I can help them 😀

3reactions
DanTupcommented, Sep 22, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [ERR_STREAM_DESTROYED]: Cannot call write after a ...
It looks like that user doesn't have permission to write files to /var/log, which seems odd. So I changed it to log to...
Read more >
Node.js Stream writable.destroy() Method - GeeksforGeeks
In the above example, an error occurs because the write() method was called after the stream was destroyed. Reference: https://nodejs.org/api/ ...
Read more >
I keep getting this message, when I close it it opens back up.
Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:406:19)
Read more >
Error [ERR_STREAM_DESTROYED] - Node-RED Forum
Error connecting to dbus: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed. Thanks.
Read more >
neoclide/coc.nvim - Gitter
fileAppender - Writing to file /run/user/1000/coc-nvim-3284.log, error happened Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found