vladikoff / grunt-devtools

🛠 Grunt Task Runner Extension for Chrome Developer Tools
http://gruntjs.com/
MIT License
1k stars 73 forks source link

Problem establishing connection on windows 7 #9

Closed erwinmombay closed 11 years ago

erwinmombay commented 11 years ago

i consistently get an "InvalidStateError: DOM Exception 11" (during handleSocketOpen) error on windows 7. increasing the setTimeout timer to 2000ms instead of 1000ms on the connect function seems to fix it right away so my best guess is that the extension is retrying too fast.

on a 1000ms tick, the websocket object for localhost:61751 is created right before the onopen event (handled by handleSocketOpen) is emitted for localhost:61750 (61750 is the default port on the grunt-devtool task).

on a 2000ms tick, the websocket object for localhost:61751 is created after the onopen event for localhost:61750

I don't get the same behavior on OSX (the onopen event is emitted right after 61750 is created, not after 61751). grunt-devtools actually doesn't work on my windows 7 machine at home and windows 7 machine at work(both on chrome 26) but i am trying to establish what the other causes are at the moment before putting in issues for them.

vladikoff commented 11 years ago

Hello! thanks for the bug report, from my tests version 0.1.0.7 didn't work for me at all on Windows. it's still a a TODO https://github.com/vladikoff/grunt-devtools#todo

However, I've been making significant progress in adding Windows support, in version 0.1.1 which is sitting in the dev branch right now. There are a few things to fix up still, but it's getting there! I will close this issue when I publish 0.1.1 and add Windows support.

erwinmombay commented 11 years ago

thanks for the quick response! i'll just have to wait then :) i was about to say this would probably be a cleaner solution than just increasing the tick.

function handleSocketOpen(e) {
    $body.removeClass('offline').addClass('online');
    e.target.send('handleSocketOpen');
}

or

function handleSocketOpen(e) {
    $body.removeClass('offline').addClass('online');
    this.send('handleSocketOpen');
}

can't wait for the windows support, this is an awesome project!

edit: nvm i see that you already implemented e.target on the dev branch :D

hzlzh commented 11 years ago

Awesome at Mac OS, still need some windows support.

vladikoff commented 11 years ago

Windows support landed!