Malformed XML error when trying to connect after a previous session
Is there an existing issue for this?
- [ ] I have searched the existing issues
Is your issue described in the documentation?
- [ ] I have read the documentation
Is your issue present in the latest beta/pre-release?
None
Describe the Bug
I get some "Malformed XML" error when trying to connect to Sunshine using the Moonlight client. This only happens after connect again after a previous session. i.e. it does not happen off a fresh restart but only intermittently after a previous session.
The only way to fix this issue is to restart Sunshine. Any ideas?
I can provide more logs the next time it happens but it has happened many times to me already. Happens on the latest beta version as well as the normal version.
Expected Behavior
No response
Additional Context
No response
Host Operating System
Docker
Operating System Version
Windows 11 (Build 26100.4349
Architecture
amd64/x86_64
Sunshine commit or version
v2025.122.141614
Package
Windows - installer (recommended)
GPU Type
NVIDIA
GPU Model
5090
GPU Driver/Mesa Version
576.80
Capture Method
Windows.Graphics.Capture (Windows)
Config
encoder = nvenc
nvenc_realtime_hags = disabled
output_name = {9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}
sunshine_name = Sunshine
Apps
Relevant log output
Will provide this later.
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
This is still an issue for me but I have worked around it by restarting Sunshine after a disconnect in my scripts that workaround the issue.
You never provided logs
Couldn't find anything logged relating to the error.
You can increase the logging level to get more output.
I'm hitting this too. This message is coming from here: https://github.com/moonlight-stream/moonlight-qt/blob/f67272b15312fb30ae4d5f5dfb71843ee5610518/app/backend/nvhttp.cpp#L364
So this means the server is sending an xml string that does not contain the element <root>. Putting a breakpoint there, I indeed see a string like this, confirmed in the log:
00:00:15 - Qt Info: Launch response: "
<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
So the code in Sunshine producing the response must be doing something bad.