You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I am missing something, it looks like this plugin should be "plug and play" and you should be able to format files without doing any additional downloads or configuration settings.
When I attempt to format, I get an error stating Google Java Format for VS Code is configured, but it cannot format 'Java'-files.
Attempting to run "Reload Executable" and "Clear Cache" both result in errors saying it was unable to find a command. I have tried both on native windows, as well as inside a container (to ensure it wasn't just my container). I also set the property java.format.settings.google.executable to a jar that I was able to execute on the command line, and set java.format.settings.google.mode to "jar-file", but I still got all the same errors.
Note: Not sure why my image won't copy in properly for me, but I'll leave it just in case it's working for anybody else
Some of this may be a me problem... (potential proxy issue). It seems that at least some properties changes are not dynamic in that I had to reload the workspace to get them to take. I had the jar file hard-coded for my linux container, and that is now working, but windows wasn't working because it didn't have access to the file. I removed the settings so that it should pull in the file. Upon restart of the workspace the following shows up in debug:
2024-09-30 14:32:23.095 [debug] Cache directory created at file:///<location_omitted>/.vscode/extensions/josevseb.google-java-format-for-vs-code-1.1.2/cache
2024-09-30 14:32:23.096 [debug] Using native binary for win32-x64 if available
2024-09-30 14:32:23.096 [debug] Using latest version...
2024-09-30 14:32:23.096 [debug] Calling "" with arguments: []
2024-09-30 14:32:23.096 [debug] Fetching: https://api.github.com/repos/google/google-java-format/releases/latest
2024-09-30 14:32:33.097 [error] Error in "": fetch failed
Is there a way for me to put the native binaries (of both OS that I run) in this cache extension? I assume that if I set "java.format.settings.google.version" it won't check for latest and it will just run fine after that.
Hello,
I am facing the same issue : "fetch failed" using VSCode 1.94.2 and google java format plugin v1.1.2.
I have a company proxy defined in my Windows system which is not a problem for VSCode (or any other tool).
Here are the logs:
2025-03-17 15:17:45.941 [debug] Cache directory created at file:///c%3A/Users/xxx/.vscode/extensions/josevseb.google-java-format-for-vs-code-1.1.2/cache
2025-03-17 15:17:45.942 [debug] Using native binary for win32-x64 if available
2025-03-17 15:17:45.942 [debug] Calling "" with arguments: ["1.22.0"]
2025-03-17 15:17:45.942 [debug] Fetching: https://api.github.com/repos/google/google-java-format/releases/tags/v1.22.0
2025-03-17 15:17:46.006 [error] Error in "": fetch failed
Activity
JoseVSeb commentedon Sep 26, 2024
It's working fine for me. Can you share debug logs (see README) if you're still facing this issue?
wrestang commentedon Sep 30, 2024
Some of this may be a me problem... (potential proxy issue). It seems that at least some properties changes are not dynamic in that I had to reload the workspace to get them to take. I had the jar file hard-coded for my linux container, and that is now working, but windows wasn't working because it didn't have access to the file. I removed the settings so that it should pull in the file. Upon restart of the workspace the following shows up in debug:
Is there a way for me to put the native binaries (of both OS that I run) in this cache extension? I assume that if I set "java.format.settings.google.version" it won't check for latest and it will just run fine after that.
ben-cnv commentedon Mar 17, 2025
Hello,
I am facing the same issue : "fetch failed" using VSCode 1.94.2 and google java format plugin v1.1.2.
I have a company proxy defined in my Windows system which is not a problem for VSCode (or any other tool).
Here are the logs:
And when trying to get URL "https://api.github.com/repos/google/google-java-format/releases/tags/v1.22.0" from my browser, it is working just fine