FrogTheFrog / moondeck-buddy

A server-side part of the MoonDeck plugin for the SteamDeck.
GNU Lesser General Public License v3.0
151 stars 9 forks source link

MoonDeck Buddy Status Exception unable to Pair. Possible issue with SSL and Certs? #70

Closed tkiethanom closed 9 months ago

tkiethanom commented 9 months ago

First off thanks for creating this neat tool! I'm running into an Exception on the Steam Deck side so I'm unable to pair. Running version 1.6.12, Here is the error from the /tmp/moondeck.log.

2023-12-02 23:44:05,765 INFO -> find_host(args=(<class '_.Plugin'>,), kwargs={'host_id': '4EE058BE-62B6-AD2C-441F-B00397DE7C3F', 'timeout': 1})
2023-12-02 23:44:05,809 INFO <- find_host(...): {'address': '192.168.86.56', 'port': 47989, 'hostName': 'Tawin-PC', 'mac': 'f0:2f:74:86:d5:da', 'uniqueId': '4EE058BE-62B6-AD2C-441F-B00397DE7C3F'}
2023-12-02 23:44:05,811 INFO -> get_buddy_status(args=(<class '_.Plugin'>,), kwargs={'address': '192.168.86.56', 'buddy_port': 59999, 'client_id': '6b8192f1-b644-4f02-bcce-f8d2c7d9e95e', 'timeout': 1})
2023-12-02 23:44:05,813 ERROR Unhandled exception
Traceback (most recent call last):
  File "/home/deck/homebrew/plugins/moondeck/main.py", line 82, in get_buddy_status
    async with BuddyClient(address, buddy_port, client_id, timeout) as client:
  File "/home/deck/homebrew/plugins/moondeck/python/lib/buddyclient.py", line 80, in __aenter__
    self.__requests = await BuddyRequests(self.address, self.port, self.client_id, self.timeout).__aenter__()
  File "/home/deck/homebrew/plugins/moondeck/python/lib/buddyrequests.py", line 78, in __aenter__
    ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=cafile)
  File "ssl.py", line 766, in create_default_context
FileNotFoundError: [Errno 2] No such file or directory
2023-12-02 23:44:05,813 INFO <- get_buddy_status(...): Exception

Am I missing something with the cert? Any ideas?

I'm able to hit the server that is running on the PC from the Steam Deck and getting the expected in Firefox:

192.168.86.56:59999 uses an invalid security certificate.

The certificate is not trusted because it is self-signed.

Error code: MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT

I've already done a hard reset on my Steam Deck to make sure any other configurations were cleared out.

FrogTheFrog commented 9 months ago

Heyo. That's strange :/. Can you check what files do you have in ~/homebrew/plugins/moondeck/python/ssl/ ?

tkiethanom commented 9 months ago

Oh that folder is empty...

FrogTheFrog commented 9 months ago

That is very strange, I've just installed it via decky and it was there :?. Can you try to reinstall the plugin again?

FrogTheFrog commented 9 months ago

Otherwise if it still does not work for some reason, you can just copy these files into it https://github.com/FrogTheFrog/moondeck-keys and then just restart the SteamDeck

tkiethanom commented 9 months ago

Ok I feel like a noob. I didn't realize I could just install MoonDeck through the Decky UI in Steam Mode.

I had originally followed the build steps from the Readme... I guess people who use Decky would already know that. Good news is that it's working! Thanks so much!

  • Clone this repo to the ~/homebrew/plugins.
  • Install pnpm via npm npm install --global pnpm.
  • Run pnpm install in the cloned repo directory.
  • Build using pnpm run build-dev for local build.