jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
10.19k stars 293 forks source link

mise crashes after removing automatically installed `vfox` plugins. #3110

Closed halms closed 1 day ago

halms commented 1 day ago

Describe the bug First: I think this is related to #3102 and #3098, possibly also #3064.

mise was crashing on basically every call with this message:

The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: src/plugins/vfox_plugin.rs:229

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

To Reproduce Somehow, mise automatically installed the vfox plugins for python and node, overriding the core plugins.

Then, it was regularly trying to remove some vfox:python versions when pruning while those were still used by some configurations.

I then manually uninstalled the vfox plugins, versions of tools that appeared to be vfox based and cleared the cache. After that, mise started to crash on nearly every call. Some calls partially succeeded, but the above error message appeared all the time.

I've since deleted the cache folder and ~/.local/state/mise and ~/.local/share/mise and reinstalled my tools. This made the error disappear.

Expected behavior

mise doctor output The following output might not fully represent the state mise was in when the crashes occured.

```text version: 2024.11.20 macos-arm64 (2024-11-21) activated: yes shims_on_path: yes build_info: Target: aarch64-apple-darwin Features: DEFAULT, NATIVE_TLS Built: Thu, 21 Nov 2024 02:22:44 +0000 Rust Version: rustc 1.82.0 (f6e511eec 2024-10-15) (Homebrew) Profile: release shell: /bin/zsh zsh 5.9 (arm64-apple-darwin24.0) dirs: cache: ~/Library/Caches/mise config: ~/.config/mise data: ~/.local/share/mise shims: ~/.local/share/mise/shims state: ~/.local/state/mise config_files: ~/.config/mise/config.toml ~/kdev/supply-demand/.mise.local.toml backends: aqua asdf cargo core go npm pipx spm ubi vfox plugins: toolset: core:bun@1.1.36 core:go@1.23.3 core:node@20.18.1 core:python@3.11.10 env_vars: MISE_SHELL=zsh settings: activate_aggressive = false all_compile = false always_keep_download = false always_keep_install = false asdf_compat = false cache_prune_age = "30d" ci = false color = true debug = false disable_backends = [] disable_default_registry = false disable_hints = [] disable_tools = [] experimental = true fetch_remote_versions_cache = "1h" fetch_remote_versions_timeout = "10s" go_default_packages_file = "~/.default-go-packages" go_download_mirror = "https://dl.google.com/go" go_repo = "https://github.com/golang/go" go_set_gopath = false go_set_goroot = true go_skip_checksum = false http_timeout = "30s" jobs = 4 legacy_version_file = true legacy_version_file_disable_tools = [] libgit2 = true lockfile = false log_level = "info" not_found_auto_install = true paranoid = false pin = false pipx_uvx = true plugin_autoupdate_last_check_duration = "7d" quiet = false raw = false task_timings = false trace = false trusted_config_paths = [] unix_default_file_shell_args = ["sh"] unix_default_inline_shell_args = [ "sh", "-c", ] use_file_shell_for_executable_tasks = false use_versions_host = true verbose = false windows_default_file_shell_args = [ "cmd", "/c", ] windows_default_inline_shell_args = [ "cmd", "/c", ] windows_executable_extensions = [ "exe", "bat", "cmd", "com", "ps1", "vbs", ] yes = false [cargo] binstall = true [node] [npm] bun = false [pipx] uvx = true [python] default_packages_file = "~/.default-python-packages" pyenv_repo = "https://github.com/pyenv/pyenv.git" venv_auto_create = false venv_stdlib = false [ruby] default_packages_file = "~/.default-gems" ruby_build_repo = "https://github.com/rbenv/ruby-build.git" ruby_install = false ruby_install_repo = "https://github.com/postmodern/ruby-install.git" [status] missing_tools = "if_other_versions_installed" show_env = false show_tools = false No warnings found 1 problem found: 1. shims are on PATH and mise is also activated. You should only use one of these methods. ```