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

Compare server and client version at the start of scrcpy #920

Closed
wants to merge 1 commit into from

Conversation

npes87184
Copy link
Contributor

@npes87184 npes87184 commented Nov 9, 2019

We found that some people wrong use older server with newer client. For example, #613
To prevent this problem and let debug more easily. I add a patch to check this situation at the start of scrcpy.

It will show a warning when it finds version not matched.

@rom1v
Copy link
Collaborator

rom1v commented Nov 9, 2019

If the client and server versions are different, the server may crash earlier on argument parsing ("expected n arguments"), so retrieving the version on the socket is too late.

A possible solution is that the client sends its version as the first parameter when executing app_process, and the server checks it.

Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
@npes87184
Copy link
Contributor Author

npes87184 commented Nov 10, 2019

Thank you for your suggestion, I create a commit at another branch in my repo, what about it?

@rom1v
Copy link
Collaborator

rom1v commented Nov 10, 2019

I create a commit at another branch in my repo, what about it?

Yes, looks good 👍

@rom1v
Copy link
Collaborator

rom1v commented Nov 11, 2019

Here is your commit with some minor changes: f24d488
OK to merge?

@npes87184
Copy link
Contributor Author

npes87184 commented Nov 11, 2019

Here is your commit with some minor changes: f24d488
OK to merge?

The message looks a bit confusion about the role of server and client.

"The server version (" + clientVersion + ") does not match the client "
                    + "(" + BuildConfig.VERSION_NAME + ")"

Thank you for your help.

@Genymobile Genymobile deleted a comment from aoy1 Nov 12, 2019
@Genymobile Genymobile deleted a comment from aoy1 Nov 12, 2019
rom1v added a commit that referenced this pull request Nov 13, 2019
Compare server and client version at the start of scrcpy
@rom1v
Copy link
Collaborator

rom1v commented Nov 13, 2019

Merged as b963a3b.

@rom1v rom1v closed this Nov 13, 2019
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

Successfully merging this pull request may close these issues.

2 participants