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

Tab crashes when opening in a missing CWD #7581

Open
2 tasks done
Artemis21 opened this issue Nov 9, 2023 · 1 comment
Open
2 tasks done

Tab crashes when opening in a missing CWD #7581

Artemis21 opened this issue Nov 9, 2023 · 1 comment

Comments

@Artemis21
Copy link

  • I am on the latest Hyper.app version

  • I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Fedora 38

  • Hyper.app version: 3.4.1

  • Link of a Gist with the contents of your hyper.json: hyper config gist

  • Relevant information from devtools: N/A

  • The issue is reproducible in vanilla Hyper.app: No change after disabling all extensions. Presumably config with preserveCWD: true would not be affected by the same steps.

Issue

Steps:

  1. Launch hyper
  2. Have preserveCWD: true in config
  3. mkdir test
  4. cd test
  5. rm -r ../test
  6. Open a new tab

Observed:
Error messages scrolling by very quickly, followed by the tab closing.

Expected:
A new tab to open in the closest existing ancestor of the missing directory, or other reasonable fall-back behaviour.

Notes:

  • This happens with both fish and sh shells.
  • A screenshot showing part of the error message seen. Most or all of the errors appear to be the same as this, though it goes too fast for me to be sure (also, it closes too fast for me to copy the text, so please excuse the screenshot). the image just described
  • Running the hyper command from a missing directory also fails:
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    node:internal/bootstrap/switches/does_own_process_state:126
        cachedCwd = rawMethods.cwd();
                             ^
    
    Error: ENOENT: no such file or directory, uv_cwd
        at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28)
        at t.find (/opt/Hyper/resources/bin/cli.js:2:152432)
        at e.exports (/opt/Hyper/resources/bin/cli.js:2:151343)
        at i (/opt/Hyper/resources/bin/cli.js:2:150626)
        at Module.<anonymous> (/opt/Hyper/resources/bin/cli.js:2:148380)
        at r (/opt/Hyper/resources/bin/cli.js:2:614310)
        at /opt/Hyper/resources/bin/cli.js:2:614977
        at /opt/Hyper/resources/bin/cli.js:2:618469
        at Object.<anonymous> (/opt/Hyper/resources/bin/cli.js:2:618473)
        at Module._compile (node:internal/modules/cjs/loader:1120:14) {
      errno: -2,
      code: 'ENOENT',
      syscall: 'uv_cwd'
    }
    
  • The same issue is not observed in gnome terminal.
@Artemis21
Copy link
Author

A check for this case seems to have been added in this commit, not sure why that's not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant