iwalton3 / plex-mpv-shim

Cast media from Plex Mobile and Web apps to MPV. (Unofficial)
MIT License
368 stars 21 forks source link

Unable to bind port for GDM [macos] #45

Closed leftl closed 1 year ago

leftl commented 3 years ago

OS: macos 11.5.2 Python: 3.9.6 and 3.8.11 plex-mpv-shim: 1.10.1

First run works fine, however, when exiting the following error occurs and the socket for GDM is not closed:

[...]
2021-08-25 11:24:54,845 [    INFO] root: Stopping services...
2021-08-25 11:24:54,846 [   ERROR] mpv-jsonipc: Socket connection died.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/python_mpv_jsonipc.py", line 168, in run
    current_data = self.socket.recv(1024)
OSError: [Errno 9] Bad file descriptor
2021-08-25 11:24:54,847 [    INFO] client: Stopping HTTP server.

For whatever reason, the OS is unable clean-up even though associated PID is not valid. All attempts to run the shim after the first run fail with the following error:

[...]
2021-08-25 11:32:07,405 [   DEBUG] mpv-jsonipc: Staring MPV from mpv.
2021-08-25 11:32:07,405 [   DEBUG] mpv-jsonipc: Using IPC socket /tmp/mpv95676054654988 for MPV.
2021-08-25 11:32:07,511 [   DEBUG] mpv-jsonipc: Found MPV socket.
2021-08-25 11:32:07,537 [    INFO] root: Started GDM service
2021-08-25 11:32:07,537 [    INFO] client: Started HTTP server
PlexGDM: Error: Unable to bind to port [32412] - client will not be registered
ohnggni commented 3 years ago

Same here. Only the first run was okay.

dannymichel commented 5 months ago

Did you figure this out?