tmux-resurrect: Save failure corrupts resurrect storage

I’m constantly having

    '/Users/ain/.tmux/plugins/tmux-resurrect/scripts/save.sh' returned 1  

which ends up in 0-length txt file at .tmux/resurrect, every time.

I think the save script should safeguard the behaviour and not dump a file on failure.

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 22 (2 by maintainers)

Most upvoted comments

Well I get it as well. I have tried to run the script by hand doing ~/.tmux/plugins/tmux-resurrect/scripts/save.sh

and the error is connecting to /private/var/folders/d0/xbg08_x12lddw3dkht5w462c0000gn/T/tmux-501/default (No such file or directory)

I run into this today. The save.sh script failed with multiple error connecting to /tmp/tmux-1000/default (No such file or directory). Same output from tmux ls.

The socket file indeed was not there, I don’t know how or why it disappeared 😃

Is there at least a manual workaround for saving sessions when this happens?

SOLUTION

I solved the problem by running pkill -USR1 tmux. It recreated the socket file and then the save.sh script and other tmux commands worked as expected.

Sending the SIGUSR1 signal to regenerate the socket is documented in man tmux.

Yes, correct. I haven’t managed to save it if it’s corrupt already.

… which was my original question …

Ran into this problem too and unfortunately pkill -USR1 tmux did not create the required socket file and solve the problem.

Error message on my side is:

error connecting to /private/tmp/tmux-501/default (No such file or directory)

repeated a bunch of times probably due to retry.

Any news on this? I get this all the time and it drives me nuts.