Closed fabriziocacicia closed 5 years ago
adb server version (41) doesn't match this client (40); killing...
A priori, you just upgraded your platform-tools. Once the server is killed and it started the adb server 41, it should work.
Does it happen again if you start scrcpy once again?
adb server version (41) doesn't match this client (40); killing...
A priori, you just upgraded your platform-tools. Once the server is killed and it started the adb server 41, it should work.
Does it happen again if you start scrcpy once again?
Yes, sure. I tried many many times before posting here. But I just tried to execute the command "scrcpy" again and again. There is some other command to let scrcpy use the new version of the server?
So you have several adb versions running. Something on your system starts (and seems to restart when it dies) the server with adb 41.
And scrcpy uses your adb 40.
What is the result of adb version
?
Find where your adb 41 binary is, and you can force it:
ADB=/path/to/some/adb scrcpy
A better way would be to change your PATH
so that it always finds the right adb
.
Ok, thank you for your help. I had two different versions of adb: one at /usr/local/bin and one in a custom path. The shell was using the /usr/local/bin, Android Studio instead was using the one in the custom path.
Now everything si fine.
Hi all, replace 3 files in "scrcpy" folder by their version in "platform-tools" maybe work.
I hope this will be useful !!!
Ok, thank you for your help. I had two different versions of adb: one at /usr/local/bin and one in a custom path. The shell was using the /usr/local/bin, Android Studio instead was using the one in the custom path.
Now everything si fine.
excuseMe... i have exact this problem... i have Android Debug Bridge version 1.0.41 but when i start it telle me: adb server version (40) doesn't match this client (41); killing... exact like your.... you write some version in: /usr/local/bin that is different from: /usr/local/bin (that i have)! i dont find usr/local/bin........ and i cannot understand where is versione 40 of the server.... can somobody can help me; because i dont understand the solutions of that problem!! thanYouVeryMuch francesco
@rom1v can you explain me better how to use this command: ADB=/path/to/some/adb scrcpy
The idea is to set the environment variable ADB
(which is read by scrcpy).
In a shell (typically on linux), you can set the variable for a single command:
VAR=value command
On Windows, you can set it globally in Windows preferenced, but you can also set it locally:
set VAR=value
command
So:
set ADB=C:\path\to\adb.exe
scrcpy
thank... @rom1v i exec: set ADB=C:\...\AppData\Local\Android\Sdk because i understand this! all my software is update to last version, all path of environment variable is set on windows.... adb on cmd GO! but... when i want to play project on Android Studio tell me:
Unable to connect to ADB. Check the Event Log for possible issues. Verify that your localhost entry is pointing to 127.0.0.1 or ::1 for IPv4 or IPv6, rispectively.
now i try to do that i understand of your suggest; but i cannot understand why dont go! i check and i havent any other version of ADB! is only in one place!
thanYou Francesco
i exec: set ADB=C:...\AppData\Local\Android\Sdk
You must use the full path to the binary:
set ADB=C:\...\AppData\Local\Android\Sdk\platform-tools\adb.exe
ok true, i set this but have same problem :(
@rom1v i make that you suggest! but there is always same problem :( :( i dont know what i can do.... is second time that i delete and re-intall all android platform... and always always same problem for ADB in cmd adb funtions!!!!!!!
What are the results of:
adb version
and
C:\...\AppData\Local\Android\Sdk\platform-tools\adb.exe version
?
also:
echo %PATH%
adb version: Android Debug Bridge version 1.0.41 Version 29.0.1-5644136 Installed as C:\Users...\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\Users...\AppData\Local\Android\Sdk\platform-tools\adb.exe version Android Debug Bridge version 1.0.41 Version 29.0.1-5644136 Installed as C:\Users...\AppData\Local\Android\Sdk\platform-tools\adb.exe IS THE SAME!!!
echo %PATH%: here i see that platform-tools is inside 4 time... with same address! i dont know why platform-tools there is more times... some are system variables anb others are user variables; i think now i will go to check!
thankYouuu for now Francesco
Oh, but your problem is the reverse:
adb server version (40) doesn't match this client (41);
You correctly uses v41, but some app on your computer executes adb commands with adb v40. You must find this app and stop it :wink:
yes, when i use adb devices on cmd i have this error... who use other adv v40??????? i think visual studio code... but no! it dont find phone for the same problem like Android studio!
ehmmmmm yes probably yess... i cannot understand why; when i start to play emulator on Android Studio; and if there is my phone on usbCable... all process go in error!!!!
who uses ADB version 40? i cannot understand :( :( :(
Check in your process list (in your taskmanager or something).
i have exact this problem... i dont know who restart adb.exe every time i stop and delete process on Task Manager (windows)....
i follow the process!!! i understand!!!!!!!!!!!!!!!! probably is app that i use for view windows on android tablet to start every time ADB!!!! thankYouForHelp.... without your help i cannot understand! i will alert you when i resolve this problem!!!!
@rom1v ThankYouVeryMuch Romain... i solve all my problem... with your help i understand that i have installed one software to deploy screen of windows over android tablet (https://www.splashtop.com/wiredxdisplay).... this software turn on his version of ADB and make "casino" with androdiStudio version!! thank..... i need to upgrade my capacity to understand ;)
fixed this by doing the following:
going into GenyMotion settings -> ADB tab, instead of Use Genymotion Android tools (default), I chose Use custom Android SDK Tools and then browsed to my installed SDK.
thanks very much it works correctly!! it takes me a minute
still doesnt work for me on ubuntu.
@toles04 What is your exact error message?
adb version
which adb
echo $PATH
echo $ADB
?
@rom1v the same happens to me. I have the emulator on genymotion running, and when I give adb start-server
this happens:
adb server version (41) doesn't match this client (39); killing...
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 30319
--- adb starting (pid 30319) ---
adb I 09-28 01:13:58 30319 30319 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 09-28 01:13:58 30319 30319 main.cpp:57] Version 1:8.1.0+r23-5~18.04
adb I 09-28 01:13:58 30319 30319 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 09-28 01:13:58 30319 30319 main.cpp:57]
adb I 09-28 01:13:58 30319 30319 adb_auth_host.cpp:416] adb_auth_init...
adb I 09-28 01:13:58 30319 30319 adb_auth_host.cpp:174] read_key_file '/home/henrique/.android/adbkey'...
adb I 09-28 01:13:58 30319 30319 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request
--- adb starting (pid 30324) ---
adb I 09-28 01:13:58 30324 30324 main.cpp:60] Android Debug Bridge version 1.0.41
adb I 09-28 01:13:58 30324 30324 main.cpp:60] Version 28.0.3-5475833
adb I 09-28 01:13:58 30324 30324 main.cpp:60] Installed as /home/henrique/Android/Sdk/platform-tools/adb
adb I 09-28 01:13:58 30324 30324 main.cpp:60]
* failed to start daemon
error: cannot connect to daemon
@tavareshenrique https://github.com/Genymobile/scrcpy/issues/527#issuecomment-517138314
You must use the same adb version everywhere.
@rom1v how I do this pls?
I've tried @elafefy11 's suggetion but when I choose the SDK folder (/usr/lib/android-sdk/), Genymotion says the folder doesn't contain any Android-SDK.
Any ideas? I'm also getting adb server version (40) doesn't match this client (39)
EDIT: SOLVED
All I did was to follow @elafefy11 suggestion and ignore the error msg Genymotion was showing.
In Genymotion, I went to Settings, ADB, checked "Use custom Android SDK Tools" and chose the path /usr/lib/android-sdk/platform-tools
Just close all the applications & restart your system. Sometimes by doing so the address in use previously becomes free. This worked for me.
I also encountered this issue because the Android SDK platform tools had a different version of adb
then scrcpy
.
$ scrcpy.adb version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5~18.04
Installed as /snap/scrcpy/174/usr/lib/android-sdk/platform-tools/adb
$ adb version
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
I added the environmental variable for ADB
and it resolved the issue.
~/.bashrc
export ADB=/home/sudhir/Documents/Android/android-sdk/platform-tools/adb
source ~/.bashrc
or logout/login and the error go away.
/home/uzairleo/Pictures/error.png
Help me. I try installing scrcpy on Deepin Linux when i run scrcpy it show
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
[100%] /data/local/tmp/scrcpy-server.jar
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalArgumentException: The server version (1.12.1) does not match the client (1.12)
at com.genymobile.scrcpy.Server.createOptions(Server.java:78)
at com.genymobile.scrcpy.Server.main(Server.java:162)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388)
Is there something I did wrong while installing it? i am using 1.12.1 prebuild server
i am using 1.12.1 prebuild server
But you're using v1.12 client.
Just git pull
.
I also encountered this issue because the Android SDK platform tools had a different version of
adb
thenscrcpy
.$ scrcpy.adb version Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5~18.04 Installed as /snap/scrcpy/174/usr/lib/android-sdk/platform-tools/adb $ adb version Android Debug Bridge version 1.0.41 Version 29.0.5-5949299
I added the environmental variable for
ADB
and it resolved the issue.~/.bashrc export ADB=/home/sudhir/Documents/Android/android-sdk/platform-tools/adb
source ~/.bashrc
or logout/login and the error go away.
Thanks a lot. This saves my hours.
It work for me 1) adb version Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5 Installed as /usr/lib/android-sdk/platform-tools/adb 2) adb kill-server 3) ps ax | grep adb 12290 ? S 0:00 /home/usuario/Android/Sdk/platform-tools/adb devices -l 12291 ? Ssl 0:00 adb -L tcp:5037 fork-server server --reply-fd 7 12332 pts/1 S+ 0:00 grep --color=auto adb 4) cd /home/usuario/Android/Sdk/platform-tools 5) mv adb adbxxx 6) ln -s /usr/lib/android-sdk/platform-tools/adb adb 7) Restart Android Studio
Hi, what worked for me.
My Android Studio has an adb file inside /home/myuser/Android/Sdk/platform-tools/ and with the version 1.0.41.
Note where I put myuser could be your name, whatever, just locate your Android path.
My error was: adb server version (41) doesn't match this client (39)
When you type just adb in terminal, this command will be related with the adb archive inside /usr/bin.
So, I did these steps inside terminal:
With this done, right now I have the same adb file to both of them, so, if in the future the SDK Manager ask to upgrade platform-tools, remember to do it again if the error back to appear.
It's ok. But is better to do simlink to the folder directly and then, when sdk upgrade is'nt to make changes.
Enviado desde Yahoo Mail para Android
El sáb., 11 de abr. de 2020 a la(s) 12:41, jonnimouranotifications@github.com escribió:
Hi, what worked for me.
My Android Studio has an adb file inside /home/myuser/Android/Sdk/platform-tools/ and with the version 1.0.41.
Note where I put myuser could be your name, whatever, just locate your Android path.
My error was: adb server version (41) doesn't match this client (39)
When you type just adb in terminal, this command will be related with the adb archive inside /usr/bin.
So, I did these steps inside terminal:
With this done, right now I have the same adb file to both of them, so, if in the future the SDK Manager ask to upgrade platform-tools, remember to do it again if the error back to appear.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, I am getting the same issue
adb server version (31) doesn't match this client (41); killing...
Android Debug Bridge version 1.0.31 I am using linux based system please help
I'm facing this error starting from today:
Hello. The solution for this issue is like this:
Hi, I am getting the same issue
adb server version (31) doesn't match this client (41); killing...
Android Debug Bridge version 1.0.31 I am using linux based system please help
For Ubuntu users, the problem may be because the Snap installation method has another version of ADB different from the custom one on your machine. I had the same problem.
I would suggest building the project yourself (its not that hard trust me) after removing the Snap version from your machine. It worked for me.
Even I am facing the same problem of scrcpy using the adb version 39 from /snap/scrcpy/221/usr/lib/android-sdk And my flutter is using adb version 41 from /home/rishabh/Android/Sdk/platform-tools The problem is I can't use both scrcpy and flutter at the same time, as starting one kills the other process
INFO: scrcpy 1.13 https://github.com/Genymobile/scrcpy adb server version (41) doesn't match this client (39); killing...
What i want is a way to let me work on both flutter and scrcpy togather. Thanks :)
When you encounter this problem, I suggest to use a non-snap version. For example, you could build the client: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#prebuilt-server
I second the non-snap installation suggestion. It worked for me previously.
On Linux with GNOME, is possible to edit the .desktop
file and set the ADB
environment variable in that. Example:
Exec=env ADB=$(which adb) guiscrcpy
Another option is use the Alacarte to do this. In this case the Exec
part can be omitted.
env ADB=$(which adb) guiscrcpy
I'd like to confirm, that the adb
bundled in snap (scrcpy.adb
) with scrcpy is the problem.
forcing to use system-wide adb
with ADB=$(which adb)
solves the issue.
I'd expect that proper implementation should prefer adb
available from PATH
if any, and otherwise fallback to bundled one
I'd expect that proper implementation should prefer adb available from PATH if any, and otherwise fallback to bundled one
That's what scrcpy does (it just calls adb
, so it ends up using the one in PATH).
The problem is that snap runs scrcpy in some "container", where the PATH is different.
So by setting ADB=$(which adb)
, you force a specific adb
path, calculated from the shell (without snap "containerization").
It makes sense.
Most probably, container grabs system wide variables, while my PATH
is extended for current user only (using ~/.profile
)
I'd expect that Linux/Mac devs install SDK using Android Studio and it's SDK Manager, which installs Platform Tools
for current user. So, they update PATH
for their own user.
Obviously snap
knows nothing about it.
Maybe this is worth mentioning in README
for installation using snap
?
Yes, this can be many useful because this error is recurrent. Even exists an opened issue about it.
I'm facing this error starting from today:
I attached the content of /var/folders/0q/jh77wwcx1cs989k89kv79mqr0000gn/T//adb.501.log adb.501.log