Skip to content

Fix: Recreate container from compose file if removed or running into errors#809

Open
nkay08 wants to merge 4 commits into
TibixDev:mainfrom
nkay08:fix/podman_recreate
Open

Fix: Recreate container from compose file if removed or running into errors#809
nkay08 wants to merge 4 commits into
TibixDev:mainfrom
nkay08:fix/podman_recreate

Conversation

@nkay08

@nkay08 nkay08 commented Jul 4, 2026

Copy link
Copy Markdown

Hi,

I had two issues with Winboat when using it on my steam deck. I am using podman and podman-compose installed via brew which works fine.

However, sometimes the podman container gets broken due to the USB passthrough (e.g. when USB devices have been unplugged in the meantime).
When then trying to start the container in Winboat, there is just an endless spinner without error message.
But manually trying to start it shows this:

(deck@steamdeck ~)$ podman ps -a
CONTAINER ID  IMAGE                        COMMAND     CREATED     STATUS                 PORTS                                                                                                                                  NAMES
06cdeee91076  ghcr.io/dockur/windows:5.14              4 days ago  Exited (0) 4 days ago  127.0.0.1:39203->3389/tcp, 127.0.0.1:38997->7148/tcp, 127.0.0.1:37031->7149/tcp, 127.0.0.1:39639->8006/tcp, 127.0.0.1:37213->3389/udp  WinBoat

(deck@steamdeck ~)$ podman start 06cdeee91076
Error: unable to start container "06cdeee9107683c1f2c645dca82cd204d08a9c8d299df2a7c0cf98543d3ecdc5": crun: cannot stat `/dev/bus/usb/001/022`: No such file or directory: OCI runtime attempted to invoke a command that was not found

Additionally, if the container was removed for some reason, Winboat will not detect this on start and show the initial setup screen on start, even though all the files of the windows installation still exist.
When manually starting the container via the compose file, everything works fine again.

So this change includes the following:

  1. Detect existing installation files and don't show initial setup screen if there is currently no existing container.
  2. Recreate the container if it runs into errors due to USB device mapping
  3. Recreate the container from the compose file if installation files exist
  4. Don't show endless spinner for some actions if they fail
  5. Show error message in GUI if starting of the container fails even after trying to recreate it

These changes are related to:

@nkay08 nkay08 changed the title Recreate container from compose file if removed or running into errors Fix: Recreate container from compose file if removed or running into errors Jul 4, 2026
@waffles-dev

Copy link
Copy Markdown
Collaborator

Sorry I've not been on top of things.
I like the PR but I'm just raising it to Tibix just to double check a couple of things, hoping we can get it in soon.

@waffles-dev waffles-dev requested a review from TibixDev July 10, 2026 15:32
@TibixDev

Copy link
Copy Markdown
Owner

Hey, just a couple of things before we merge:

  • Can you show me how the last container error UI would look visually?
  • How would recreating the container help with stale USB device mappings? Is it an issue on Podman's side that they cache the specific mappings even if the entire bus is passed, when you start it, it tries to use said mapping? At least that's the idea that I get from this fix

Other than that good changes, for example I think the guard clauses are a great change so we don't show a loading spinner forever, thanks!

@nkay08

nkay08 commented Jul 11, 2026

Copy link
Copy Markdown
Author

Hey, just a couple of things before we merge:

* Can you show me how the last container error UI would look visually?

* How would recreating the container help with stale USB device mappings? Is it an issue on Podman's side that they cache the specific mappings even if the entire bus is passed, when you start it, it tries to use said mapping? At least that's the idea that I get from this fix

Other than that good changes, for example I think the guard clauses are a great change so we don't show a loading spinner forever, thanks!

I will try to provide a screenshot of the UI in case of such an error.

Yes, it seems like on podman's side it caches the mappings and fails to start the container again if those have changed.
The error message is similar to this:
2026-01-31 07:11:23 | ERROR | Error: Command failed: podman container start WinBoat Error: unable to start container "ff3b71d6282d8d8ccb951c94583f29053fa68ffc69b0d098c5d0195027f74ef2": crun: cannot stat /dev/bus/usb/001/004: No such file or directory: OCI runtime attempted to invoke a command that was not found
I also tried out another PR #553 which suggests some changes to the compose file and this actually solves this specific problem.

I think both PRs are sensible. PR #553 alleviates this specific podman issue, and my PR introduces container recreation as a fallback.

@nkay08

nkay08 commented Jul 12, 2026

Copy link
Copy Markdown
Author

This is how the UI for the container error looks like.

winboat_container_error

@TibixDev

Copy link
Copy Markdown
Owner

Do you think you can make it look a little bit nicer and make it have a clickable text for "container logs" that opens up the actual container logs?

@nkay08

nkay08 commented Jul 13, 2026

Copy link
Copy Markdown
Author

Do you think you can make it look a little bit nicer and make it have a clickable text for "container logs" that opens up the actual container logs?

I can add the function to open the container logs, sure.

To be honest, I am not really sure what defines a "nicer" look (aesthetics is not really my proficiency).
What did you have in your mind?

In the best case this will hopefully be rarely shown to the user.

@nkay08

nkay08 commented Jul 13, 2026

Copy link
Copy Markdown
Author
winboat_error_message

Is this maybe more how you imagined it to look like?
(haven't committed the visual changes yet)

@waffles-dev

Copy link
Copy Markdown
Collaborator

Ah - sorry to be annoying, but instead of adding the new box, can you try updating the Container - Unknown text to Container - Failed to Start (check logs) (where logs is the link)?

If it can fit in the one, pre-existing line, it'd be ideal so that we're not pushing the vertical space of that element out.

@nkay08

nkay08 commented Jul 14, 2026

Copy link
Copy Markdown
Author
winboat_error_message_inline

Ok got it, so how about this?

I introduced a new ContainerStatus.ERROR in my last commit to make the the condition logic in Home.vue easier, and thus removed the newly added Winboat.lastContainerError again.

(Instead of "Failed to start" it could also just show "Error" like for the other statuses)

P.S. I did a rebase and was initially confused why the added installation detection no longer worked. I very much appreciate to move the WINBOAT_DIR directory to XDG_DATA_HOME. Maybe it is already planned, but could there maybe be an automatic migration from the old location or a message for users that update?

@nkay08 nkay08 force-pushed the fix/podman_recreate branch from 467541f to 4a7b81b Compare July 14, 2026 18:12
@waffles-dev

Copy link
Copy Markdown
Collaborator

Nice - I'll get Tibix to do a final check of this one.
re. the migration, not sure yet. Might be doing a breaking change for a 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants