adb server version (39) doesn't match this client (41); killing...
Environment
- OS: Ubuntu
- scrcpy version: 1.24
- installation method: manual build
- device model: Samsung S10
- Android version: 12
Describe the bug A clear and concise description of what the bug is.
On errors, please provide the output of the console (and adb logcat if relevant).
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
/usr/local/share/scrcpy/scrcpy-server:...ed. 152.9 MB/s (19038 bytes in 0.000s)
ERROR: Exception on thread Thread[main,5,main]
java.lang.NumberFormatException: For input string: "1.24"
at java.lang.Integer.parseInt(Integer.java:615)
at java.lang.Integer.parseInt(Integer.java:650)
at com.genymobile.scrcpy.Server.createOptions(Server.java:49)
at com.genymobile.scrcpy.Server.main(Server.java:69)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:374)
ERROR: Server connection failed
Please do not post screenshots of your terminal, just post the content as text instead.
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#conflicts-between-adb-versions
java.lang.NumberFormatException: For input string: "1.24"
Moreover, you're using an old scrcpy-server with a new client.
THIS WILL REALLY HELP YOU (almost 90% of the time this might be the problem)
-
Download the latest version of ADB from the official Android developer website:
[https://developer.android.com/studio/releases/platform-tools]
-
Extract the contents of the ADB ZIP file to a directory on your system, such as ~/Tools.
-
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/` -
Reload the .bashrc file by running the following command:
. ~/.bashrc -
Try running
scrcpyagain and see if the error message goes away.
└─$ adb devices adb server version (39) doesn't match this client (41); killing...
- daemon started successfully List of devices attached 8399405c device
┌──(istiak㉿Istiak)-[~] └─$ /snap/bin/scrcpy -s 8399405c scrcpy 1.25 https://github.com/Genymobile/scrcpy adb server version (41) doesn't match this client (39); killing...
- daemon started successfully ERROR: Could not find any ADB device ERROR: Server connection failed
┌──(istiak㉿Istiak)-[~]
└─$ /snap/bin/scrcpy
scrcpy 1.25 https://github.com/Genymobile/scrcpy
ERROR: Could not find any ADB device
ERROR: Server connection failed
Try a non snap version. Snap packages its own adb.
Had same issue. This is what i did to get it to work as the snap package itself has it's own adb version (from what i believe)
snap run scrcpy.adb connect x.x.x.x where x.x.x.x is the ip of interest
snap run scrcpy.adb devices to ensure i am connected
snap run scrcpy.scrcpy to connect