3

I am running Dart 2.0.0 with VSCode 1.26.1. I constantly see the following error written in Console under MacOS High Sierra 10.13.6:

nw_path_close_fd Failed to close guarded necp fd 6 [9: Bad file descriptor]

As soon as I close VSCode the dart process (and the error in the Console) goes away. Any ideas on why Dart is doing this? The offending library appears to be libsystem_network.dylib.

Hahnemann
  • 4,378
  • 6
  • 40
  • 64
  • Doesn't seem to be related to VSCode or Dart https://support.spirion.com/hc/en-us/articles/115000018992-Addressing-a-Bad-file-descriptor-error-in-a-Mac-OS-client-log – Günter Zöchbauer Aug 23 '18 at 05:17
  • I believe I've tried that before but I'll try again tonight. The issue is that Console shows dart as process owner and as soon as I quit VS Code with the dart plugin this goes away. – Hahnemann Aug 25 '18 at 00:01
  • Yes that didn't work. The article is a bit old where Disk Utility changed in High Sierra but I ran it nonetheless using `Ctrl + R` and no errors were found. Just puzzling. – Hahnemann Aug 25 '18 at 02:55

1 Answers1

2

The dart process is any instance of a Dart VM running. VSCode will run a dart process for the realtime static analyzer, which feeds your warnings and errors panel. It may also be a Dart process that you launched from VSCode, the command-line, or another Dart process that the VSCode Dart plugin launches (other than the analyzer).

I can confirm that this issue does not occur when using IntelliJ IDEA and the Dart plugin. If you can isolate that it isn't the Dart code you are writing, I'd file a bug with the plugin repository: https://github.com/Dart-Code/Dart-Code/issues.

Joe Conway
  • 1,566
  • 9
  • 8
  • I am writing a Flutter app and when I load the workspace in VSCode, the error is written to the Console. A simple Dart program in VSCode does not create this error, so this is not VSCode, Dart, or the plug-in. Therefore this must be a Dart process in the Flutter application. – Hahnemann Aug 29 '18 at 01:58
  • Bad file descriptor came on some user devices, not in VSCode or Emulator. – maerlyn Jan 08 '21 at 08:13