coc-java
coc-java copied to clipboard
First time startup: GotError [MaxRedirectsError]: Redirected 10 times. Aborting.
I'm not sure if this is because I'm going through a proxy (which I believe is set up properly), or a bug, but, I'm getting the Download jdt.ls failed, you can download it at https://download.eclipse.org/jdtls/snapshots/?d error message, with the following from :CocInfo, which doesn't look like a proxy problem.
## versions
vim version: VIM - Vi IMproved 8.2 8021328
node version: v16.15.1
coc.nvim version: 0.0.81-2522eee5 2022-06-14 19:03:29 +0800
coc.nvim directory: /home/ttelford/.vim/pack/plugin/start/coc.nvim
term: dumb
platform: linux
## Log of coc.nvim
2022-06-30T14:58:33.967 INFO (pid:6618) [plugin] - coc.nvim initialized with node: v16.15.1 after 290ms
2022-06-30T14:58:34.045 INFO (pid:6618) [services] - registered service "xml"
2022-06-30T14:58:34.046 INFO (pid:6618) [services] - XML LSP state change: stopped => starting
2022-06-30T14:58:34.058 INFO (pid:6618) [language-client-index] - Language server "xml" started with 6670
2022-06-30T14:58:34.066 INFO (pid:6618) [coc-java] - Using java from /apps/java/zulu17.30.15-ca-jdk17.0.1-linux_x64, version: 17
2022-06-30T14:58:34.408 INFO (pid:6618) [services] - XML LSP state change: starting => running
2022-06-30T14:58:34.411 INFO (pid:6618) [services] - service xml started
2022-06-30T14:58:34.886 ERROR (pid:6618) [extension:coc-java] - GotError [MaxRedirectsError]: Redirected 10 times. Aborting.
at ClientRequest.handleResponse (/home/ttelford/.config/coc/extensions/node_modules/coc-java/lib/index.js:23599:14)
at Object.onceWrapper (node:events:642:26)
at ClientRequest.emit (node:events:539:35)
at ClientRequest.origin.emit (/home/ttelford/.config/coc/extensions/node_modules/coc-java/lib/index.js:25470:11)
at HTTPParser.parserOnIncomingClient (node:_http_client:631:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at Socket.socketOnData (node:_http_client:494:22)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9) {
host: 'download.eclipse.org',
hostname: 'download.eclipse.org',
method: 'GET',
path: '/jdtls/snapshots/jdt-language-server-latest.tar.gz',
socketPath: undefined,
protocol: 'https:',
url: 'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
gotOptions: {
path: '/jdtls/snapshots/jdt-language-server-latest.tar.gz',
protocol: 'https:',
slashes: true,
auth: null,
host: 'download.eclipse.org',
port: null,
hostname: 'download.eclipse.org',
hash: '',
search: '',
query: null,
pathname: '/jdtls/snapshots/jdt-language-server-latest.tar.gz',
href: 'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
retry: {
retries: [Function (anonymous)],
methods: [Set],
statusCodes: [Set],
errorCodes: [Set]
},
headers: {
'user-agent': 'got/9.6.0 (https://github.com/sindresorhus/got)',
'accept-encoding': 'gzip, deflate'
},
hooks: {
beforeRequest: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: [],
beforeError: [],
init: []
},
decompress: true,
throwHttpErrors: true,
followRedirect: true,
stream: true,
form: false,
json: false,
cache: false,
useElectronNet: false,
encoding: null,
agent: TunnelingAgent {
options: [Object],
proxyOptions: [Object],
maxSockets: Infinity,
requests: [],
sockets: [Array],
_events: [Object: null prototype],
_eventsCount: 1,
request: [Function: request]
},
method: 'GET'
},
statusCode: 301,
statusMessage: 'Moved Permanently',
redirectUrls: [
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz',
'https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz'
]
}
2022-06-30T14:58:41.741 INFO (pid:6618) [attach] - receive notification: showInfo []
My ~/.vim/coc-settings.json is fairly straightforward:
{
"http.proxy": "http://http.proxy.company.com:8000"
}
If I'm reading the log correctly, it looks like there's no communication problem through the proxy - it's getting the http/301 just fine, so communication seems to be working in both directions. It seems coc-java just isn't handling the redirect quite right?