stweil / OSXvnc

VNC Server for macOS
GNU General Public License v3.0
208 stars 69 forks source link

OSXvnc-server shuts down with ‘Received Result: -9876 during event loop, Shutting Down’ error #59

Open egigoka opened 6 months ago

egigoka commented 6 months ago

Issue Summary

OSXvnc-server shuts down unexpectedly with “Received Result: -9876 during event loop, Shutting Down.”

Steps to Reproduce

1.  Start the VNC server with the command: `OSXvnc-server -rfbauth ~/.vnc/.pass -rfbport 5900 -loglevel debug -nobonjour`
2. Observe the server log until it shuts down with the error: `2024-05-23 23:41:09.856 OSXvnc-server[95400:1751548] Received Result: -9876 during event loop, Shutting Down`

Expected Behavior

The VNC server should remain running and accept client connections without shutting down.

Actual Behavior

The server starts and waits for clients, but shuts down unexpectedly with the error “Received Result: -9876 during event loop, Shutting Down.”

Logs OSXvnc-server -rfbauth ~/.vnc/.pass -rfbport 5900 -loglevel debug -nobonjour 2024-05-23 23:41:05.682 OSXvnc-server[95400:1751548] Arguments: -rfbauth /Users/egigoka/.vnc/.pass -rfbport 5900 -loglevel debug -nobonjour 2024-05-23 23:41:05.743 OSXvnc-server[95400:1751548] Detected HiDPI Display with scaling factor of 2.000000 2024-05-23 23:41:05.836 OSXvnc-server[95400:1751548] Running in Little Endian 2024-05-23 23:41:05.837 OSXvnc-server[95400:1751548] Waiting for clients 2024-05-23 23:41:05.837 OSXvnc-server[95400:1751570] Registering Bonjour Service(_rfb._tcp.) - FuckingM1.local 2024-05-23 23:41:05.838 OSXvnc-server[95400:1751572] Started listener thread on IPv6 port 5900 2024-05-23 23:41:05.839 OSXvnc-server[95400:1751570] Using Private Event Source 2024-05-23 23:41:05.840 OSXvnc-server[95400:1751570] Using Smart Event Tap -- HID for console user 2024-05-23 23:41:05.840 OSXvnc-server[95400:1751570] Started listener thread on IPv4 port 5900 2024-05-23 23:41:09.851 OSXvnc-server[95400:1751916] Protocol version 3.8 2024-05-23 23:41:09.856 OSXvnc-server[95400:1751548] Received Result: -9876 during event loop, Shutting Down 2024-05-23 23:41:09.856 OSXvnc-server[95400:1751548] Disabling Bonjour Service - FuckingM1.local 2024-05-23 23:41:09.856 OSXvnc-server[95400:1751548] Removing Observers 2024-05-23 23:41:09.856 OSXvnc-server[95400:1751548] RFB shutdown complete

Additional Information

•   macOS version: 14.5
•   OSXvnc-server version: vine-server: 5.3.2 https://github.com/stweil/OSXvnc/ as reported by Homebrew
•   Hardware: M1 MacBook Air 2020

Troubleshooting Steps Taken

1.  Checked for port conflicts using lsof -i :5900.
2.  Verified firewall settings to ensure the VNC server is allowed.
3.  Checked system logs for additional error messages.
4.  Disabled Bonjour service with -nobonjour.
5.  Reinstalled vine-server using Homebrew.
6.  Tried running the VNC server as root.
7.  Tried running Vine Server.app, set password, clicked Start Server, second icon of Vine Server constantly opening and closing, server crashed when I've tried to connect

None of these steps resolved the issue.

Report generated using assistance from ChatGPT due to me being not native English speaker.

stweil commented 6 months ago

Did you try to connect a client? If yes: which one?

egigoka commented 6 months ago

Did you try to connect a client? If yes: which one?

Yes, server is running waiting for clients until I try to connect to it. I've tried only RealVNC. I'll try anothers, thanks!

egigoka commented 6 months ago

Same error on:

macOS:

iOS:

Windows:

Some clients show password prompt, but server is already down

Any option to send more logs from server?

It's the same 14 lines in output to terminal.

stweil commented 6 months ago

-9876 is eventLoopQuitErr, so RunCurrentEventLoop() returned that result code.

But I have no idea how I can reproduce this issue.