scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Snap: adb server version (39) doesn't match this client (41)

Open eater opened this issue 4 years ago • 10 comments

  • [x] I have read the FAQ.
  • [x] I have searched in existing issues.

Environment

  • OS: Ubuntu 18.04
  • scrcpy version: 1.16
  • installation method: snap
  • device model: Pixel 4a
  • Android version: 11

Describe the bug When I run scrcpy:

adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
connected to 192.168.50.18:5555
eater $INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>                                                                                                      
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1

I think because:

$ /snap/scrcpy/current/usr/bin/adb --version                                                                   
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5~18.04
Installed as /snap/scrcpy/256/usr/lib/android-sdk/platform-tools/adb

eater avatar Dec 10 '20 19:12 eater

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#conflicts-between-adb-versions

ADB=$(which adb) scrcpy

rom1v avatar Dec 10 '20 19:12 rom1v

Sorry, github web is being weird but I meant to include that that gives a different error:

$ADB=$(which adb) scrcpy                                                                                                                  
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
exec: No such file or directory
ERROR: Command not found: [/usr/local/bin/androidtools/platform-tools/adb], [push], [/usr/local/share/scrcpy/scrcpy-server], [/data/local/tmp/scrcpy-server.jar]
ERROR: (make 'adb' accessible from your PATH or define its fullpath in the ADB environment variable)
INFO: You may install 'adb' by "apt install adb"
ERROR: Could not execute "adb push"

eater avatar Dec 10 '20 19:12 eater

What is the result of:

/usr/local/bin/androidtools/platform-tools/adb devices

?

rom1v avatar Dec 10 '20 19:12 rom1v

List of devices attached
192.168.50.18:5555	device

eater avatar Dec 10 '20 19:12 eater

So for some reason snap can't see your host filesystem to use your adb.

Try to use a non-snap version (= build it).

rom1v avatar Dec 10 '20 20:12 rom1v

Yup, building it works (that's how I've been using scrcpy till now, it's great)

eater avatar Dec 10 '20 20:12 eater

I'm having this very same problem.

scrcpy
INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
sudo scrcpy
INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
ADB=$(which adb) scrcpy
INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
sudo ADB=$(which adb) scrcpy
INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1

Ubuntu 20.10 and Android-Studio downloaded from a repo (not snap) http://ppa.launchpad.net/maarten-fonville/android-studio/ubuntu/

Jesus82 avatar Dec 28 '20 10:12 Jesus82

this issue is caused by two versions of adb installed inthe system.. i think their package installs the ubuntu apt adb version and saves it in /usr/bin/adb

then we have /home/fabrizio/Android/Sdk/platform-tools/adb and the version from /usr/bin/adb causes this error

I removed such version and error went away

fabOnReact avatar Feb 10 '21 13:02 fabOnReact

this issue is caused by two versions of adb installed inthe system.. i think their package installs the ubuntu apt adb version and saves it in /usr/bin/adb

then we have /home/fabrizio/Android/Sdk/platform-tools/adb and the version from /usr/bin/adb causes this error

I removed such version and error went away

It works. Thank you so much @fabriziobertoglio1987 :)

jalinegm avatar Oct 27 '21 18:10 jalinegm

THIS WILL REALLY HELP YOU (almost 90% of the time this might be the problem)

  1. Download the latest version of ADB from the official Android developer website:

    [https://developer.android.com/studio/releases/platform-tools]

  2. Extract the contents of the ADB ZIP file to a directory on your system, such as ~/Tools.

  3. Add the directory containing the ADB binary to your PATH environment variable by adding the following line to your .bashrc file:

      `export PATH=$PATH:/path/to/adb-file-just-downloaded-and-extracted/`
    
  4. Reload the .bashrc file by running the following command: . ~/.bashrc

  5. Try running scrcpy again and see if the error message goes away.

ByteBreacher avatar Feb 09 '23 10:02 ByteBreacher