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

Chokidar crashes on windows #312

Closed
JBarna opened this issue Jul 14, 2015 · 13 comments
Closed

Chokidar crashes on windows #312

JBarna opened this issue Jul 14, 2015 · 13 comments

Comments

@JBarna
Copy link

JBarna commented Jul 14, 2015

I first came across this issue when I was using Chokidar to watch files with NW.js. It works great on my MacBook pro, but crashes on my windows machine. But it's the weirdest thing, node just ends and there's absolutely no error reports or stack traces. I even installed node-debug to see what was going wrong, and still it wouldn't give me any answers.

Here's the code:

var c = require('chokidar');
var path = require('path');
curdirpath = path.resolve('C:/Users/JBarna/');
var watch = c.watch(curdirpath);

The program crashes when c.watch(curdirpath) is executed.
I'm using IO.js v2.0.2.
I'm free to help debug. It's happened on two different window machines so far.

@paulmillr
Copy link
Owner

try

c.watch(curdirpath, {persistent: true})

@JBarna
Copy link
Author

JBarna commented Jul 14, 2015

Unfortunately it's still not working. What I posted was just a simpler example but in my node-webkit app, the program shouldn't stop running even if I had set persistent to false. But the program stops completely without giving any details. Do you have any suggestions for debugging? It's strange.

@paulmillr paulmillr reopened this Jul 14, 2015
@es128
Copy link
Contributor

es128 commented Jul 14, 2015

On windows chokidar is just using node's native fs.watch. Not likely there's anything within chokidar's control causing it.

Does this occur outside of NW.js (just running your script with io.js or node)? Sounds like it might need to be reported to that project.

@JBarna
Copy link
Author

JBarna commented Jul 14, 2015

es128, good question.

This issues happens both with NW.js and outside of NW.js on both io.js and regular node. The script I posted initially ran on io.js, and if I had attached any listeners (for added files or directories) the program would exit before any would be called.

@es128
Copy link
Contributor

es128 commented Jul 14, 2015

I don't know. Can't reproduce, and seems like something more localized to what you're doing somehow. If chokidar suddenly stopped working or caused node processes to crash for all windows users (or even a significant segment of it), we'd be hearing about it from a lot of people. And we have heard from other users of NW.js on Windows along the way (having much more minor problems)

Perhaps there's a weirdly problematic fs entry where you're watching? What happens if you watch a much smaller directory in a completely different area of the system's file tree?

@JBarna
Copy link
Author

JBarna commented Jul 14, 2015

When I get home I'll check it out on my windows machine with smaller directories. If we can't reproduce it after that then feel free to close the issue.

@JBarna JBarna closed this as completed Jul 14, 2015
@es128
Copy link
Contributor

es128 commented Jul 14, 2015

Would be interested to know what happened @JBarna

@JBarna
Copy link
Author

JBarna commented Jul 15, 2015

So it's still crashing on my machine. I tried hard to install node-segfault-handler and after installing Microsoft Visual Studio 2013, I found out that node-segfault-handler doesn't even work with windows :(. So.... there's really no way for me to debug this issue sadly.

@leo60228
Copy link

Happens for me too.

@JBarna
Copy link
Author

JBarna commented Jul 18, 2015

Found an interesting article that might be relevant http://stackoverflow.com/a/8636001

@Spown
Copy link

Spown commented Jul 31, 2015

Happens to me too. 1 in like 10 event catches crash the whole app. I get crash dumps, but I didn't manage to read them, since the documentation is kinda unclear and windows symbols file download link doesn't work...

@dmr
Copy link

dmr commented Sep 7, 2016

Is this still an issue on windows? How did you resolve these/any other libraries to use cross platform?

@cmumad
Copy link

cmumad commented Sep 17, 2017

Me too. I can watch single file or sub folder in running folder. But when I change to be full path, It does not work like your issue.

taratatach pushed a commit to taratatach/chokidar that referenced this issue Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants