Error: EBADF, read on Windows when file(s) edited with Notepad++


Apology up front: I’m new - just want to make sure I’m seeing normal behavior and not a bug to report for windows-preview - thanks so much for your time.

Is it normal to see “Error: EBADF, read” errors when editing local leaderboard.html and leaderboard.js files in Notepad++ on Windows? To clarify, Notepad++ has the files up on my screen, I make a change, hit file save while Meteor is running. On detecting the change, Meteor restarts and pops out the error just once. The app works fine and I’m only assuming (based on the frequency of the errors) that they’re because I have the files open in Notepad++

I’m guessing the polling of file changes is so frequent that it catches the error at the precise time the file is in the middle of being saved - there’s definitely no lock lingering from Notepad++

Example below:
=> Meteor server restarted
W20150227-08:08:51.018(-5)? (STDERR) Error: EBADF, read
=> Meteor server restarted
=> Meteor server restarted
W20150227-12:23:19.908(-5)? (STDERR) Error: EBADF, read
W20150227-12:23:20.212(-5)? (STDERR) Error: EBADF, read
=> Meteor server restarted
=> Meteor server restarted
I20150227-12:26:10.703(-5)? Hello world
=> Meteor server restarted
=> Meteor server restarted
I20150227-12:27:57.985(-5)? Hello Server!
=> Meteor server restarted
W20150227-12:28:01.817(-5)? (STDERR) Error: EBADF, read
W20150227-12:28:01.863(-5)? (STDERR) Error: EBADF, read

Webpack compiler inside Meteor (ES6 modules, hot reload and code splitting!)

Maybe you are saving the file as UTF-8 with BOM? There should be an option to encode the file as UTF-8 without BOM. Try it.


Can you please file this as a bug in the windows-preview issue tracker?


According to Notepad++ (checking bottom right) when I open the file (e.g. leaderboard.html) it’s coming up UNIX ANSI.

And now… trying to repro the issue before changing encoding, it’s not throwing the error no matter how many times I edit the file and hit save. ha ha. Output is clean / no error at all.

I’ll keep tabs on this and definitely report if I see the errors in the coming days. Thanks so much for your time guys!