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

Crashing because folder github-copilot doesn't exist #17501

Closed
1 task done
Madscientiste opened this issue Sep 6, 2024 · 8 comments
Closed
1 task done

Crashing because folder github-copilot doesn't exist #17501

Madscientiste opened this issue Sep 6, 2024 · 8 comments
Labels
bug [core label] crash [core label] inline completion Umbrella label for Copilot, Supermaven, etc. completions open source Open source community projects, contributions, etc windows

Comments

@Madscientiste
Copy link

Madscientiste commented Sep 6, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Just barely cloned the repo i haven't done anything particular, here is what i've done:

  • clone zed on my WSL
  • run the scripts/linux
  • run cargo run

Environment

Attribute Details
OS Ubuntu 22.04.4 LTS on Windows 10
Kernel 5.15.153.1-microsoft-standard-WSL2
Uptime 5 hours, 33 mins
Packages 1316 (dpkg), 8 (snap)
Shell zsh 5.8.1
Theme Adwaita [GTK3]
Icons Adwaita [GTK3]
Terminal vscode
CPU Intel Ultra 7 155H (22) @ 2.995GHz
GPU 8a9b:00:00.0 Microsoft Corporation Device 008a
Memory 8807MiB / 15707MiB
Disk (/) 152G / 1007G (16%)
Font Cantarell 11 [GTK3]

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

[2024-09-06T15:42:54+02:00 ERROR fs] No such file or directory (os error 2) about ["/home/username/.config/github-copilot"]

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
             at /home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.86/src/backtrace.rs:27:14
   1: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/result.rs:1989:27
   2: <fs::RealWatcher as fs::Watcher>::add
             at ./crates/fs/src/fs.rs:660:12
   3: <fs::RealFs as fs::Fs>::watch::{{closure}}
             at ./crates/fs/src/fs.rs:538:13
   4: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/future/future.rs:123:9
   5: settings::settings_file::watch_config_file::{{closure}}
             at ./crates/settings/src/settings_file.rs:42:75
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/future/future.rs:123:9
   7: async_task::raw::RawTask<F,T,S,M>::run
             at /home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/raw.rs:557:17
   8: async_task::runnable::Runnable<M>::run
             at /home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/runnable.rs:781:18
   9: gpui::platform::linux::dispatcher::LinuxDispatcher::new::{{closure}}::{{closure}}
             at ./crates/gpui/src/platform/linux/dispatcher.rs:44:25
  10: std::sys::backtrace::__rust_begin_short_backtrace
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:152:18
  11: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/thread/mod.rs:538:17
  12: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panic/unwind_safe.rs:272:9
  13: std::panicking::try::do_call
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:557:40
  14: __rust_try
  15: std::panicking::try
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:521:19
  16: std::panic::catch_unwind
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panic.rs:350:14
  17: std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/thread/mod.rs:537:30
  18: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/ops/function.rs:250:5
  19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/alloc/src/boxed.rs:2070:9
  20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/alloc/src/boxed.rs:2070:9
  21: std::sys::pal::unix::thread::Thread::new::thread_start
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/pal/unix/thread.rs:108:17
  22: <unknown>
  23: <unknown>
@Madscientiste Madscientiste added admin read bug [core label] crash [core label] labels Sep 6, 2024
@Madscientiste
Copy link
Author

Madscientiste commented Sep 6, 2024

I have found the issue and fixed it, basically creating the folder if missing;
should i open a PR ?

@notpeter
Copy link
Member

notpeter commented Sep 6, 2024

Happy to review PRs.

@notpeter notpeter added windows inline completion Umbrella label for Copilot, Supermaven, etc. completions open source Open source community projects, contributions, etc and removed triage labels Sep 6, 2024
@Madscientiste
Copy link
Author

Madscientiste commented Sep 6, 2024

@maxdeviant
Copy link
Member

@Madscientiste Could you include the commit SHA that you saw this on?

@maxdeviant
Copy link
Member

In the Linux file watcher implementation we already ignore errors when adding the file to the watcher:

zed/crates/fs/src/fs.rs

Lines 588 to 593 in 2d06d5c

watcher.add(path).ok(); // Ignore "file doesn't exist error" and rely on parent watcher.
// watch the parent dir so we can tell when settings.json is created
if let Some(parent) = path.parent() {
watcher.add(parent).log_err();
}

We do log the error here, though, which would put it in the logs (and with RUST_BACKTRACE=1 it would include the backtrace in the log).

@Madscientiste Are you sure that this error is the one responsible for the crash?

@Madscientiste
Copy link
Author

I'll do another test once i get home, but yes the log you are seeing in the issue is the logs produced when is RUST_BACKTRACE set

There is something else going on i think.

I forgot to mention this, I'm using a X11 server and not WSLg

@Madscientiste
Copy link
Author

Madscientiste commented Sep 7, 2024

Okay, so i've been trying to understand what happened and why this made crash.

Firstly zed didn't crash, turns out it was WSLg/X11 just doing weird things; the error itself was harmless just i thought it was the issue on why it wasn't starting.

Then on why fixing the creation of the folder fixed my issue, well it didn't since it was a WSL thing all along ... Basically i didn't pay enough attention as i modified a env variable inside a session, and ran zed on another session which made it look like it was doing nothing ...

I have to pay more attention on what i'm doing to avoid wasting time like this.

Sorry guys !


Question:

  • Shouldn't errors like that be warning instead of plain "errors" to avoid confusing them in the future ?

@notpeter
Copy link
Member

I'm closing because I think you've sorted your issue, if not please comment with more details and we can reopen.

For anyone who finds this issue because the see the copilot error in their logs, the issue for tracking that is here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] crash [core label] inline completion Umbrella label for Copilot, Supermaven, etc. completions open source Open source community projects, contributions, etc windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants