-
Notifications
You must be signed in to change notification settings - Fork 435
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
C-r Restore Exiting #122
Comments
Hm.. this is pretty weird. Which tmux version are you running? Is it like the "absolute latest built from source" or something? |
It's the homebrew version of tmux, which, to my understanding, isn't on the be bleeding edge. Since tmux hasn't updated, might it be interference with zsh, which has had a few updates recently? |
Hmm, no, I changed my shell to bash and the problem persists. |
Thought I might add my 2 cents. I had exactly the same issue for a few months (thinking maybe an update to tmux from brew or an update to this tmux-resurrect plugin would eventually fix the issue) When I had the following flag: Eventually traced through the shell script for restoration (https://github.com/tmux-plugins/tmux-resurrect/blob/master/scripts/restore.sh) and traced it to the function Turns out I had the following in my .tmux.conf file : Notice the double Seems to work now although some of the custom window names seem to go back to default |
EDIT: I fixed this issue. It had to do with a path issue which was caused when mounting a directory into the docker container. My homedir was a subdirectory of a symlink, so in my main system there were two valid paths to ~ (and in particular, to the files that resurrect used to recreate my session). When I mounted my homedir into the docker container, the path that resurrect used became invalid, so my various panes couldn't be restored. Bumping this issue to say that I'm encountering similar behavior, on tmux 2.1. Another interesting behavior is that I only get a crash if I attempt to restore in a new session- I imagine this has to do with the new session special case ("The single exception to this is when tmux is started with only 1 pane in order to restore previous tmux env. Only in this case will this single pane be overwritten. "). If I try to restore from an existing session, I'll get the restore message in the status bar but my tmux session will remain the same (no changes). This behavior seems pretty similar to #91, and also a bit like #98, but the fixes for these haven't worked for me (in particular, no default command to break things). Example restore file that this behavior occurs on:
Output of
My .tmux.conf (messy):
|
I saw this today for the first time after years of using tmux / tmux-resurrect without issues. I'm running 3.0a from the Ubuntu 20.04 official apt package running inside of WSL 2. I'm not 100% sure on this but I think this happens if the symlink to You can check / fix this by:
I don't know how the most recent version of a resurrect restore file ended up being 0 bytes but the above let me restore from a fairly recent save and it no longer immediately exit out with |
Having the same issue right now, still don't understand what the big problem is :(. I'm running tmux 3.5_a-1 with the following config: unbind r
bind r source-file ~/.tmux.conf
set -g prefix `
set -g mouse on
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key C-s command-prompt -p "Session name:,Root directory:" "new-session -s '%1' -c '$HOME/%2'"
source-file ~/.cache/wal/colors-tmux.conf
set-option -g update-environment "DISPLAY WAYLAND_DISPLAY XDG_RUNTIME_DIR"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'niksingh710/minimal-tmux-status'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Setting powerline options
set -g @minimal-tmux-bg color2
set -g @minimal-tmux-justify "centre"
set -g @minimal-tmux-indicator-str " tmux "
set -g @minimal-tmux-indicator true
set -g @minimal-tmux-status "top"
set -g @minimal-tmux-use-arrow true
set -g @minimal-tmux-right-arrow ""
set -g @minimal-tmux-left-arrow ""
# Setting tmux-resurrectk/tmux-continuum options
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
set -g @resurrect-processes 'lazygit'
set -g @resurrect-capture-pane-contents 'off'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '0'
set -g @continuum-save 'off'
set -g @continuum-boot 'on'
# SessionX settings
set -g @sessionx-bind 'o'
set -g @sessionx-fzf-builtin-tmux 'on'
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' EDIT: Ok something else I noticed, is that the empty file is being created when I do EDIT 2 [27/11/2024]: Alright I can now confirm that tmux-continuum is not the issue, even after i deleted the plugin and removed all options with respect to the plugin i still get empty files on doing |
Is there some valid situation where |
I can't think of one off hand. Having it work its way back to the latest non-zero byte file seems like a reasonable default. If that's too aggressive of a change due to unknown side effects, having it print the location of the zero byte file with a 1 or 2 line description on how to resolve it would be helpful for folks new to tmux who encounter this. |
And for some of us who are not so new to |
It looks like when I reboot under alias tat='([ -s ~/.tmux/resurrect/last ] || (find ~/.tmux/resurrect/ -size 0 -print -delete && ln -sf $(ls -t ~/.tmux/resurrect/tmux_resurrect_* | head -1) ~/.tmux/resurrect/last)) && tmux attach'
so now I just launch with that and it will take care of loading the last good file it has. It's ugly but seems to work! |
Tmux was working fine until a few weeks ago when I suddenly started getting exiting (not errors) when using C-r to try and restore. C-s still works, writes to the symlink
last
and everything seems to be okay, but when I try to resurrect even the simplest setup:I just end up outside tmux looking at:
And the session has been killed (i.e. exited out) and I have no other error or warning information.
The text was updated successfully, but these errors were encountered: