as3boyan / node-webkit-haxelib

Haxelib which downloads node-webkit binary for your platform and makes it accessible via `haxelib run node-webkit path/to/index.html`
MIT License
24 stars 3 forks source link

run issue: haxelib run node-webkit #1

Closed ZeerDonker closed 10 years ago

ZeerDonker commented 10 years ago

Hello,

I get the following error when I do this:

haxelib run node-webkit
Looking for node-webkit url...
Main.hx:167: Invalid chunk

And the following when I do this:

haxelib run node-webkit setup
Looking for node-webkit url...
Called from sys.net.Socket::$statics line 1
Called from Main::main line 59
Called from Main::setup line 231
Called from Main::lookForNodeWebkitURL line 193
Called from haxe.Http::requestUrl line 809
Called from haxe.Http::request line 376
Called from haxe.Http::customRequest line 555
Called from haxe.Http::request line 374
Called from haxe.Http::requestUrl line 807
Uncaught exception - Invalid chunk

haxelib upgrade shows no new version.

If you are wondering where this came from: Tried to start up HIDE and ran into a couple of issues.. which I tracked to this haxelib

haxelib run HIDE
Looking for node-webkit url...
Main.hx:167: Invalid chunk
Looking for node-webkit url...
Called from sys.net.Socket::$statics line 1
Called from Main::main line 84
Called from Main::setup line 231
Called from Main::lookForNodeWebkitURL line 193
Called from haxe.Http::requestUrl line 809
Called from haxe.Http::request line 376
Called from haxe.Http::customRequest line 555
Called from haxe.Http::request line 374
Called from haxe.Http::requestUrl line 807
Uncaught exception - Invalid chunk

Do you require any further information?

(example: I am on a windows 8 machine)

as3boyan commented 10 years ago

Hello,

Seems like http request error. https://github.com/as3boyan/node-webkit-haxelib/blob/master/src/Main.hx#L195

node-webkit-haxelib tries to get contents "http://s3.amazonaws.com/node-webkit/"

I searched info on this error, it's hard to understand why it happens, maybe firewall or some software blocks, as a temporary workaround, you can download node-webkit binary for Windows http://dl.node-webkit.org/v0.9.2/node-webkit-v0.9.2-win-ia32.zip

And extract it to haxe/lib/node-webkit/bin, so "nw.exe" should be located in the root of bin folder.

as3boyan commented 10 years ago

Or maybe it lacks some permissions, not sure.

ZeerDonker commented 10 years ago

Hello,

Workaround worked. Thanks.

Making a bin directory in HaxeToolkit\haxe\lib\node-webkit\1,0,4\ with the extracted zip file worked.

(I can safely exclude the firewall as a cause, since disabling the firewall does not remove the error. )