marcowindt / ds4macos

DSU Server for (DualShock 4 / DualSense) controllers for MacOS. To be used with the Dolphin emulator.
MIT License
54 stars 6 forks source link

Crash On macOS Big Sur #8

Closed EvanCastle closed 1 year ago

EvanCastle commented 2 years ago
Received: Message Type: DATA
Incoming data request packet: 44535543e9030c006f8363fcbdd7694d020010000100000000000000
New client connection: 127.0.0.1:52189
Got an error sending controller data: POSIXErrorCode: Connection refused
Connection: πŸ›‘ cancelled
Got an error sending controller data: POSIXErrorCode: Connection refused
Connection: πŸ›‘ cancelled`

Xcode log shows that the app is connection refuse

Hope to know why and fix it soon

ageorgios commented 2 years ago

same on me, even when clicking on the window it gets connection refused. Maybe is a security MacOS thing?

If I restart Dolphin It shows client connected, but on config controller, no DSU Controller is showing, and when I click on the window of the ds4macos, I get Connection Refused

ageorgios commented 2 years ago

here is a screenrecording

https://user-images.githubusercontent.com/3126351/150586791-b3a62eb5-7273-4c26-b94c-18a5a7639deb.mov

marcowindt commented 2 years ago

Thanks for sharing, can you pull the latest changes and give it another try? This issue is actually related to #7

ageorgios commented 2 years ago

Unfortunately this is not the error, I am using the latest commit (with the background fix) and the behavior is the same

πŸ‘‚πŸΌπŸ‘‚πŸΌπŸ‘‚πŸΌ NWListener Handler called Listener: βœ… Ready and listens on port: 26760 Connect controller! Extended Gamepad: [Touchpad 1 Up (value: 0.000, pressed: 0), Touchpad 2 Right (value: 0.000, pressed: 0), Touchpad 1 Left (value: -0.000, pressed: 0), Button B (value: 0.000, pressed: 0), Right Thumbstick Right (value: 0.000, pressed: 0), Left Thumbstick Right (value: 0.000, pressed: 0), Button Home (value: 0.000, pressed: 0), Right Trigger (value: 0.000, pressed: 0), Touchpad 1 Right (value: 0.000, pressed: 0), Button Y (value: 0.000, pressed: 0), Touchpad 2 Left (value: -0.000, pressed: 0), Left Thumbstick Down (value: -0.000, pressed: 0), Touchpad 1 Down (value: -0.000, pressed: 0), Direction Pad Up (value: 0.000, pressed: 0), Direction Pad Left (value: -0.000, pressed: 0), Button A (value: 0.000, pressed: 0), Direction Pad Down (value: -0.000, pressed: 0), Left Trigger (value: 0.000, pressed: 0), Right Thumbstick Left (value: -0.000, pressed: 0), Direction Pad Right (value: 0.000, pressed: 0), Right Shoulder (value: 0.000, pressed: 0), Touchpad 2 Up (value: 0.000, pressed: 0), Touchpad 2 Down (value: -0.000, pressed: 0), Left Thumbstick Up (value: 0.000, pressed: 0), Right Thumbstick Down (value: -0.000, pressed: 0), Button Menu (value: 0.000, pressed: 0), Button Options (value: 0.000, pressed: 0), Touchpad Button (value: 0.000, pressed: 0), Left Shoulder (value: 0.000, pressed: 0), Right Thumbstick Button (value: 0.000, pressed: 0), Left Thumbstick Left (value: -0.000, pressed: 0), Button X (value: 0.000, pressed: 0), Right Thumbstick Up (value: 0.000, pressed: 0), Left Thumbstick Button (value: 0.000, pressed: 0)] Motion Sensor Enabled: true Update extended gamepad controller variables Connected: [vendor: DUALSHOCK 4 Wireless Controller, productCategory: DualShock 4] πŸ“žπŸ“žπŸ“ž NWConnection Handler called Connection: βœ… ready Received: Message Type: PORTS πŸ“žπŸ“žπŸ“ž NWConnection Handler called Connection: βœ… ready Received: Message Type: DATA Incoming data request packet: 44535543e9030c00358c072e33cce5b4020010000100000000000000 New client connection: 127.0.0.1:57156 πŸ“žπŸ“žπŸ“ž NWConnection Handler called Connection: βœ… ready Received: Message Type: DATA Incoming data request packet: 44535543e9030c00358c072e33cce5b4020010000100000000000000 New client connection: 127.0.0.1:61344 Got an error sending controller data: POSIXErrorCode: Connection refused Connection: πŸ›‘ cancelled Got an error sending controller data: POSIXErrorCode: Connection refused Connection: πŸ›‘ cancelled

adityajs12321 commented 2 years ago

Getting the same error here, the client disconnects when input from the gamepad is sent to the app. The DSU controller also does not show up in the config controller window even when ds4macos shows the client's connected.

marcowindt commented 2 years ago

I was wondering why I didn't have this issue. I was running version 5.0-13178 of Dolphin in which the connection works, after updating to the latest version I got the same connection errors. I'm still figuring out what changed in the newer versions.

marcowindt commented 2 years ago

Turns out that 5.0-14367 is the first version where it breaks, anything before that should work. Version 5.0-14367 contains improvements to the DSU client w.r.t. connection timeouts in Dolphin (see this PR) which ds4macos can't handle. I will have to further look into it to fix this and update the README for the time being.

marcowindt commented 1 year ago

Fixed in v0.2.3. πŸŽ‰