NetrisTV / ws-scrcpy

Web client prototype for scrcpy.
MIT License
1.7k stars 334 forks source link

Cant Get Stream / Crashes #29

Closed Torombolo00 closed 4 years ago

Torombolo00 commented 4 years ago

Hello, ive been trying to figure out how to get this project running but it seems to fail over and over.

i dont know if i installed something wrong and im doing it wrong

Im using a Stock Pixel 3

So here is the situation

I run Npm start and it all goes well i get the list of the paths

and i get this screen on my browser ![1](https://user-images.githubusercontent.com/38669445/90025508-044d2f00-dc6b-11ea-805e-93b13abe7d9b.PNG)

then i go into cmd, go to my adb folder in Android SDK and run the adb connect command

i get this image but no options ![2](https://user-images.githubusercontent.com/38669445/90025645-352d6400-dc6b-11ea-9aa6-26b3594ea91a.PNG)
so i run and adb disconnect command i get this ![3](https://user-images.githubusercontent.com/38669445/90025718-4a09f780-dc6b-11ea-9eef-b4645723d8ba.PNG)

But nothing happens when i click the options, only a blank screen, so i do an adb connect again

and im still not getting anything. ![4](https://user-images.githubusercontent.com/38669445/90025799-6148e500-dc6b-11ea-96a4-48b37cc365de.PNG)

now you might be asking why am i doing it this way, and its because in previous version that i used for testing, one of the options had a logcat option, the only way to get that working was with this steps 1- adb connect - See device on list 2- adb disconnect - select logcat option from list 3- adb connect again, refresh logcat page working logcats 4- crashes after 5-10 seconds

Now i tried the following as well 1- adb connect - See device on list 2- adb forward tcp:8886 tcp:8886 3- 127.0.0.1 host 4- same issue and sometimes it crashes

Thank you for you time.

Crash log file.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v14.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ws-scrcpy@0.3.0~prestart: ws-scrcpy@0.3.0
6 info lifecycle ws-scrcpy@0.3.0~start: ws-scrcpy@0.3.0
7 verbose lifecycle ws-scrcpy@0.3.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle ws-scrcpy@0.3.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\creyesd\Desktop\ws-scrcpy-master\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\creyesd\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Users\creyesd\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\creyesd\.windows-build-tools\python27\;C:\Python38\Scripts\;C:\Python38\;C:\Users\creyesd\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\creyesd\AppData\Local\Programs\Python\Python38-32\;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.2.0\bin;C:\Users\creyesd\AppData\Local\Microsoft\WindowsApps;C:\Users\creyesd\AppData\Local\GitHubDesktop\bin;C:\ProgramData\creyesd\atom\bin;C:\Users\creyesd\AppData\Local\atom\bin;C:\Users\creyesd\AppData\Local\Polycom\RealPresence Desktop\;C:\Users\creyesd\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\creyesd\AppData\Roaming\npm
9 verbose lifecycle ws-scrcpy@0.3.0~start: CWD: C:\Users\creyesd\Desktop\ws-scrcpy-master
10 silly lifecycle ws-scrcpy@0.3.0~start: Args: [ '/d /s /c', 'npm run dist && npm run start:dist' ]
11 silly lifecycle ws-scrcpy@0.3.0~start: Returned: code: 1  signal: null
12 info lifecycle ws-scrcpy@0.3.0~start: Failed to exec start script
13 verbose stack Error: ws-scrcpy@0.3.0 start: `npm run dist && npm run start:dist`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid ws-scrcpy@0.3.0
15 verbose cwd C:\Users\creyesd\Desktop\ws-scrcpy-master
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v14.3.0
19 verbose npm  v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error ws-scrcpy@0.3.0 start: `npm run dist && npm run start:dist`
22 error Exit status 1
23 error Failed at the ws-scrcpy@0.3.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
drauggres commented 4 years ago

Hi.

  1. You need to add path to adb.exe into PATH environment variable. Something like this (method 2). I'm not sure if windows will apply changes right away, probably you will need to restart your PC.
  2. Why adb on your pixel 3 is listening on tcp instead of usb? (it does not matter, I'm just curious)
  3. You don't need to run adb disconnect. After state changed to device server (nodejs) should "install" scrcpy server to the device, and the value in the PID column should be changed. If it is not try to reload the page, it will trigger check/install sequence for all connected devices.

P.S. Actually after you have server running on the device you can do disonnect and still be able to steam screen (but not to connect to shell) , but you will need to specify parameters (ip and port) manually in the url, because the device will disappear from the list.

drauggres commented 4 years ago

Please, try to reproduce crash with develop branch, I added some logging (if it was the right place, then it will not crash, but just print more sensible message).

Torombolo00 commented 4 years ago

Hi.

  1. You need to add path to adb.exe into PATH environment variable. Something like this (method 2). I'm not sure if windows will apply changes right away, probably you will need to restart your PC.
  2. Why adb on your pixel 3 is listening on tcp instead of usb? (it does not matter, I'm just curious)
  3. You don't need to run adb disconnect. After state changed to device server (nodejs) should "install" scrcpy server to the device, and the value in the PID column should be changed. If it is not try to reload the page, it will trigger check/install sequence for all connected devices.

P.S. Actually after you have server running on the device you can do disonnect and still be able to steam screen (but not to connect to shell) , but you will need to specify parameters (ip and port) manually in the url, because the device will disappear from the list.

Thanks for the Reply let me answer the questions.

  1. Done >.> i am dumb this will save me a lot of headaches thanks!

  2. Im used to using TCP instead of usb on my phones so its been hammered in my brain, for me its easier to remember the ip

  3. I waited a bit and boy oooooh boy

image

PS. i did download the dev build and it seems to get it working 0 errors, will do more test tomorrow.

Thank you so much!!!!!