kljohann / mpv.el

control mpv for easy note taking
GNU General Public License v3.0
142 stars 14 forks source link

make client process failed: No such file or directory #4

Closed mihaiolteanu closed 3 years ago

mihaiolteanu commented 4 years ago

I think there is something not quite right on these lines in mpv-start

(while (and (mpv-live-p) (not (file-exists-p socket)))
    (sleep-for 0.05))

Sometimes I do manage to get past this line (tested with edebug also), but still the make-network-process call fails with

tq-create: make client process failed: No such file or directory, 
:name, mpv-socket, :family, local, :service, /tmp/mpv-2R9ztY

From what I've seen, I get this error when there is already an mpv instance running and I'm trying to run another one. I've tried to remove the mpv-live-p check from the while loop, but then I end up in an endless loop. Again, this only happens when I'm trying to run another instance of mpv while another one is still running.

kljohann commented 3 years ago

Thanks for opening the issue and explaining how to reproduce it. Unfortunately only a single mpv instance at a time is supported at the moment, which is why mpv-play attempts to kill any the previous instance. As I do not have time for a deeper investigation, I added a short delay between killing the previous instance and starting a new one, which seems to have fixed the issue.