Skip to content
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

Open Plugin button in Collection plugin webview throws Path does not exist error. #1808

Open
abhikdps opened this issue Feb 6, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@abhikdps
Copy link
Contributor

abhikdps commented Feb 6, 2025

Summary

Open Plugin button in Collection plugin webview throws Path does not exist error. The plugin gets created inside the collections well as we are able to open it using the button that appears on the notification after clicking on the Create button. But the actual Open Plugin button on the webview throws the below mentioned error:

Path does not exist
The path '~/tests/test_collection/plugins/undefined/undefined.py' does not exist on this computer.

Image

Extension version

25.1.0

VS Code version

1.96.3

Ansible Version

~ ansible --version
ansible [core 2.17.6]
  config file = None
  configured module search path = ['/Users/abanand/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/abanand/.pyenv/versions/3.11.10/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/abanand/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/abanand/.pyenv/versions/3.11.10/bin/ansible
  python version = 3.11.10 (main, Nov 12 2024, 18:16:15) [Clang 16.0.0 (clang-1600.0.26.4)] (/Users/abanand/.pyenv/versions/3.11.10/bin/python3)
  jinja version = 3.1.4
  libyaml = True

OS / Environment

macOS Sequoia - 15.2

Relevant log output

@alisonlhart
Copy link
Contributor

The reason for this is that the payload sent when clicking the "Open Folder" button does not include pluginName or pluginType.

Payload actually sent in addPluginPageApp:

function handleInitOpenScaffoldedFolderClick() {
  vscode.postMessage({
    command: "init-open-scaffolded-folder",
    payload: {
      projectUrl: projectUrl,
    },
  });
}

Expected payload in addPluginPage:

          case "init-open-scaffolded-folder":
            payload = message.payload;
            await this.openFolderInWorkspace(
              payload.projectUrl,
              payload.pluginName,
              payload.pluginType,
            );

Since payload.pluginName and payload.pluginType is undefined since it's never sent, the error message appears. We just need to reconfigure the payload sent to include these values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants