-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
Long session name hangs zellij #2591
Comments
Nice find! This is the error in the logs:
The fix for this should be validating |
I would like to contribute to this issue |
Go for it :) |
Hi! I was trying to reproduce the issue and the maximum length of session name that worked for me (no hang) was 78 characters. (need help here) fn validate_session_length(name: &str) -> Result<String,String> {
if name.len() > 78 { // or whatever length that works
Err(format!("Session name must be less than 78 bytes"))
} else {
return Ok(name.to_owned())
}
} at Do you know if this is the correct way to do this? Did I miss anything? Sorry for asking too many questions. |
@deepsghimire - what I can say is that we want the user to get a proper error in the CLI, with coloring, the correct exit status and everything. The rest is up to you as the implementer. I think the session name limit is platform specific (for me the number was 108) - so do look into that, we might need to be a little smarter about this. Thanks for looking into this! |
In my case, the issue presents itself when the session length is at least 38 characters |
It looks like this error is outdated as master has a comment on the line the error quotes. How can I get zellij to produce similar logs for me? I do not get this even when running zellij with the |
@super-secret-github-user I used |
It seems this is not really fixed; on my ARM mac with zellij 0.39.2, running zellij -s 1234567890123456789012345678901234567 yields
The problem seems to be that the length of directory path of the socket is not properly taken into account. Since this path is based on the default temp directory, it tends to be much longer on macos machines than on linux machines. In my case: > echo -n $TMPDIR/zellij-501/0.39.2/ | wc -c
68 Which leaves 104 - 68 = 36 characters as the maximal length for the session name. This nicely fits with my minimal error case, where the session name is 37 characters long. By the way - the error triggered when I use a session name with 50 characters also does not seem to be quite right:
"session name must be less than 0 characters" is somewhat hard to comply to... |
Same here, on Mac with ARM the issue is still present and is very annoying 😬 |
zellij --session reallyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
works.zellij --session reallyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
is hanging the program.The latter one is 37 characters long
The text was updated successfully, but these errors were encountered: