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

Not compatible with Electron? #2

Open
mstade opened this issue Feb 26, 2020 · 7 comments
Open

Not compatible with Electron? #2

mstade opened this issue Feb 26, 2020 · 7 comments

Comments

@mstade
Copy link

mstade commented Feb 26, 2020

Hi – cool project!

I was just trying out your node example in an Electron project, but get the following error:

/Users/mstade/dev/cjm/journeyman/node_modules/wasm-git/lg2.js:1 exception thrown: Error: The V8 platform used by this instance of Node does not support creating Workers,Error: The V8 platform used by this instance of Node does not support creating Workers
    at new Worker (internal/worker.js:100:21)
    at Object.emscriptenhttpconnect (/Users/mstade/dev/cjm/journeyman/node_modules/wasm-git/lg2.js:1:127240)
    at 72457 (/Users/mstade/dev/cjm/journeyman/node_modules/wasm-git/lg2.js:1:14890)
    at _emscripten_asm_const_iii (/Users/mstade/dev/cjm/journeyman/node_modules/wasm-git/lg2.js:1:15413)
    at wasm-function[2224]:79
    at wasm-function[2145]:58
    at wasm-function[348]:8
    at wasm-function[2160]:180
    at wasm-function[2141]:233
    at wasm-function[559]:312

I am however able to run the example just using Node, so this seems to be distinctly an issue with Electron. I'll try to figure this out, but any pointers or suggestions you may have are more than welcome!

@petersalomonsen
Copy link
Owner

You need a quite recent version of NodeJS ( I use v 12.9.1 ), since Worker threads and Atomics is used for the http transport ( it needs to act like synchronous for libgit2 ).

@mstade
Copy link
Author

mstade commented Feb 26, 2020

Ah I see! Ok, let me see if we can just update the version of Electron we use, sounds like that might fix the problem. Will report back ASAP!

@mstade
Copy link
Author

mstade commented Mar 12, 2020

Sorry for the delay in getting back to you. I've just tried updating to the latest Electron version, which it the time of writing is 8.1.1, and according to the official site includes node 12.13.0. I'm still getting the same error though. I've made sure to remove all packages and done a clean installation so I'm not being fooled by an old version or anything like that.

I think I need to do a more isolated test to try and understand what's going on, but wanted to get back to you with something at least so you know I'm still looking into how to get this working in Electron.

@petersalomonsen
Copy link
Owner

yes looking forward to hear about it :-) see my updates on NODEFS btw.

@petersalomonsen
Copy link
Owner

@mstade check out the new asyncify support by @happybeing that makes it possible to use wasm-git without a webworker. maybe this helps for your Electron use case?

@SaadBazaz
Copy link

As far as I remember, Electron doesn't support WebAssembly modules. Maybe things have changed now?

@petersalomonsen
Copy link
Owner

I don't know as I've never tried with Electron myself. Anyone who can check this?

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

3 participants