-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
scrcpy exits spontaneously a few times a day #4508
Comments
This happens when the adb connection gets closed. This may happen due to USB cable/port issue, or when USB is reconfigured (when you enable/disable MTP for example). This is not specific to scrcpy: if you run |
But adb should not terminate spontaneously. I never use MTP and never reconfigure USB when the device is connected using scrcpy. |
From the adb perspective, this is exactly as if the device was disconnected. If you run an
Try with another cable or USB port then. |
The issue also occurs when connected via wifi, but less frequently. |
Yes, this can happen too. Sometimes the adb server (in the device ROM) just crashes on the device (check your adb logcat). Anyway, this is a problem at the adb level, if the adb connection is closed, scrcpy detects that the device is disconnected. In theory, it could try to reconnect during a certain period, but it's too complicated for a workaround. This can be done by an external script which restarts if scrcpy terminates with an error (cf #721). |
This solution might work for you |
Environment
Describe the bug
When connected wired via USB cable, it just exits a few times during a work day. After restart it runs a couple of hours and then it exits again spontaneously.
This does not happen when connected wirelessly.
This terminal output appears when it spontaneously exits:
The text was updated successfully, but these errors were encountered: