zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.03k stars 2.7k forks source link

fallback file open picker: tilde `~` path resolution fails (crash) #16227

Open DevLord261 opened 1 month ago

DevLord261 commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When i try to open folder it gives me the popup with the "~/" shotrcut for home but when i open the folder it opens it as file instead of folder plus if i close it the whole app crash.

to work around it i must delete the ~ and use /home/username/folder in orrder to work

Environment

arch linux linux-zen 6.10.3 zen1-2-zen intel core i7-4500u using intel gpu intel hd graphics 4400

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log

2024-08-14T18:21:51.679337953+03:00 [INFO] ========== starting zed ==========
2024-08-14T18:21:51.791437926+03:00 [INFO] perform;
2024-08-14T18:21:51.792492742+03:00 [INFO] read_command;
2024-08-14T18:21:51.795032436+03:00 [INFO] read_command;
2024-08-14T18:21:51.799040772+03:00 [INFO] socket reader;
2024-08-14T18:21:51.800968368+03:00 [INFO] new;
2024-08-14T18:21:51.804431894+03:00 [INFO] keep_updated;
2024-08-14T18:21:51.913741741+03:00 [INFO] Opening main db
2024-08-14T18:21:51.97849233+03:00 [INFO] Using git binary path: None
2024-08-14T18:21:51.984571697+03:00 [INFO] updating SHELL environment variable to value from passwd entry: "/usr/bin/bash"
2024-08-14T18:21:52.330274379+03:00 [INFO] extensions updated. loading 8, reloading 0, unloading 0
2024-08-14T18:21:52.336794004+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.336859746+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.336901735+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.428332264+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.476206918+03:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-08-14T18:21:52.476350489+03:00 [INFO] Opening main db
2024-08-14T18:21:52.510894609+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.511085249+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.511174213+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.51121971+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.511267994+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.514756886+03:00 [INFO] perform;
2024-08-14T18:21:52.514806505+03:00 [INFO] read_command;
2024-08-14T18:21:52.51485363+03:00 [INFO] read_command;
2024-08-14T18:21:52.514973766+03:00 [INFO] socket reader;
2024-08-14T18:21:52.672655047+03:00 [INFO] Enabling Vulkan Portability
2024-08-14T18:21:52.672710038+03:00 [INFO] Enabling color space support
2024-08-14T18:21:52.737107472+03:00 [INFO] Adapter "Intel(R) HD Graphics 4400 (HSW GT2)"
2024-08-14T18:21:52.737166678+03:00 [INFO] No ray tracing extensions are supported
2024-08-14T18:21:52.740959388+03:00 [INFO] Using surface present mode MAILBOX
2024-08-14T18:21:52.741646979+03:00 [WARN] Unable to forbid exclusive full screen
2024-08-14T18:21:52.742376171+03:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-14T18:21:52.742440163+03:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-14T18:21:52.742491889+03:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-08-14T18:21:52.812657855+03:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "Intel(R) HD Graphics 4400 (HSW GT2)", driver_name: "Intel open-source Mesa driver", driver_info: "Mesa 24.1.5-arch1.2" }
2024-08-14T18:21:52.824248463+03:00 [INFO] Using surface present mode MAILBOX
2024-08-14T18:21:52.824841967+03:00 [WARN] Unable to forbid exclusive full screen
2024-08-14T18:21:52.82509649+03:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-08-14T18:21:52.892420804+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.892523215+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.892578507+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.89265119+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.895809106+03:00 [INFO] Using surface present mode MAILBOX
2024-08-14T18:21:52.896357469+03:00 [WARN] Unable to forbid exclusive full screen
2024-08-14T18:21:52.900868976+03:00 [INFO] Opening main db
2024-08-14T18:21:52.903891326+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.91836342+03:00 [INFO] Opening main db
2024-08-14T18:21:52.944262496+03:00 [INFO] Initializing default prettier with plugins {}
2024-08-14T18:21:52.956845904+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.957773927+03:00 [INFO] perform;
2024-08-14T18:21:52.957858778+03:00 [INFO] read_command;
2024-08-14T18:21:52.957969169+03:00 [INFO] perform;
2024-08-14T18:21:52.958023462+03:00 [INFO] read_command;
2024-08-14T18:21:52.958360156+03:00 [INFO] read_command;
2024-08-14T18:21:52.958686104+03:00 [INFO] socket reader;
2024-08-14T18:21:52.959351223+03:00 [INFO] Node runtime install_if_needed
2024-08-14T18:21:52.971207623+03:00 [INFO] Initializing default prettier with plugins {}
2024-08-14T18:21:52.973016237+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:52.97316346+03:00 [INFO] perform;
2024-08-14T18:21:52.973259201+03:00 [INFO] read_command;
2024-08-14T18:21:52.973459592+03:00 [INFO] read_command;
2024-08-14T18:21:52.974006946+03:00 [INFO] socket reader;
2024-08-14T18:21:52.998011741+03:00 [ERROR] no worktrees when constructing ProjectLspAdapterDelegate
2024-08-14T18:21:53.015069887+03:00 [INFO] Initializing default prettier with plugins {}
2024-08-14T18:21:53.016361897+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:53.016997241+03:00 [INFO] perform;
2024-08-14T18:21:53.017062993+03:00 [INFO] read_command;
2024-08-14T18:21:53.01712852+03:00 [INFO] read_command;
2024-08-14T18:21:53.017272903+03:00 [INFO] socket reader;
2024-08-14T18:21:54.005907785+03:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching latest npm versions: fetching latest npm version for package prettier: failed to execute npm info subcommand:
stdout: "{\n  \"error\": {\n    \"code\": \"MODULE_NOT_FOUND\",\n    \"summary\": \"Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \\\"main\\\" entry\",\n    \"detail\": \"\"\n  }\n}\n"
stderr: "npm error code MODULE_NOT_FOUND\nnpm error path /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json\nnpm error Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \"main\" entry\nnpm error A complete log of this run can be found in: /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/cache/_logs/2024-08-14T15_21_53_835Z-debug-0.log\n"
2024-08-14T18:21:54.006647066+03:00 [INFO] Node runtime install_if_needed
2024-08-14T18:21:54.410558859+03:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching latest npm versions: fetching latest npm version for package prettier: failed to execute npm info subcommand:
stdout: "{\n  \"error\": {\n    \"code\": \"MODULE_NOT_FOUND\",\n    \"summary\": \"Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \\\"main\\\" entry\",\n    \"detail\": \"\"\n  }\n}\n"
stderr: "npm error code MODULE_NOT_FOUND\nnpm error path /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json\nnpm error Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \"main\" entry\nnpm error A complete log of this run can be found in: /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/cache/_logs/2024-08-14T15_21_54_311Z-debug-0.log\n"
2024-08-14T18:21:54.410677464+03:00 [INFO] Node runtime install_if_needed
2024-08-14T18:21:54.626736312+03:00 [INFO] Initializing default prettier with plugins {}
2024-08-14T18:21:54.628251999+03:00 [WARN] request completed with error: failed to connect to the server
2024-08-14T18:21:54.629203746+03:00 [INFO] perform;
2024-08-14T18:21:54.629292875+03:00 [INFO] read_command;
2024-08-14T18:21:54.62935853+03:00 [INFO] read_command;
2024-08-14T18:21:54.629511061+03:00 [INFO] socket reader;
2024-08-14T18:21:54.791510098+03:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching latest npm versions: fetching latest npm version for package prettier: failed to execute npm info subcommand:
stdout: "{\n  \"error\": {\n    \"code\": \"MODULE_NOT_FOUND\",\n    \"summary\": \"Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \\\"main\\\" entry\",\n    \"detail\": \"\"\n  }\n}\n"
stderr: "npm error code MODULE_NOT_FOUND\nnpm error path /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json\nnpm error Cannot find module '/home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/lib/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js'. Please verify that the package.json has a valid \"main\" entry\nnpm error A complete log of this run can be found in: /home/Ghost/.local/share/zed/node/node-v22.5.1-linux-x64/cache/_logs/2024-08-14T15_21_54_673Z-debug-0.log\n"
2024-08-14T18:21:54.791619501+03:00 [INFO] Node runtime install_if_needed
2024-08-14T18:21:56.693737086+03:00 [INFO] new;
2024-08-14T18:21:56.695999772+03:00 [INFO] keep_updated;
2024-08-14T18:21:56.696229447+03:00 [INFO] new;
2024-08-14T18:22:02.501535008+03:00 [INFO] open paths ["~/WebstormProjects/chatter"]
2024-08-14T18:22:02.506085042+03:00 [ERROR] No such file or directory (os error 2) about ["/home/Ghost/~/WebstormProjects"]
2024-08-14T18:22:02.528829811+03:00 [ERROR] failed to canonicalize root path: No such file or directory (os error 2)
2024-08-14T18:22:02.533546933+03:00 [ERROR] ()
2024-08-14T18:22:07.148572543+03:00 [ERROR] {
  "thread": "main",
  "payload": "called `Result::unwrap()` on an `Err` value: ()",
  "location_data": {
    "file": "crates/project/src/project.rs",
    "line": 2160
  },
  "backtrace": [
    "__libc_start_main"
  ],
  "app_version": "0.147.2",
  "release_channel": "Zed",
  "os_name": "Linux Wayland",
  "os_version": "arch unknown",
  "architecture": "x86_64",
  "panicked_on": 1723648927148,
  "installation_id": "00588c57-9460-4261-8892-da1a66c0e093",
  "session_id": "65a97be3-f174-4568-b626-3a6f8309cf21"
}            
notpeter commented 1 week ago

Can you confirm which version of Zed you have installed? I am able to reproduce in Zed Stable (0.151.1) and it appears to be fixed in Zed Preview (v0.152.0).

I'll see if I can narrow down what fixed it and push a hotfix to stable. https://github.com/zed-industries/zed/compare/v0.151.1...v0.152.x

DevLord261 commented 1 week ago

@notpeter i installed the lastest stable version 151.1 which i started to get the problem i tried fresh installing still got error i tried the peview version also have the same problem i will try it again to confirm it

EDIT: Yes it also appears in the preview version