rust-analyzer: Cannot activate rust-analyzer: bootstrap error

I started seeing this today and haven’t seen it before. It might be related to #5009? but I’m not certain.

Windows 10 20H2 vscode v1.46.1

Rustup v1.22.1 Cargo/Rustc v1.44.1

Toolchains:

  • stable-x86_64-pc-windows-msvc (default)
  • nightly-x86_64-pc-windows-msvc

Components:

  • cargo-x86_64-pc-windows-msvc
  • clippy-x86_64-pc-windows-msvc
  • rls-x86_64-pc-windows-msvc
  • rust-analysis-x86_64-pc-windows-msvc
  • rust-docs-x86_64-pc-windows-msvc
  • rust-src
  • rust-std-x86_64-pc-windows-msvc
  • rustc-x86_64-pc-windows-msvc
  • rustfmt-x86_64-pc-windows-msvc

Options:

{
  "rust-analyzer.trace.extension": true,
  "rust-analyzer.cargo.loadOutDirsFromCheck": true,
  "rust-analyzer.updates.askBeforeDownload": false,
  "rust-analyzer.updates.channel": "nightly"
}

Error:

INFO [7/8/2020, 7:28:33 PM]: Extension version: 0.3.234-nightly
INFO [7/8/2020, 7:28:33 PM]: Using configuration {
  diagnostics: { enable: true, warningsAsInfo: [], warningsAsHint: [] },
  lruCapacity: null,
  files: { watcher: 'client', exclude: [] },
  notifications: { cargoTomlNotFound: true },
  cargo: {
    noDefaultFeatures: false,
    allFeatures: false,
    features: [],
    loadOutDirsFromCheck: true,
    target: null
  },
  rustfmt: { extraArgs: [], overrideCommand: null },
  checkOnSave: {
    enable: true,
    extraArgs: [],
    command: 'check',
    overrideCommand: null,
    allTargets: true,
    allFeatures: null,
    features: null
  },
  cargoRunner: null,
  runnableEnv: null,
  inlayHints: {
    enable: true,
    typeHints: true,
    chainingHints: true,
    parameterHints: true,
    maxLength: 20
  },
  completion: {
    addCallParenthesis: true,
    addCallArgumentSnippets: true,
    postfix: { enable: true }
  },
  callInfo: { full: true },
  updates: { channel: 'nightly', askBeforeDownload: false },
  serverPath: null,
  trace: { server: 'off', extension: true },
  procMacro: { enable: false },
  debug: {
    engine: 'auto',
    sourceFileMap: {
      '/rustc/<id>': '${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust'
    },
    openDebugPane: false,
    engineSettings: {}
  },
  lens: { enable: true, run: true, debug: true, implementations: true },
  hoverActions: {
    enable: true,
    implementations: true,
    run: true,
    debug: true,
    gotoTypeDef: true
  },
  linkedProjects: null,
  withSysroot: true
}
INFO [7/8/2020, 7:28:33 PM]: PersistentState: {
  lastCheck: 1594250307755,
  releaseId: 28336980,
  serverVersion: '0.3.208-nightly'
}
DEBUG [7/8/2020, 7:28:33 PM]: Issuing request for released artifacts metadata to https://api.github.com/repos/rust-analyzer/rust-analyzer/releases/tags/nightly
ERROR [7/8/2020, 7:28:33 PM]: Bootstrap error [TypeError: node_fetch_1.default is not a function
	at Object.fetchRelease (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:15902:48)
	at getServer (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:16235:31)
	at async bootstrapServer (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:16145:18)
	at async bootstrap (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:16095:18)
	at async tryActivate (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:16022:24)
	at async activate (c:\Users\mburs\.vscode\extensions\matklad.rust-analyzer-0.3.234-nightly\out\src\main.js:15996:5)
	at async Promise.all (index 0)]

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Same issue. WSL Debian. Rust stable, rustc 1.64. Only one toolchain. It works when launching Vscode in Windows. I can’t figure out where rust-analyzer-x86_64-unknown-linux-gnu hinted by justlevy20 is, although i found this: when trying to launch ~/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1258-linux-x64/server/rust-analyzer --version (which is where vscode finds the error) outputs: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.25' not found Did rust analyzer increase a version requirement, or did I just happen to mess up my packages? Cargo commands work fine.

Closed, I know, but still having this issue in Oct 2022. The problem/solution I found was the file rust-analyzer-x86_64-unknown-linux-gnu did not have the executable flag set.

You should uninstal it, install and switch to nightly again