sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.09k stars 802 forks source link

Error when running npm start #19

Closed alemdg closed 6 years ago

alemdg commented 6 years ago

Hello, I'm getting an error when trying to run for the first time.

npm start

> whatsapp-web-reveng@1.0.0 start D:\sourcesadg\Whatsapp
> npm run dev

> whatsapp-web-reveng@1.0.0 dev D:\sourcesadg\Whatsapp
> concurrently --kill-others "./node_modules/.bin/nodemon index.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"

[0] '.' is not recognized as an internal or external command,
[0] operable program or batch file.
[0] ./node_modules/.bin/nodemon index.js -i client -e js exited with code 1
--> Sending SIGTERM to other processes..
[1] '.' is not recognized as an internal or external command,
[1] operable program or batch file.
[1] ./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py exited with code 1
[2] sass --sourcemap=none --watch client/css/main.scss:client/css/main.css exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whatsapp-web-reveng@1.0.0 dev: `concurrently --kill-others "./node_modules/.bin/nodemon index.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the whatsapp-web-reveng@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Alejandro\AppData\Roaming\npm-cache\_logs\2018-04-13T14_19_31_443Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whatsapp-web-reveng@1.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the whatsapp-web-reveng@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Alejandro\AppData\Roaming\npm-cache\_logs\2018-04-13T14_19_31_487Z-debug.log

Logfile:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'D:\\SourcesADG\\Whatsapp\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@5.8.0
3 info using node@v8.9.4
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle whatsapp-web-reveng@1.0.0~predev: whatsapp-web-reveng@1.0.0
6 info lifecycle whatsapp-web-reveng@1.0.0~dev: whatsapp-web-reveng@1.0.0
7 verbose lifecycle whatsapp-web-reveng@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle whatsapp-web-reveng@1.0.0~dev: PATH: D:\SourcesADG\Whatsapp\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\sourcesadg\Whatsapp\node_modules\.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\sourcesadg\Whatsapp\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files\Microsoft MPI\Bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Users\Alejandro\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\7-Zip;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\openssl;C:\Program Files\Java\jdk1.8.0_131\bin;D:\Drivers y programas\ngrok;C:\Program Files\nodejs\;C:\Program Files\MongoDB\Server\3.6\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Users\Alejandro\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Alejandro\AppData\Local\Programs\Python\Python36-32\;C:\Users\Alejandro\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Alejandro\AppData\Roaming\npm
9 verbose lifecycle whatsapp-web-reveng@1.0.0~dev: CWD: D:\sourcesadg\Whatsapp
10 silly lifecycle whatsapp-web-reveng@1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle   'concurrently --kill-others "./node_modules/.bin/nodemon index_jsdemo.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"' ]
11 silly lifecycle whatsapp-web-reveng@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle whatsapp-web-reveng@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: whatsapp-web-reveng@1.0.0 dev: `concurrently --kill-others "./node_modules/.bin/nodemon index_jsdemo.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (D:\SourcesADG\Whatsapp\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (D:\SourcesADG\Whatsapp\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid whatsapp-web-reveng@1.0.0
15 verbose cwd D:\sourcesadg\Whatsapp
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "D:\\SourcesADG\\Whatsapp\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v8.9.4
19 verbose npm  v5.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error whatsapp-web-reveng@1.0.0 dev: `concurrently --kill-others "./node_modules/.bin/nodemon index_jsdemo.js -i client -e js" "./node_modules/.bin/nodemon --exec python ./backend/whatsapp-web-backend.py -i client -e py" "sass --sourcemap=none --watch client/css/main.scss:client/css/main.css"`
22 error Exit status 1
23 error Failed at the whatsapp-web-reveng@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
sigalor commented 6 years ago

As seen in #16, the project does not yet support Windows. I'm sorry about that, but the entire development has taken place on Ubuntu. I'd be happy though if someone would take a look at the scripts and make them platform independent. Apparently you're on Windows 10 as well. Could someone try out wheather npm start works in the subsystem for Linux?

SuperSandro2000 commented 6 years ago

I am looking into it.

SuperSandro2000 commented 6 years ago

The referenced PR fixes startup on windows. It is a bit tidious but works. When opening the login-via-js-demo.html nothing happens because no js is executed. Dev console shows:

jquery.min.js:1 Uncaught SyntaxError: Unexpected number
sjcl.js:1 Uncaught SyntaxError: Unexpected number
login-via-js-demo.html:71 Uncaught ReferenceError: sjcl is not defined
    at login-via-js-demo.html:71

The js files just have the script name and a version in it. Is this another windows bug? Edit: Fixed it via https://github.com/sigalor/whatsapp-web-reveng/pull/21/commits/2b695e86d6c2ef9a9e884a826a34060b1264e5a2 It seems to work now on windows correctly but I didn't try it with a real WA account.