vscode-gradle icon indicating copy to clipboard operation
vscode-gradle copied to clipboard

Cannot find Gradle Tasks tasks

Open crockeea opened this issue 2 years ago • 6 comments

Extension Name: vscode-gradle Extension Version: 3.8.0 OS Version: Windows 10 20H2 VSCode version: 1.61.0

Describe the bug Trying to run tasks provided by Gradle Tasks results in "command gradle. not found".

To Reproduce

  1. Install Gradle Tasks.
  2. View -> Command Palette
  3. Enter "Find Gradle Tasks" and hit enter
  4. A popup appears that says "Command 'Find Gradle Task' resulted in an error (command 'gradle.findTask' not found)

The same happens with "Refresh Gradle Tasks".

Expected behavior I expect some sort of action to be taken, with no error dialog.

Screenshots

Output from "Gradle Tasks" I do not have a "Gradle Tasks" tab on the "Output" panel.

Does the bug still exist if you disable all other extensions? Unclear; I need the "Remote - SSH" extension (in my local workspace) to load the workspace. The problem

Additional context This is a remote workspace (via SSH), and Gradle Tasks is installed in my local and remove workspace.

crockeea avatar Oct 13 '21 23:10 crockeea

Thanks for the report. Could you try if this issue still exists in a local project? This would help us to confirm if it's related to the remote environment.

CsCherrYY avatar Oct 14 '21 01:10 CsCherrYY

It seems that the problem is related to the remote environment. When I use local source code, I get an elephant icon in the Activity Bar, and I can run commands from the command palette. If I start a remote connection, the Activity Bar elephant goes away, and I can no longer run gradle commands.

crockeea avatar Oct 14 '21 15:10 crockeea

Has there been any movement on this or is there a workaround? I can confirm that this extension (v3.12.5) doesn't work with remote-ssh (v0.85.2022071315) No elephant icon appears in the activity bar and the only information given in the "Runtime Status" is "'javaProject.gradle' is not a valid menu identifier"

cmitchell avatar Nov 23 '22 19:11 cmitchell

@cmitchell if no elephant icon can be found in the activity bar, mostly the gradle extension has not been activated. You can check the conditions to activate the extension and find if your project contains certain files. https://github.com/microsoft/vscode-gradle/blob/db4104b727fb528e1127f26b1fd0a44c4adce939/extension/package.json#L35-L44

CsCherrYY avatar Nov 24 '22 00:11 CsCherrYY

@CsCherrYY -- Thanks, but I was confirming that the issue is specific to when you are using vscode via remote ssh (that's why I included the version of the ssh extension) The same code repository and gradle setup works fine with the gradle extension locally, so it's definitely NOT related to an activation condition.

Has anyone tested this extension when using the remote-ssh plugin? Other extensions work fine over ssh, so that's why I think there's an issue with this extension and not the ssh remote extension.

cmitchell avatar Nov 24 '22 14:11 cmitchell

I encountered (the same?) issue when opening the project in WSL environment. The Elephant icon is missing, I can see Gradle commands from a command panel but many things seem broken. I didn't have or use a ssh-remote extension/plugin. But I believe the WSL is still considered "Remote" by VSCode.

Stuck for almost 2 hours. Thank to this public issue report, moved my project files from WSL to Windows Desktop and the Elephant icon now appears on the side activity bar.

Bankde avatar Oct 06 '23 13:10 Bankde