moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.35k stars 603 forks source link

Cant close connection sometimes, error 503 #1279

Open makedir opened 4 months ago

makedir commented 4 months ago

It happens often, that you cant close streams in Moonlight getting error 503 "all sessions must be disconnected before quitting".

There are no other connections, using just one client. Waiting also doesnt help.

  1. open connection
  2. put to sleep with ctrl alt shit q
  3. click the stop button in moonlight
  4. doesnt work

image

Client Windows 11 Moonlight windows 5.0.1, Windows 11 Sunshine latest stable.

This doesnt happen every single time but really often, not proper way to reproduce. Only way to fix is to restart Sunshine on host.

cgutman commented 4 months ago

Have you adjusted the Ping Timeout value on the Network tab of Sunshine from the default value of 10000?

Does the error still persist if you fully exit Moonlight, wait 10 seconds, then open Moonlight and try to connect again?

makedir commented 4 months ago

@cgutman Nope. Nothing changed. The issue happens all the time now and is super annoying. It happens randomly. Just happened again.

Started host via WOL. Wanted to connect with Moonlight 5.01, get error in Moonlight claiming I should check my firewall port, then doing another connect claiming another error, got the above error. Then it is bugged out and cant close the stream anymore in Moonlight. Waiting doesnt fix this.

image

makedir commented 4 months ago

And again just happened with Moonlight 6.0.0

image

cgutman commented 3 months ago

Screenshots of the error dialog aren't enough for detailed troubleshooting. Please attach the logs from both Moonlight (located in the Temp folder) and Sunshine (configured for Debug-level verbosity) after experiencing the issue.

makedir commented 3 months ago

Issue still not fixed in 6.0.1

image

Please put a button into Moonlight to open the folder where the log is, it is annoying to google where it is.

There is zero information in the Moonlight log for this.

  1. connect issue often with firewall / port message
  2. closing with ctrl alt shit q in Moonlight causing Sunshine to bug out and it wont close connection
misaka00251 commented 2 months ago

I'm having the same issue, Using latest moonlight & sunshine version.

makedir commented 2 months ago

Of course. This issue exists since ages.

dcuellar commented 2 months ago

Same here. It's weird. I have other applications and the issue doesn't happen with those. Actually, it does happen when I exit using the hotkey combination. If I exit the app (let's say BigBox) then the stream ends normally. Since the desktop isn't executing an app the only way to quit it would be if I use the hotkey combination.

Hope that makes sense.

dcuellar commented 2 months ago

Ok. For those of you who are experiencing this issue... quick question for ya.

Are you using Sunshine or GFE?

Sunshine: Did you by chance change the image to the desktop application in sunshine? I found that if you changed the path to a different image, in other words... have anything other than "desktop.png" in this field then this error occurs. I reverted to "desktop.png" and it started to work no problem. The solution to getting a different image would be to replace the existing file with another and be sure to name it "desktop.png".

GFE: In Gameforce the desktop app has to have an application path to the mstsc.exe file. Usually found in C:\Windows\System32\mstsc.exe. I'm not using GFE but this is what I read around as a solution to this issue for those folks.

Let me know how it goes.

makedir commented 2 months ago

Sunshine of course. What you mean with desktop application and image? No I did not change any images, but I changed settings to desktop so it would execute things, maybe that also causes the issue. Sunshine also randomly seems to still be running and the pause icon is in the systray even I closed the connection in Moonlight.

dcuellar commented 2 months ago

When I looked at the documentation for sunshine it says that in order to create a desktop application you have to fill in two things. Name it “Desktop” and put “desktop.png” for the image. It doesn’t specifically say you HAVE to leave all other cells blank but it does say to leave them blank.

Try removing it all except those two fields. See if that works.

You could also try adding a command to a program and then just minimize it until you are ready to exit. Some people mentioned using cmd as the program.

makedir commented 2 months ago

Again. I have not changed anything on that matter or added any applications, as you see on the above screenshots, it is the default Desktop with no image at all.

dcuellar commented 2 months ago

What did you mean by… “but I changed settings to desktop so it would execute things, maybe that also causes the issue.”

My response was because I thought you meant that you added something else to this application on another field.

If you didn’t…and all you have are the Name and image fields filled in then I do not know what else to recommend other than what I recommended about using an app in the command field like cmd.

dcuellar commented 2 months ago

Also, let me make this clear in case it isn’t already evident. I’m not responsible for any of these apps. I am just a random person who had the same issue and is trying to help because I was able to solve it on my end.

I hope you figure it out.