Giter Site home page Giter Site logo

Comments (9)

talss89 avatar talss89 commented on May 25, 2024

I've spotted nwjs/nw.js#1006

Zipping and dropping on to executable still does not work however. I don't think it's related.

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

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.

from angular-desktop-app.

jgrenon avatar jgrenon commented on May 25, 2024

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 (#9 (comment)).

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

Hi. Nope, no npm-debug.log is written, and npm install does not throw any errors.

I believe this is a similar issue nwjs/nw.js#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.

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

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!)

from angular-desktop-app.

jgrenon avatar jgrenon commented on May 25, 2024

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 (#9 (comment)).

from angular-desktop-app.

jgrenon avatar jgrenon commented on May 25, 2024

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 (#9 (comment)).

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

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
  • (The nw-gyp npm hook is still required - it rebuilds bson)
  • cd ./src/node_modules/mongoose/node_modules/mongodb/node_modules/bson
  • Copy the ./build/Release/bson.node binary (which has just been freshly built) to ./ext/win32/ia32/bson.node. Overwrite it.
  • cd ../../../../kerberos
  • Edit ./lib/win32/wrappers/security_context.cc, and comment out line 4, to read // #include <v8.h>
  • Back in the kerberos directory, run the usual suspect: 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.

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

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.

from angular-desktop-app.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.