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

Standalone server : java.lang.IllegalArgumentException: The server version (v2.2) does not match the client (2.2) #4433

Closed
2 tasks done
Utopiah opened this issue Nov 17, 2023 · 5 comments

Comments

@Utopiah
Copy link

Utopiah commented Nov 17, 2023

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

Environment

  • OS: Ubuntu 23.04
  • scrcpy version: 2.2 from master
  • installation method: manual build
  • device model: Quest 3
  • Android version: 12

Describe the bug
Tried to follow https://github.com/Genymobile/scrcpy/blob/master/doc/develop.md#standalone-server in order to try with VLC but blocked by

[server] ERROR: The server version (v2.2) does not match the client (2.2)
java.lang.IllegalArgumentException: The server version (v2.2) does not match the client (2.2)
        at com.genymobile.scrcpy.Options.parse(Options.java:237)
        at com.genymobile.scrcpy.Server.internalMain(Server.java:207)
        at com.genymobile.scrcpy.Server.main(Server.java:190)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
@rom1v
Copy link
Collaborator

rom1v commented Nov 17, 2023

Replace v2.2 by 2.2 in your command line.

@Utopiah
Copy link
Author

Utopiah commented Nov 17, 2023

There is no "v" in my command line, cf

fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/scrcpy$ adb shell CLASSPATH=/data/local/tmp/scrcpy-server-manual.jar     app_process / com.genymobile.scrcpy.Server 2.2     tunnel_forward=true audio=false control=false cleanup=false     raw_stream=true max_size=1920
[server] ERROR: The server version (v2.2) does not match the client (2.2)
java.lang.IllegalArgumentException: The server version (v2.2) does not match the client (2.2)
        at com.genymobile.scrcpy.Options.parse(Options.java:237)
        at com.genymobile.scrcpy.Server.internalMain(Server.java:207)
        at com.genymobile.scrcpy.Server.main(Server.java:190)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

adding it though fixed it, so I guess the doc should reflect that?

Example :

fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/scrcpy$ adb shell CLASSPATH=/data/local/tmp/scrcpy-server-manual.jar     app_process / com.genymobile.scrcpy.Server v2.2     tunnel_forward=true audio=false control=false cleanup=false     raw_stream=true max_size=1920
[server] INFO: Device: [Oculus] oculus Quest 3 (Android 12)

even though I admit I'm confused with the client/server version check in the first place as here, AFAIK, we are "just" starting the server, not the client.

@rom1v
Copy link
Collaborator

rom1v commented Nov 17, 2023

Oh, I wrongly passed v2.2 instead of 2.2 as parameter of bump_version: c3c7bf7

This will be fixed when I will bump the numbers for the next release. Sorry for the inconvenience.

even though I admit I'm confused with the client/server version check in the first place as here, AFAIK, we are "just" starting the server, not the client.

The version defines the protocol between the client and the server. This avoids someone incorrectly running different versions to get random errors. The server is intended to run with the client, although as a best effort it can be run standalone.

@Utopiah
Copy link
Author

Utopiah commented Nov 18, 2023

No worries, thanks for the clarification.

IMHO because it does work with other clients, e.g VLC, then this should be a non blocking warning rather than an error.

rom1v added a commit that referenced this issue Nov 25, 2023
The previous version bump to 2.2 was incorrect, it was updated by:

    ./bump_version v2.2

instead of:

    ./bump_version 2.2

Correctly bump to version 2.3.

Refs #4433 <#4433 (comment)>
@rom1v
Copy link
Collaborator

rom1v commented Nov 25, 2023

Fixed in 2.3 :)

@rom1v rom1v closed this as completed Nov 25, 2023
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

2 participants