Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

electron app not found wrtc #835

Closed
josselinchevalay opened this issue Apr 23, 2017 · 7 comments
Closed

electron app not found wrtc #835

josselinchevalay opened this issue Apr 23, 2017 · 7 comments
Labels
kind/bug A bug in existing code (including security flaws) kind/support A question or request for support

Comments

@josselinchevalay
Copy link
Contributor

Hello guys,

i implement electron in my web app and try to run but i have this error.

Error: Cannot find module '/home/josselin/development/telescope/node_modules/wrtc/build/wrtc/v0.0.61/Release/electron-v1.6-linux-x64/wrtc.node'

i try to install leveldown and wrtc manually with npm install --save wrtc leveldownbut not works againt

regards

@nannal
Copy link

nannal commented Apr 23, 2017

Ensure the electron-v1.6-linux-x64 diectore exists, if not create it and then move wrtc.node into it.

You'll likely get an error about it being built for the wrong version at which point you need to do some funky arcane shit with electron-rebuild. from then on it will work but dont even think about trying to package it up using electron-packer because that just breaks everything.

Someone who knows what they are doing might be able to actually resolve it, but I threw a weekend into it and that's as far as I got.

Abandon hope all ye who enter here

@josselinchevalay
Copy link
Contributor Author

now i have that :

was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing

@ghost
Copy link

ghost commented Apr 23, 2017

cc @kyledrake

@daviddias
Copy link
Member

This solved @kyledrake's issues https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md let me know if it works for you.

@daviddias daviddias added the kind/support A question or request for support label May 7, 2017
@josselinchevalay
Copy link
Contributor Author

hi i test your proposal to build native module with electron-rebuild

after a first error because i need to add libssl-dev now i have that

make : on entre dans le répertoire « /home/josselin/development/electron-app-ipfs/node_modules/execSync/build »
  CXX(target) Release/obj.target/shell/src/shell.o
../src/shell.cpp:138:26: error: ‘Arguments’ does not name a type
 Handle<Value> Exec(const Arguments& args) {
                          ^
In file included from /home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/src/node.h:42:0,
                 from ../src/shell.cpp:1:
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> Exec(const int&)’:
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:874:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/shell.cpp:139:17: error: within this context
     HandleScope scope;
                 ^
../src/shell.cpp:141:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
     if (args.Length() < 1) {
              ^
../src/shell.cpp:143:34: error: ‘New’ is not a member of ‘v8::String’
             Exception::TypeError(String::New("First argument must be a string"))
                                  ^
../src/shell.cpp:144:9: error: ‘ThrowException’ was not declared in this scope
         );
         ^
../src/shell.cpp:147:31: error: invalid types ‘const int[int]’ for array subscript
     Local<String> str = args[0]->ToString();
                               ^
../src/shell.cpp:151:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
     return scope.Close(Integer::New(result));
                  ^
../src/shell.cpp:151:43: error: no matching function for call to ‘v8::Integer::New(int&)’
     return scope.Close(Integer::New(result));
                                           ^
In file included from /home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/src/node.h:42:0,
                 from ../src/shell.cpp:1:
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:2756:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:2756:25: note:   candidate expects 2 arguments, 1 provided
../src/shell.cpp: In function ‘void RegisterModule(v8::Handle<v8::Object>)’:
../src/shell.cpp:155:17: error: ‘NewSymbol’ is not a member of ‘v8::String’
     target->Set(String::NewSymbol("exec"),
                 ^
../src/shell.cpp:156:39: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
             FunctionTemplate::New(Exec)->GetFunction());
                                       ^
In file included from /home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/src/node.h:42:0,
                 from ../src/shell.cpp:1:
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:5090:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
   static Local<FunctionTemplate> New(
                                  ^
/home/josselin/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:5090:34: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
../src/shell.cpp: In function ‘void child(const char*)’:
../src/shell.cpp:69:11: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result [-Wunused-result]
     dup(1);
           ^
../src/shell.cpp:71:11: warning: ignoring return value of ‘int dup(int)’, declared with attribute warn_unused_result [-Wunused-result]
     dup(2);
           ^
shell.target.mk:92 : la recette pour la cible « Release/obj.target/shell/src/shell.o » a échouée
make : on quitte le répertoire « /home/josselin/development/electron-app-ipfs/node_modules/execSync/build »
make: *** [Release/obj.target/shell/src/shell.o] Erreur 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/josselin/development/electron-app-ipfs/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-72-generic
gyp ERR! command "/usr/bin/nodejs" "/home/josselin/development/electron-app-ipfs/node_modules/.bin/node-gyp" "rebuild" "--target=1.6.8" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /home/josselin/development/electron-app-ipfs/node_modules/execSync
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok 

any idea ?

@daviddias
Copy link
Member

Yeah, I'm seeing errors too with electron-rebuild

» ./node_modules/.bin/electron-rebuild
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@7.10.0 | darwin | x64
gyp http GET https://atom.io/download/electron/v1.4.31/iojs-v1.4.31.tar.gz
gyp http 404 https://atom.io/download/electron/v1.4.31/iojs-v1.4.31.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 response downloading https://atom.io/download/electron/v1.4.31/iojs-v1.4.31.tar.gz
gyp ERR! stack     at Request.<anonymous> (/Users/koruza/code/brave-browser-laptop/node_modules/node-gyp/lib/install.js:210:14)
gyp ERR! stack     at emitOne (events.js:101:20)
gyp ERR! stack     at Request.emit (events.js:191:7)
gyp ERR! stack     at Request.onRequestResponse (/Users/koruza/code/brave-browser-laptop/node_modules/request/request.js:1074:10)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! stack     at ClientRequest.emit (events.js:191:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:522:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:411:20)
gyp ERR! stack     at emitOne (events.js:96:13)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/koruza/code/brave-browser-laptop/node_modules/.bin/node-gyp" "rebuild" "--target=1.4.31" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/koruza/code/brave-browser-laptop/node_modules/ad-block/node_modules/bloom-filter-cpp
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Failed with exit code: 1

@kyledrake could you tell us how you solve this issue?

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Jun 29, 2017
@daviddias
Copy link
Member

wrtc shouldn't be a issue anymore with #884. Now onto the remaining issues, please track it in #843

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

3 participants