Skip to content

Rust-analyzer reports http error: Got response 407 when trying to fetch release info #11149

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

Closed
sshxmz opened this issue Jan 1, 2022 · 5 comments

Comments

@sshxmz
Copy link

sshxmz commented Jan 1, 2022

Everytime when booting VSCode, rust-analyzer reports a http error:

INFO [12/31/2021, 10:14:00 AM]: Extension version: 0.2.853
INFO [12/31/2021, 10:14:00 AM]: Using configuration {
  cargoRunner: null,
  runnableEnv: null,
  inlayHints: {
    enable: true,
    smallerHints: true,
    chainingHints: true,
    maxLength: 25,
    parameterHints: true,
    typeHints: true,
    hideNamedConstructorHints: false
  },
  updates: { channel: 'stable', askBeforeDownload: false },
  server: { path: null, extraEnv: null },
  trace: { server: 'off', extension: false },
  debug: {
    engine: 'auto',
    sourceFileMap: {
      '/rustc/<id>': '${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust'
    },
    openDebugPane: false,
    engineSettings: {}
  },
  assist: {
    importGranularity: 'crate',
    importEnforceGranularity: false,
    importPrefix: 'plain',
    importGroup: true,
    allowMergingIntoGlobImports: true
  },
  cache: { warmup: true },
  callInfo: { full: true },
  cargo: {
    autoreload: true,
    allFeatures: false,
    unsetTest: [ 'core' ],
    features: [],
    runBuildScripts: true,
    useRustcWrapperForBuildScripts: true,
    noDefaultFeatures: false,
    target: null,
    noSysroot: false
  },
  checkOnSave: {
    enable: true,
    allFeatures: null,
    allTargets: true,
    command: 'check',
    noDefaultFeatures: null,
    target: null,
    extraArgs: [],
    features: null,
    overrideCommand: null
  },
  completion: {
    addCallArgumentSnippets: true,
    addCallParenthesis: true,
    snippets: {},
    postfix: { enable: true },
    autoimport: { enable: true },
    autoself: { enable: true }
  },
  diagnostics: {
    enable: true,
    enableExperimental: true,
    disabled: [],
    remapPrefix: {},
    warningsAsHint: [],
    warningsAsInfo: []
  },
  experimental: { procAttrMacros: true },
  files: { watcher: 'client', excludeDirs: [] },
  highlightRelated: {
    references: true,
    exitPoints: true,
    breakPoints: true,
    yieldPoints: true
  },
  highlighting: { strings: true },
  hover: { documentation: true, linksInHover: true },
  hoverActions: {
    debug: true,
    enable: true,
    gotoTypeDef: true,
    implementations: true,
    references: false,
    run: true
  },
  joinLines: {
    joinElseIf: true,
    removeTrailingComma: true,
    unwrapTrivialBlock: true,
    joinAssignments: true
  },
  lens: {
    debug: true,
    enable: true,
    implementations: true,
    run: true,
    methodReferences: false,
    references: false,
    enumVariantReferences: false,
    forceCustomCommands: true
  },
  linkedProjects: [],
  lruCapacity: null,
  notifications: { cargoTomlNotFound: true },
  procMacro: { enable: true, server: null },
  runnables: { overrideCargo: null, cargoExtraArgs: [] },
  rustcSource: null,
  rustfmt: {
    extraArgs: [],
    overrideCommand: null,
    enableRangeFormatting: false
  },
  workspace: { symbol: { search: { scope: 'workspace', kind: 'only_types' } } }
}
INFO [12/31/2021, 10:14:00 AM]: PersistentState: {
  lastCheck: undefined,
  nightlyReleaseId: undefined,
  serverVersion: undefined
}
ERROR [12/31/2021, 10:14:00 AM]: Error fetching artifact release info {
  requestUrl: 'https://api.github.com/repos/rust-analyzer/rust-analyzer/releases/tags/2021-12-13',
  releaseTag: '2021-12-13',
  response: {
    headers: { 'proxy-authenticate': 'Basic realm="proxy"' },
    status: 407,
    body: ''
  }
}

Note: I can access the url properly by curl command.

@sshxmz
Copy link
Author

sshxmz commented Jan 1, 2022

ERROR [12/31/2021, 10:15:24 AM]: Bootstrap error [Error: Got response 407 when trying to fetch release info for 2021-12-13 release
at pd (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:108:1419)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:121:1850
at async xc (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:121:2616)
at async M0 (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:121:1830)
at async L0 (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:109:3453)
at async F0 (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:109:1881)
at async O0 (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:108:3977)
at async lC (/home/user/.vscode-server/extensions/matklad.rust-analyzer-0.2.853/out/main.js:108:3808)
at async Promise.all (index 0)]

@lnicola
Copy link
Member

lnicola commented Jan 1, 2022

Are you using a proxy which requires authentication? We have no way of passing the credentials.

Anyway, newer versions no longer need to download the server binary from GitHub because it's bundled. Unfortunately, you're getting an old release because of #11098. There are two workarounds there, or you can manually download and install the VSIX.

@sshxmz
Copy link
Author

sshxmz commented Jan 1, 2022

I am not using a proxy server. I can access this url successfully using curl command. my vscode is also not configured with proxy server, if rust-analyzer uses proxy server, how does it get the proxy server information (through environment variable or setting item)?

@lnicola
Copy link
Member

lnicola commented Jan 1, 2022

if rust-analyzer uses proxy server, how does it get the proxy server information

http.proxy from Code, or the https_proxy or HTTPS_PROXY environment variables, in this order.

But anyway, you should install the new version, which doesn't download anything.

@sshxmz
Copy link
Author

sshxmz commented Jan 1, 2022

Ok, I'll try the new version. Thank you very much.

@sshxmz sshxmz closed this as completed Jan 1, 2022
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

2 participants