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

During image "start", if the container creation fails, the user doesn't get any message #6364

Closed
feloy opened this issue Mar 11, 2024 · 5 comments
Labels
area/dashboard 📊 Concern the dashboard from Container Desktop kind/bug 🐞 Something isn't working lifecycle/stale

Comments

@feloy
Copy link
Contributor

feloy commented Mar 11, 2024

Bug description

When trying to create a container, if the creation fails, no error is displayed on the screen.

After some investigation, I can see that the exception is not thrown from the call to libpodApi.podmanAttach (https://github.com/containers/podman-desktop/blob/main/packages/main/src/plugin/container-registry.ts#L1709).

After binary-searching which commit introduced the regression, I can see the problem happens since the PR #6128

Operating system

mac os

Installation Method

Installer from website/GitHub releases

Version

next (development version)

Steps to reproduce

  • Go to Images page
  • "Start" an image
  • Choose a non free port, to make the creation fail
  • You should have a message displayed in red at the bottom of the form, but no one appears

Relevant log output

No response

Additional context

No response

@feloy feloy added the kind/bug 🐞 Something isn't working label Mar 11, 2024
@jeffmaury
Copy link
Contributor

Another way to make it fail is to change entrypoint or command to an invalid path

@feloy
Copy link
Contributor Author

feloy commented Mar 13, 2024

Adding some logs in the docker-modem library, here s the difference I can see before and after updating to Node 20 + Electron 29.

Before, a 409 response is returned after the attach query.
After, there is no response.

attach-ok

attach-err

@feloy
Copy link
Contributor Author

feloy commented Mar 13, 2024

Removing this patch from libpod-dockerode.ts fixes the problem, but I'm not completely sure of the implications of removing it:

      // patch the modem to not send any data. By default dockerode send query parameters as JSON payload
      // but podman REST API will then echo the response, so send empty data '' instead
      const originalBuildRequest = this.modem.buildRequest;
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      this.modem.buildRequest = function (options: unknown, context: any, data: unknown, callback: unknown) {
        if (context.allowEmpty && context.path.includes('/attach?')) {
          data = '';
        }
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        return originalBuildRequest.call(this, options, context, data, callback);
      };

Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue has been automatically marked as stale because it has not had activity in the last 6 months. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

Copy link
Contributor

github-actions bot commented Nov 3, 2024

This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard 📊 Concern the dashboard from Container Desktop kind/bug 🐞 Something isn't working lifecycle/stale
Projects
None yet
Development

No branches or pull requests

4 participants