moonlight-android icon indicating copy to clipboard operation
moonlight-android copied to clipboard

Moonlight returns Handshake fail on android 5

Open masakk1 opened this issue 2 years ago • 6 comments

Describe the bug

Hello, I got an android 5.0.2 tablet.

Issue

I installed Moonlight, and it was able to see my pc "fedora-pc". When I try to pair one another, once I input the PIN on the host, the client will just return "handshake error".

Disclaimer

For reference, I got Moonlight working on my Android 13 phone (Redmi Note 10 Pro) with no issues, even over internet instead of LAN. I even got my WiiU to work with this moonlight/sunshine setup.

My guess and problem with this

I am very confused. If it were because I was using an old version of, then it makes sense. But I'm using the latest and greatest. I could even get it from the play store....

Steps to reproduce

  1. Install Moonlight (APK from GitHub, or from the Google Play Store)
  2. Computer shows up
  3. Send request to pair
  4. On host PC, add PIN
  5. Moonlight immediately returns error "Handshake Fail"
  6. Sometimes after a couple of seconds another error shows up "Unexpected end of steam on Connection { many numbers }"
  7. Pull your hair for days

Affected games

I don't know.

Other Moonlight clients

None

Moonlight adjusted settings

No

Moonlight adjusted settings (please complete the following information)

None

Moonlight default settings

Yes

Gamepad-related connection issue

Yes

Gamepad-related input issue

Yes

Gamepad-related streaming issue

Yes

Android version

Android 5.0.2 Lollipop

Device model

Samsung Galaxy Tab 4 (10.1 inch version)

Server PC OS version

Windows 11, Fedora Linux 39 with GNOME

Server PC GeForce Experience version

Sunshine v21

Server PC Nvidia GPU driver version

545.29.06 for Linux, don't know about windows

Server PC antivirus and firewall software

built-in Windows' protection, same for Fedora Linux

Screenshots

No response

Relevant log output

Client (Moonlight):
- Handshake error
- unexpected end of stream on Connection{host.ip.x.x:47989, proxy=DIRECT@hostAddress=/host.ip.x.x:47989 cipherSuite=none protocol=http/1.1}

Host (Linux, Sunshine):
No logs when trying to connect or disconnect

Additional context

The issue persist when using both Windows and Linux as hosts. Those hosts work with other moonlight clients.

Also on the section "other moonlight clients" why isn't there an option that says "None"?

masakk1 avatar Dec 31 '23 11:12 masakk1

I suspect it is related to TLS cipher negotiation. Your Fedora system probably requires ciphers that are newer than what Android 5 has. You can try adjusting your settings in /etc/crypto-policies/back-ends/opensslcnf.config to loosen the restrictions until you can successfully connect.

cgutman avatar Jan 01 '24 03:01 cgutman

Thanks for you time @cgutman , I am a little confused on how I can loosen the restrictions for the ciphers. I was able to adjust settings, but I'm unsure what setting and what value to put exactly.

On the file I can see there is a variable called "TLS.MinProtocol", I tried lowering the version to TLSv1.1 instead of v1.1, but I really don't know what I should put in here. Also, is it possible to only loosen the restriction for sunshine? I wouldn't want to be exposed.

Also, the same "Handshake Failed" error persist on Windows, do you know of a way to fix it for that OS? It will be my main gaming system.

masakk1 avatar Jan 01 '24 11:01 masakk1

Have the same with a p900 from samsung with android 5.0.2 trying to pair with win 11 pc pls help

lukee12zakk avatar Apr 01 '24 09:04 lukee12zakk

Same problem here, latest version of moonlight and sunshine, Android 5.1.1 on Samsung Tab A4

MopheusDG avatar Jul 14 '24 01:07 MopheusDG