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

Window Pop up after typing scrcpy in cmd but gets closed automatically in 2 sec. #1600

Open
2 tasks
9374020304 opened this issue Jul 18, 2020 · 28 comments
Open
2 tasks

Comments

@9374020304
Copy link

9374020304 commented Jul 18, 2020

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [Windows 10 64bit]
  • scrcpy version: [e.g. 1.14]
  • installation method: [e.g. manual build, apt, snap, brew, Windows release...]
  • device model: Samsung Galaxy S10 Lite
  • Android version: [10]

Describe the bug
I just want to record my gameplay with scrcpy.
I already have adb and scrcpy on my pc and also started USB Deugging on My Device.
adb device command also shows my device.
but when i type scrcpy command a window just pop up showing device name on it and it just get closed automatically.
is there any solution for that i have been working on this thing for last 2 days.
There is no error the window for mirroring pop up and get closed automatically in 2 sec.
Uploading a screenshot with the command i used.
Error

@rom1v
Copy link
Collaborator

rom1v commented Jul 18, 2020

I guess adb is getting disconnected. Open a separate console with adb logcat and keep it open. If it terminates at the same tile as scrcpy, then it's adb which disconnects.

In that case, try to use another USB cable or port (see #281 #283).

@rom1v
Copy link
Collaborator

rom1v commented Jul 18, 2020

Otherwise, there is probably an error printed in adb logcat, please post it.

@9374020304
Copy link
Author

i started another console with adb logcat and tried using scrcpy in another window first it shows some error i am attaching a file on that and in another try the cursor just keep blinking i need a solution asap please do something.
error 1

@9374020304
Copy link
Author

Otherwise, there is probably an error printed in adb logcat, please post it.

Hoping a Reply ASAP!!!

@9374020304
Copy link
Author

Can i get a answer please i am working on it for last 3 days atleast in tomorrow morning it gets connected and i was mirroring for 10 mins but then again it gets connected and after 1 sec it just close the app i need a solution please that is my last hope for mirroring.

Otherwise, there is probably an error printed in adb logcat, please post it.

@9374020304
Copy link
Author

error
i am getting this error after i use the command
scrcpy -Vdebug
Please Help!!

@rom1v
Copy link
Collaborator

rom1v commented Jul 20, 2020

Tl dump the logs:

adb logcat -c  # clean the logs
scrcpy
# once it is closed
adb logcat -d > logcat.txt

Then post your logcat.txt.

@9374020304
Copy link
Author

logcat.txt
Here it is.

@rom1v
Copy link
Collaborator

rom1v commented Jul 20, 2020

I don't find any error specific to scrcpy. A lot of errors related to CamX...

i was mirroring for 10 mins but then again it gets connected and after 1 sec it just close the app

So it's probably a crash in your device system. If you reboot, does it work again?

Does adb shell screenrecord /sdcard/file.mp4 work?
What about scrcpy -m800?

@9374020304
Copy link
Author

9374020304 commented Jul 20, 2020

I don't find any error specific to scrcpy. A lot of errors related to CamX...

i was mirroring for 10 mins but then again it gets connected and after 1 sec it just close the app

So it's probably a crash in your device system. If you reboot, does it work again?

Does adb shell screenrecord /sdcard/file.mp4 work?
What about scrcpy -m800?

I have already tried 3 or 4 devices i dont think there is any error in my device.
even scrcpy -m 800 is not working

@rom1v
Copy link
Collaborator

rom1v commented Jul 20, 2020

I have already tried 3 or 4 devices

Did you try with another cable/USB port? (#281 #283)

@9374020304
Copy link
Author

yeah i tried it, the window just open and get closed in 1 sec

@rom1v
Copy link
Collaborator

rom1v commented Jul 20, 2020

If this happens to several (different) devices, the problem is on the computer-side. Could you try with another computer/OS?

@9374020304
Copy link
Author

yup i just tried using another pc and it works just fine. So that is clear the problem is with my pc.
Is there any solution for that??

@rom1v
Copy link
Collaborator

rom1v commented Jul 21, 2020

It might be due to insufficient USB power. Or maybe bad USB drivers...

Try with another OS (run a live CD of some Linux distrib to test).

@9374020304
Copy link
Author

Should i try formatting my pc?

@9374020304
Copy link
Author

is it gonna help?

@9374020304
Copy link
Author

can i get your email or something so we can personally i really want to run scrcpy i can even format my whole laptop for this to work u can imagine how important it is for me to get it working.
i have to invest in some capture card if i dont get any solution from you please help me with that.
i know that the problem is in the laptop so should i format it?

@rom1v
Copy link
Collaborator

rom1v commented Jul 21, 2020

Download a live cd of Ubuntu for example, and run it. No need to format.

@9374020304
Copy link
Author

ok thank you i will try that and contact again.

@9374020304
Copy link
Author

but i have one more question if it will work with ubuntu how can i make it work on my windows?
i want to run it on my windows and record it.

@9374020304
Copy link
Author

Can u answer?

@9374020304
Copy link
Author

Yup working just fine in the ubuntu latest version but there is some problem in win 10 i think.
i tried playing around in ubuntu live cd but it lags so much and frame drops continuously so i think i have to invest in a capture card now. Thank You so much for all the help and support.

@rom1v
Copy link
Collaborator

rom1v commented Jul 22, 2020

(It lags probably because it's a livecd without all the firmware/drivers. It should work with a real install.)

@9374020304
Copy link
Author

but now how can i get it working on my windows?

@9374020304 9374020304 reopened this Jul 22, 2020
@rom1v
Copy link
Collaborator

rom1v commented Jul 22, 2020

I don't know. My guess is that disconnections are due to a problem with your USB drivers or USB power. If it works from Ubuntu, then it's probably your drivers or some Windows problem.

(Could you confirm that adb logcat in a separate terminal terminates at the same time as scrcpy is unexpectedly disconnected?)

@rom1v
Copy link
Collaborator

rom1v commented Jul 26, 2020

Does it work better with v1.9 or v1.10 instead of v1.14?

@rom1v
Copy link
Collaborator

rom1v commented Aug 12, 2020

Did you try to reduce the definition? #283 (comment)

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

2 participants