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

bug(ImageDetails): navigation to container image crashes Podman Desktop #6801

Open
axel7083 opened this issue Apr 16, 2024 · 3 comments · Fixed by #6805 · May be fixed by #7677
Open

bug(ImageDetails): navigation to container image crashes Podman Desktop #6801

axel7083 opened this issue Apr 16, 2024 · 3 comments · Fixed by #6805 · May be fixed by #7677
Assignees
Labels
Milestone

Comments

@axel7083
Copy link
Contributor

Bug description

go-to-image-bug.mp4

After that the application became completely crashed and user cannot perform any action except restarting Podman Desktop.

Operating system

Windows 11

Installation Method

None

Version

next (development version)

Steps to reproduce

image

Relevant log output

No response

Additional context

No response

@axel7083 axel7083 added the kind/bug 🐞 Something isn't working label Apr 16, 2024
@axel7083
Copy link
Contributor Author

axel7083 commented Apr 16, 2024

Source of the issue

Some investigation later.

The imageHref from ContainerInfoUI in ContainerDetails contains an url where the image id has the sha256: prefix. However, when navigating inside the images page, and opening the expected image, the image Id does not have the sha256: prefix. As showed in the following diff

+ /images/sha256:46cb0ee37ae2a409d2827039af15936a9e677169e91125992f188487a11d9895/podman.Podman Machine/Z2hjci5pby9jb250YWluZXJzL3BvZG1hbi1kZXNrdG9wLWV4dGVuc2lvbi1haS1sYWItcGxheWdyb3VuZC1pbWFnZXMvYWktbGFiLXBsYXlncm91bmQtY2hhdDowLjMuMA==/summary
- /images/46cb0ee37ae2a409d2827039af15936a9e677169e91125992f188487a11d9895/podman.Podman%20Machine/Z2hjci5pby9jb250YWluZXJzL3BvZG1hbi1kZXNrdG9wLWV4dGVuc2lvbi1haS1sYWItcGxheWdyb3VuZC1pbWFnZXMvYWktbGFiLXBsYXlncm91bmQtY2hhdDowLjMuMA==/summary

In the ImagesList svelte component the url to open the ImageDetails is computed with the following line

function openDetailsImage(image: ImageInfoUI) {
router.goto(`/images/${image.id}/${image.engineId}/${image.base64RepoTag}/summary`);
}

When the container details uses the container.imageHref which is assigned with the following

imageHref: `/images/${containerInfo.ImageID}/${containerInfo.engineId}/${containerInfo.ImageBase64RepoTag}/summary`,

The problem seems to be in the difference with the containerInfo.ImageID which has the sha256: prefix where imageInfo.Id has not.

Solutions proposal

(1) We could inside the ImageDetails, check for the sha256: prefix in the following

imageInfo = allImages.find(c => c.Id === imageID && c.engineId === engineId);

(2) When creating the imageHref, instead of using containerInfo.ImageID we could check for the prefix sha256:, and remove it if it exists.

@axel7083 axel7083 self-assigned this Apr 16, 2024
@axel7083 axel7083 added this to the 1.10.0 milestone Apr 16, 2024
@axel7083
Copy link
Contributor Author

Reported by @SoniaSandler the problems seems to have risen again

@axel7083 axel7083 reopened this Jun 17, 2024
@axel7083 axel7083 assigned SoniaSandler and unassigned axel7083 Jun 17, 2024
@SoniaSandler SoniaSandler linked a pull request Jun 17, 2024 that will close this issue
1 task
@odockal
Copy link
Contributor

odockal commented Jun 20, 2024

It seems that we also have this one hidden in feature request: #6627.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🚧 In Progress
4 participants