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

Session name length past 40 characters hangs #3213

Open
haberdashPI opened this issue Mar 21, 2024 · 3 comments
Open

Session name length past 40 characters hangs #3213

haberdashPI opened this issue Mar 21, 2024 · 3 comments

Comments

@haberdashPI
Copy link

haberdashPI commented Mar 21, 2024

If I create sessions names longer than 40 characters zellij hangs.

12:32pm ❯ zellij attach -c '123456790123456790123456790123456790'
Bye from Zellij! 
12:32pm ❯ zellij attach -c '1234567901234567901234567901234567901'
^C⏎

The first command properly opens zellij, while the latter hangs indefinitely

This occurs on MacOS 14.3.1 regardless of the terminal I'm using (VSCode or iTerm2).

@iFreilicht
Copy link

iFreilicht commented May 21, 2024

In my case, there is a different limit. It's just 19 characters. 20 character long session names cause the session to never start.

$ zellij attach --create 1234567890123456789
Bye from Zellij!
$ zellij attach --create 12345678901234567890
^C
$ zellij --version
zellij 0.40.1

I want to add that this behavior just appeared out of nowhere, I didn't update zellij, only restarted my mac. It was temporarily resolved by updating to 0.40.1, but only for a few minutes.
I also tried deleting ~/Library/Caches/org.Zellij-Contributors.Zellij and restarting once more, but that doesn't seem to have helped.

@iFreilicht
Copy link

I thought this might've had something to do with maximum path lengths, but no:

$ cd /Users/feuh/Library/Caches/org.Zellij-Contributors.Zellij/0.40.1/session_info
$ cp -r circular-oboe AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
$ tree
.
├── AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
│   ├── initial_contents_1
│   ├── session-layout.kdl
│   └── session-metadata.kdl
├── circular-oboe
│   ├── initial_contents_1
│   ├── session-layout.kdl
│   └── session-metadata.kdl
└── erudite-hill
    ├── initial_contents_1
    ├── session-layout.kdl
    └── session-metadata.kdl

5 directories, 12 files
$ zellij ls
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA [Created 1day 18h 38m 52s ago] (EXITED - attach to resurrect)
circular-oboe [Created 1day 18h 38m 52s ago] (EXITED - attach to resurrect)
erudite-hill [Created 1day 13m 10s ago] (EXITED - attach to resurrect)
$ 
$ zellij attach AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
^C
$ zellij attach circular-oboe
Session detached

Interestingly, the character limit seems to differ depending on the environment variables.

$ zellij a -c 12345679012345679012
Bye from Zellij!
$ direnv allow
direnv: loading ~/repos/Elli/.envrc                                                                                                                                                                                                                                                                                                                                       
direnv: using asdf
direnv: Creating env file /Users/feuh/.cache/asdf-direnv/env/2818442693-1703597551-1586414608-3007758193
direnv: loading ~/.cache/asdf-direnv/env/2818442693-1703597551-1586414608-3007758193
direnv: using asdf maven 3.8.6
direnv: loading ~/.asdf/plugins/maven/bin/exec-env
direnv: using asdf terraform 1.5.7
direnv: using asdf nodejs 18.18.2
direnv: using flake ./env-flake
waiting for lock on profile '/Users/feuh/repos/Elli/.direnv/flake-profile'
waiting for lock on profile '/Users/feuh/repos/Elli/.direnv/flake-profile'
direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +ELLI_NPM_TOKEN +HOST_PATH +IN_NIX_SHELL +LD +LD_DYLD_PATH +MACOSX_DEPLOYMENT_TARGET +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_aarch64_apple_darwin +NIX_BUILD_CORES +NIX_BUILD_TOP +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_aarch64_apple_darwin +NIX_CFLAGS_COMPILE +NIX_DONT_SET_RPATH +NIX_DONT_SET_RPATH_FOR_BUILD +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_IGNORE_LD_THROUGH_GCC +NIX_LDFLAGS +NIX_NO_SELF_RPATH +NIX_STORE +NM +PATH_LOCALE +RANLIB +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +TEMP +TEMPDIR +TMP +XDG_DATA_DIRS +ZERO_AR_DATE +__darwinAllowLocalNetworking +__impureHostDeps +__propagatedImpureHostDeps +__propagatedSandboxProfile +__sandboxProfile +__structuredAttrs +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~TMPDIR
$ zellij a -c 12345679012345679012
^C

Don't have more time to dig into this right now, but maybe that's a clue already?

@sommerper
Copy link

Have the same problem on MacOS. For me it's 36 characters. I have no idea what is defining that length.

It's not a problem on Linux.

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

3 participants