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

SyncPlay client crashing when prepending arguments #616

Closed
ducreyna opened this issue Jun 28, 2023 · 2 comments
Closed

SyncPlay client crashing when prepending arguments #616

ducreyna opened this issue Jun 28, 2023 · 2 comments

Comments

@ducreyna
Copy link

Describe the bug
As described in your documentation about how to use SyncPlay in cli, I added arguments that supposed to be passed to mpv.
But I get a crash of the SyncPlay client on almost all my mpv arguments

To Reproduce
Here the SyncPlay cli command I'm executing:

syncplay --host 172.16.50.125:8999 --name test-A -r SFHQYUNIES --no-gui --player-path /usr/bin/mpv input.mp4 -- --hwdec=vaapi --volume=0 --geometry=1920x1080+0+0 --no-border

If I remove the argument --no-border then the client started as expected. When I added it it's crashing, same behavior with the argument --no-window-dragging etc

Expected behavior
Any argument should be passed to mpv.

Screenshots
Here is the crash log I get:

MPV failed with returncode 1.
MPV start failed.
Traceback (most recent call last):
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 460, in _start_mpv
    self.mpv_process = MPVProcess(ipc_socket, mpv_location, **kwargs)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 216, in __init__
    self._start_process(ipc_socket, args, env=env)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 237, in _start_process
    raise MPVError("MPV not started.")
syncplay.vendor.python_mpv_jsonipc.python_mpv_jsonipc.MPVError: MPV not started.
MPV failed with returncode 1.
MPV start failed.
Traceback (most recent call last):
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 460, in _start_mpv
    self.mpv_process = MPVProcess(ipc_socket, mpv_location, **kwargs)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 216, in __init__
    self._start_process(ipc_socket, args, env=env)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 237, in _start_process
    raise MPVError("MPV not started.")
syncplay.vendor.python_mpv_jsonipc.python_mpv_jsonipc.MPVError: MPV not started.
MPV failed with returncode 1.
MPV start failed.
Traceback (most recent call last):
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 460, in _start_mpv
    self.mpv_process = MPVProcess(ipc_socket, mpv_location, **kwargs)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 216, in __init__
    self._start_process(ipc_socket, args, env=env)
  File "/usr/lib/syncplay/syncplay/vendor/python_mpv_jsonipc/python_mpv_jsonipc.py", line 237, in _start_process
    raise MPVError("MPV not started.")
syncplay.vendor.python_mpv_jsonipc.python_mpv_jsonipc.MPVError: MPV not started.
ERROR:	Could not load mpv: '__Listener' object has no attribute 'mpvpipe'
ERROR:	Media player error: "MPV process retry limit reached." The reason mpv cannot start may be due to the use of unsupported command line arguments or an unsupported version of mpv.
ERROR:	<class 'twisted.python.failure.Failure'>
ERROR:	[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]
ERROR:	Connection was closed cleanly.

Version and platform:

  • OS: Ubuntu 20.04
  • Syncplay version and build type: 1.7.0
  • Media player and version: mpv 0.32.0

Thanks for your feedback and advise !

@Et0h
Copy link
Contributor

Et0h commented Jun 28, 2023

I checked and it looks like you need to change --no-border to --border=no and --no-window-dragging to --window-dragging=no as a temporary workaround before I resolve the issue more solidly.

This is because if you do an --x command (with 'x' being a given argument name) without an = sign then Syncplay turns this into --x=yes because there was problems with launching mpv when the value was unset and I didn't realise that --x was only sometimes equivalent to --x=yes.

However, I just did some testing and it seems like if I make Syncplay set the value of the argument to a blank string ("") when people use an argument without an equals sign then Syncplay/mpv will support your original command line argument string and launch without error.

@ducreyna
Copy link
Author

Hello Et0h,

Thanks a lot for your answer and detailed explanations.

And yes now it's working as expected 👍

Have a good day !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants