Closed talss89 closed 10 years ago
I've spotted https://github.com/rogerwang/node-webkit/issues/1006
Zipping and dropping on to executable still does not work however. I don't think it's related.
Loading mongoose 3.8.7 into a fresh node-webkit 0.8.4 (with no other modules / loaded) results in exactly the same behaviour.
Looks like the issue might be with the mongoose package.
thanks for the feedback. I’ll test on Linux and Windows and report any issues back to the node-webkit project.
Are there any errors when you execute npm (npm-debug.log?), sounds like some native code is failing here.
On Wednesday, February 12, 2014 at 17:31, Tom Lawton wrote:
Loading mongoose 3.8.7 into a fresh vanilla node-webkit 0.8.4 results in exactly the same behaviour. Looks like the issue might be with the mongoose package.
— Reply to this email directly or view it on GitHub (https://github.com/jgrenon/angular-desktop-app/issues/9#issuecomment-34926511).
Hi. Nope, no npm-debug.log is written, and npm install does not throw any errors.
I believe this is a similar issue https://github.com/rogerwang/node-webkit/issues/1174
Compiling mongoose/mongodb/BSON with nw-gyp results in no errors, but node-webkit continues to crash.
In addition, mongoose/mongodb/kerberos uses node-gyp to build. nw-gyp fails to build it on my system. The output is here: https://gist.github.com/talss89/8979776
The kerberos module has a test suite, run via npm test
. Needless to say, this fails 2/2 tests.
It could be that my MSVS environment is broken - it's only in use for node-gyp on this machine.
In particular the warning below seems to suggest something fishy going on in the MS toolchain.
warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
Joel - It'll be interesting to see if everything is working on your Windows box.
Ok, here's the fix.
src\node_modules\mongoose\node_modules\mongodb\node_modules\bson
nw-gyp clean && nw-gyp configure --target=0.8.4 && nw-gyp build
It's a bit of a hassle having to perform this step on every npm install
. I don't have much experience with NPM / *-gyp so can't really offer a permanent solution aside from including the above steps in the readme. But that's a last resort IMO.
The kerberos compilation issue turned out to be unrelated (after I'd debugged the linker error and got it to compile ... typical!)
ok that’s good. To keep things going while we find a better fix, I’ve added a post-install script in package.json that execute your workaround after each npm install automatically. Let’s keep this script until we find a real solution.
I didn’t have this problem on my Windows btw. The app was very long to start though, which might be another issue. I’ll look into it when I have spare time.
thanks! Joel
On Thursday, February 13, 2014 at 15:12, Tom Lawton wrote:
Ok, here's the fix. CD to src\node_modules\mongoose\node_modules\mongodb\node_modules\bson
Execute nw-gyp clean && nw-gyp configure --target=0.8.4 && nw-gyp build
The app should boot OK.It's a bit of a hassle having to perform this step on every npm install. I don't have much experience with NPM / *-gyp so can't really offer a permanent solution aside from including the above steps in the readme. But that's a last resort IMO. The kerberos compilation issue turned out to be unrelated (after I'd debugged the linker error and got it to compile ... typical!)
— Reply to this email directly or view it on GitHub (https://github.com/jgrenon/angular-desktop-app/issues/9#issuecomment-35020451).
I haven’t test the script on windows… maybe you’ll have to fine-tune a bit to get this running… I’ve used bash she-bang approach which will definitely not run on Windows.
On Thursday, February 13, 2014 at 15:37, Joel Grenon wrote:
ok that’s good. To keep things going while we find a better fix, I’ve added a post-install script in package.json that execute your workaround after each npm install automatically. Let’s keep this script until we find a real solution.
I didn’t have this problem on my Windows btw. The app was very long to start though, which might be another issue. I’ll look into it when I have spare time.
thanks! Joel
On Thursday, February 13, 2014 at 15:12, Tom Lawton wrote:
Ok, here's the fix. CD to src\node_modules\mongoose\node_modules\mongodb\node_modules\bson
Execute nw-gyp clean && nw-gyp configure --target=0.8.4 && nw-gyp build
The app should boot OK.It's a bit of a hassle having to perform this step on every npm install. I don't have much experience with NPM / *-gyp so can't really offer a permanent solution aside from including the above steps in the readme. But that's a last resort IMO. The kerberos compilation issue turned out to be unrelated (after I'd debugged the linker error and got it to compile ... typical!)
— Reply to this email directly or view it on GitHub (https://github.com/jgrenon/angular-desktop-app/issues/9#issuecomment-35020451).
Great - thanks! The script executes perfectly, and seems to do exactly what I did earlier to get node-webkit to run.
Unfortunately, the problem is still there as it was.
Anyway, I just applied my patch for kerberos to your updated master, ran nw-gyp over that, copied the bson.node binary into ext/ and node-webkit is back.
I've managed to pull 3 fresh copies and use the following process to get them working, so I'm assuming this is the actual fix end to end:
npm install && grunt install
cd ./src/node_modules/mongoose/node_modules/mongodb/node_modules/bson
./build/Release/bson.node
binary (which has just been freshly built) to ./ext/win32/ia32/bson.node
. Overwrite it.cd ../../../../kerberos
./lib/win32/wrappers/security_context.cc
, and comment out line 4, to read // #include <v8.h>
nw-gyp clean && nw-gyp configure --target=0.8.4 && nw-gyp build
I'm not sure on the differences between node-gyp and nw-gyp, but node-gyp compiles the unmodified kerberos source (0.0.3) fine, whereas nw-gyp does not, and cries about a linker error.
The linker error is being caused by the V8 headers being included twice. Something in the difference between node-gyp and nw-gyp is causing two copies of the headers being linked. Usually I would think this is because the header guards can't take into account #defines from other objects, which may or may not be linked, but I expected the behaviour to be the same between nw-gyp and node-gyp. Which has left me scratching my head.
Sorry to keep posting - but just realised two things: a) this is a nw-gyp / kerberos issue and better off raised with them (duh...) and b) The V8 header linker problem is due to node-webkit using a modified version of the V8 headers.
It's late, so I'll raise this tomorrow with nw-gyp or mongodb/kerberos.
Thanks,
Tom.
Hi,
I haven't had chance to look at this issue in detail, but
grunt build
is failing to run on Windows 7 after pulling a fresh copy of 1.1.0(?)I get the following terminal output:
Node-webkit fires up to the point at which it renders the page, then exits, resulting in the output above.
In addition, running
grunt build
, and then running the executable in releases/, takes ages to start (comparatively), then causes the process to become unresponsive.I've narrowed the issue down to mongoose (3.8.7). I guess the next step would be to see if anything similar has been reported with them.
Commenting out line 7 in src/js/services/db.js. allows node-webkit to boot.
Eg.
I'm pretty busy at the moment, but will try to have a look further into this later in the week.
Tom.