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

adb: error: failed to read copy response #3241

Open
2 tasks done
alyssadev opened this issue May 3, 2022 · 10 comments
Open
2 tasks done

adb: error: failed to read copy response #3241

alyssadev opened this issue May 3, 2022 · 10 comments

Comments

@alyssadev
Copy link

alyssadev commented May 3, 2022

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

Environment

  • OS: Arch Linux 5.17.1
  • scrcpy version: 1.23
  • installation method: Arch package manager
  • device model: SM_N960F
  • Android version: 10

Describe the bug
Sometimes scrcpy seems unable to negotiate the connection, and breaks usb debugging in the process. Disconnecting and reconnecting the phone presents the devices in adb devices again, but it seems to be random whether running scrcpy will cause usb debugging to stop working again.

# using scrcpy as normal, then device suddenly disconnects
[aly@ads-desktop ~]$ scrcpy
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 213.6 MB/s (41123 bytes in 0.000s)
[server] INFO: Device: samsung SM-N960F (Android 10)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 510.60.02
INFO: Trilinear filtering enabled
INFO: Initial texture: 2216x1080
WARN: Device disconnected

# attempting to reconnect
[aly@ads-desktop ~]$ scrcpy
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 279.8 MB/s (41123 bytes in 0.000s)
adb: error: failed to read copy response
ERROR: "adb push" returned with value 1
ERROR: Server connection failed

[aly@ads-desktop ~]$ scrcpy
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find any ADB device
ERROR: Server connection failed

[aly@ads-desktop ~]$ adb devices
List of devices attached
28cda4b224027ece	device

[aly@ads-desktop ~]$ scrcpy -V verbose
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:     -->   (usb)  28cda4b224027ece                device  SM_N960F
DEBUG: Device serial: 28cda4b224027ece
DEBUG: Using server: /usr/share/scrcpy/scrcpy-server
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 165.4 MB/s (41123 bytes in 0.000s)
adb: error: failed to read copy response
ERROR: "adb push" returned with value 1
ERROR: Server connection failed

[aly@ads-desktop ~]$ scrcpy -V verbose
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find any ADB device
ERROR: Server connection failed

[aly@ads-desktop ~]$ adb devices
List of devices attached

[aly@ads-desktop ~]$
@alyssadev
Copy link
Author

Just had it get a little bit further, it successfully connected but then lost connection immediately

[aly@ads-desktop ~]$ scrcpy -V verbose
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:     -->   (usb)  28cda4b224027ece                device  SM_N960F
DEBUG: Device serial: 28cda4b224027ece
DEBUG: Using server: /usr/share/scrcpy/scrcpy-server
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 230.5 MB/s (41123 bytes in 0.000s)
[server] INFO: Device: samsung SM-N960F (Android 10)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
[server] DEBUG: Using encoder: 'OMX.Exynos.AVC.Encoder'
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 510.60.02
INFO: Trilinear filtering enabled
DEBUG: Using icon: /usr/share/icons/hicolor/256x256/apps/scrcpy.png
INFO: Initial texture: 1080x2216
DEBUG: Starting demuxer thread
DEBUG: Receiver stopped
DEBUG: End of frames
WARN: Device disconnected
DEBUG: quit...
DEBUG: Server disconnected
DEBUG: Server terminated
[aly@ads-desktop ~]$ adb devices
List of devices attached

[aly@ads-desktop ~]$ scrcpy -V verbose
scrcpy 1.23 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find any ADB device
ERROR: Server connection failed
[aly@ads-desktop ~]$

@rom1v
Copy link
Collaborator

rom1v commented May 3, 2022

You should try with another USB cable/port: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-disconnected

If this does not fix the problem, might be a bug in the ROM (try with another device to confirm).

@felipecastrosales
Copy link

News about it?

@Krzeszny
Copy link

I had the same error on regular ADB, no additional apps. I still don't know why, but it worked fine on a different computer.

@artem-zinnatullin
Copy link

If cable unplug/plug helps — try replacing the cable with another and maybe try another port on computer. Or you can try something completely different to eliminate cable issue — ADB over Wi-Fi https://developer.android.com/tools/adb#connect-to-a-device-over-wi-fi

And if you’re using a USB-C hub, sometimes they’re problematic if they don’t have enough power or bandwidth if you run say 4k monitor through it.

Hope that helps.

@rapilkim
Copy link

I had the same error while my colleague's PC did not have the error.
Finally, I found that one security policy of the company on my PC was different with him.
It was mobile storage write permission.
After getting the permission, no error shown anymore.
If you use a company PC, check a security policy on it.

@RealYukiSan
Copy link

RealYukiSan commented Sep 10, 2024

I think this is not an issue of scrcpy, adb from platform-tools of android studio also have same issue.

but even though the adb output show an error, the file sent successfully without corrupt

@RealYukiSan
Copy link

after the adb push error, now my devices state switched to offline, hmmm that's weird

@shiyeling
Copy link

I'm having same issue here.
If I copy file to device, it reports: adb: error: failed to read copy response

And if I install directly, it fails and the device become offline.

@ilsubyeega
Copy link

Just used a cable with better bandwidth and it worked.

Originally I had a 100W usb 2.0, but I switched to a 60W 10Gbps cable and it worked. Things like adb shell work, I don't know why only scrcpy doesn't, I thought it would work as far as audio forwarding but not video.

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

9 participants