scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

adb server version (39) doesn't match this client (41); killing...

Open vishnureji opened this issue 3 years ago • 6 comments

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

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.

vishnureji avatar May 18 '22 07:05 vishnureji

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

rom1v avatar May 18 '22 07:05 rom1v

java.lang.NumberFormatException: For input string: "1.24"

Moreover, you're using an old scrcpy-server with a new client.

rom1v avatar May 18 '22 07:05 rom1v

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

└─$ 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

b-Istiak-s avatar Aug 03 '23 16:08 b-Istiak-s

Try a non snap version. Snap packages its own adb.

rom1v avatar Aug 03 '23 18:08 rom1v

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

raycekar avatar Apr 23 '24 12:04 raycekar