-
Notifications
You must be signed in to change notification settings - Fork 433
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
Error "Timed out while retrieving the attached javadoc...." #176
Comments
can you try setting your proxy settings in ~/.m2/settings.xml? |
Setting the maven proxy didn't seem to help. Still see the same error. I also have the proxy set on |
So, I'm not sure why JDT tries to download the sources of the JDK from the Internet by itself (what URL is it trying to reach?), but it's definitely outside of the m2e source download mechanism (hence ignores settings.xml). Please try to set the proxy settings following these instructions. |
@joewood have you tried setting the proxy settings in |
Hi @fbricon yes, tried that and no difference.
I also tried |
If it helps, this is the from the log:
|
mmm I was expecting these proxy settings passed as System properties to just work. I need to check with an actual proxy on my side. |
I checked setting the proxy settings via import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
public class ProxyTest {
public static void main(String[] args) throws Exception {
System.setProperty("http.proxyHost", "myproxy.com");
System.setProperty("http.proxyPort", "82");
System.setProperty("https.proxyHost", "myproxy.com");
System.setProperty("https.proxyPort", "82");
String target = "http://example.com";
StringBuilder output = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(new URL(target).openStream()))) {
String response;
while ((response = br.readLine()) != null) {
output.append(response).append(System.lineSeparator());
}
}
System.out.println(output);
}
} |
Added a timeout of 500ms to javadoc resolution, so completionItem resolve regardless of javadoc status. It should be noted, however, that 500ms might still be too long for client-side, which could still experience issues like redhat-developer/vscode-java#176 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Added a timeout of 500ms to javadoc resolution, so completionItem resolve regardless of javadoc status. It should be noted, however, that 500ms might still be too long for client-side, which could still experience issues like redhat-developer/vscode-java#176 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Added a timeout of 500ms to javadoc resolution, so completionItem resolve regardless of javadoc status. It should be noted, however, that 500ms might still be too long for client-side, which could still experience issues like redhat-developer/vscode-java#176 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Added a timeout of 500ms to javadoc resolution, so completionItem resolve regardless of javadoc status. It should be noted, however, that 500ms might still be too long for client-side, which could still experience issues like redhat-developer/vscode-java#176 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Hi @fbricon sorry for the delay. Yes that test works as expected. Strange that it doesn't work through the extension. |
I have the same problem. I'm using proxy through cntlm and have the following proxy settings:
~/.m2/settings.xml
Bash shell
Everything works (also confirmed that maven can download packages), except the Language Support for Java extension:
|
I have noticed the proxy error occurs randomly and when I save the opened file. When I press Ctrl+S it shows me the error and underlines almost all code in red, saying it can't resolve names to classes. If I go after a dot and start typing again, it reestablish the communication and it's all right again. Until the next save. Is there any chance the code is ignoring proxy settings on "after save" hook or something like this? |
@dineiar we just fixed - hopefully- an issue with proxy settings being ignored server side. Guys, please download and install the latest *.vsix from http://download.jboss.org/jbosstools/jdt.ls/staging/ and let us know if it fixes your issue |
Also, I'm seeing errors like this (just noticed the stack trace is different):
|
@fbricon Just installed and it stopped popping up the Output window every 3 seconds, so thank you! It still presenting that strange behaviour on save that I mentioned before, and showing lot of Graddle errors on output like
But they don't bother much as the're not popping on the screen. |
@dineiar does it work with Eclipse+Gradle integration (aka Buildship)? |
@dineiar You may want to take a look at eclipse-jdtls/eclipse.jdt.ls#233 (comment) |
@dineier the following part is related to gradle: There is also a problem when setting a proxy for gradle. It isn't related to o.e.jdt.ls or Eclipse/buildship. systemProp.http.proxyHost=user:password@<proxy_ip> However, when downloading dependencies, gradle requires the proxy properties to be set as described at https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy: systemProp.http.proxyHost=<proxy_id> This fix will download dependencies, but won't work if there isn't the required gradle distribution. You have to download the distribution using gradle.properties as described above. |
@fbricon I'm not using Gradle, so I don't know. I'm using VS Code and Maven. (Did I misunderstood you question?) I didn't fully understood the VS Code - Eclipse - Maven - Graddle relationship... Is the Java Plugin that creates the |
@fbricon I'm sorry I didn't let that clear in that comment. The proxy settings are setted in Maven's settings.xml, as mentioned in my previous comment. What I still don't understand is why the extension keeps trying to synchronize Graddle, as I'm not using it in my projects... |
It's not normal. This should be fixed |
Should I open another issue for this? At least for me, the javadoc proxy problem seems to be solved by the latest .vsix. |
Yes please |
This should be fixed along the proxy issues now. Closing. |
While typing in the editor using regular packages I see this error. It appears that the Java extension is trying to access the JavaDoc data from the internet, but it isn't respecting the configured proxy setting in VSCode.
Environment
Operating System: RHEL2.7
JDK version:1.8
Visual Studio Code version: 1.10.2
Java extension version: 0.1.0
Steps To Reproduce
Type any code that uses the standard packages:
I see the following error in the "Output Window" For "Language Support for Java"
My user settings configured my proxy as follows - which works fine for all other operations:
The text was updated successfully, but these errors were encountered: