Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Uses Linux Discord IPC Paths on MacOS arm64 #260

Open
npxtune opened this issue Nov 5, 2024 · 0 comments
Open

[BUG] Uses Linux Discord IPC Paths on MacOS arm64 #260

npxtune opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@npxtune
Copy link

npxtune commented Nov 5, 2024

Describe the bug
The Platform returns Unix 15.1.0, which seems to confuse the library and start trying to connect with the linux discord ipc paths. This should not be the case.

To Reproduce
Steps to reproduce the behavior:

  1. Install DiscordRichPresence in your C# App on an arm64 Mac
  2. Initialize the DiscordRPC client
  3. Start your project
  4. See error

Expected behavior
It should try to connect via the correct macOS IPC paths

Desktop:

  • OS: [macOS Sequoia 15.1 arm64]
  • Framework: [dotnet8.0.403]
  • Library Version: [1.2.1.24]

Logs:

Click to reveal
/Users/tim/Documents/RiderProjects/Cadenza/bin/Debug/net8.0/Cadenza
INFO: Attempting a new connection
TRACE: Enqueue Command: DiscordRPC.RPC.Commands.PresenceCommand
INFO: RPC Connection Started
TRACE: ============================
TRACE: Assembly:             DiscordRPC, Version=1.2.1.24, Culture=neutral, PublicKeyToken=null
TRACE: Pipe:                 DiscordRPC.IO.ManagedNamedPipeClient
TRACE: Platform:             Unix 15.1.0
TRACE: applicationID:       // Not gonna find it here :)
TRACE: targetPipe:           -1
TRACE: POLL_RATE:            1000
TRACE: _maxRtQueueSize:      512
TRACE: _maxRxQueueSize:      0
TRACE: ============================
TRACE: Connecting to the pipe through the DiscordRPC.IO.ManagedNamedPipeClient
TRACE: ManagedNamedPipeClient.Connection(-1)
TRACE: Connection Attempt 0 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-0'
ERR : Failed connection to /run/user/501/discord-ipc-0. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 0 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-0'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-0. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 1 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-1'
ERR : Failed connection to /run/user/501/discord-ipc-1. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 1 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-1'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-1. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 2 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-2'
ERR : Failed connection to /run/user/501/discord-ipc-2. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 2 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-2'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-2. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 3 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-3'
ERR : Failed connection to /run/user/501/discord-ipc-3. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 3 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-3'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-3. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 4 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-4'
ERR : Failed connection to /run/user/501/discord-ipc-4. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 4 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-4'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-4. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 5 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-5'
ERR : Failed connection to /run/user/501/discord-ipc-5. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 5 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-5'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-5. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 6 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-6'
ERR : Failed connection to /run/user/501/discord-ipc-6. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 6 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-6'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-6. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 7 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-7'
ERR : Failed connection to /run/user/501/discord-ipc-7. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 7 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-7'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-7. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 8 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-8'
ERR : Failed connection to /run/user/501/discord-ipc-8. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 8 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-8'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-8. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 9 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-9'
ERR : Failed connection to /run/user/501/discord-ipc-9. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 9 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-9'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-9. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
ERR : Failed to connect for some reason.
TRACE: Enqueued Message, but queue size is 0.
TRACE: Waiting 1095ms before attempting to connect again
TRACE: Setting the connection state to DISCONNECTED
TRACE: Connecting to the pipe through the DiscordRPC.IO.ManagedNamedPipeClient
TRACE: ManagedNamedPipeClient.Connection(-1)
TRACE: Connection Attempt 0 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-0'
ERR : Failed connection to /run/user/501/discord-ipc-0. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 0 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-0'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-0. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 1 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-1'
ERR : Failed connection to /run/user/501/discord-ipc-1. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 1 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-1'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-1. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 2 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-2'
ERR : Failed connection to /run/user/501/discord-ipc-2. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 2 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-2'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-2. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 3 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-3'
ERR : Failed connection to /run/user/501/discord-ipc-3. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 3 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-3'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-3. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 4 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-4'
ERR : Failed connection to /run/user/501/discord-ipc-4. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 4 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-4'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-4. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 5 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-5'
ERR : Failed connection to /run/user/501/discord-ipc-5. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 5 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-5'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-5. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 6 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-6'
ERR : Failed connection to /run/user/501/discord-ipc-6. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 6 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-6'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-6. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 7 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-7'
ERR : Failed connection to /run/user/501/discord-ipc-7. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 7 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-7'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-7. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 8 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-8'
ERR : Failed connection to /run/user/501/discord-ipc-8. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 8 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-8'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-8. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 9 ()
INFO: Attempting to connect to '/run/user/501/discord-ipc-9'
ERR : Failed connection to /run/user/501/discord-ipc-9. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
TRACE: Connection Attempt 9 (snap.discord/)
INFO: Attempting to connect to '/run/user/501/snap.discord/discord-ipc-9'
ERR : Failed connection to /run/user/501/snap.discord/discord-ipc-9. The operation has timed out.
WARN: Tried to close a already closed pipe.
TRACE: Done. Result: True
ERR : Failed to connect for some reason.
TRACE: Enqueued Message, but queue size is 0.
TRACE: Waiting 2285ms before attempting to connect again
TRACE: Setting the connection state to DISCONNECTED
TRACE: Connecting to the pipe through the DiscordRPC.IO.ManagedNamedPipeClient
TRACE: ManagedNamedPipeClient.Connection(-1)
TRACE: Done. Result: True
ERR : Failed to connect for some reason.

[This goes on for quite some time, but I had to cut it short for GitHub...]

TRACE: Enqueued Message, but queue size is 0.
TRACE: Waiting 23705ms before attempting to connect again
TRACE: Setting the connection state to DISCONNECTED
Dispose called from MainWindow!
TRACE: Initiated shutdown procedure

Process finished with exit code 0.
@npxtune npxtune added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant