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

[HELP (Not Launching/ Crashing)] #173

Open
5 tasks done
DamianManelski opened this issue Nov 3, 2024 · 17 comments
Open
5 tasks done

[HELP (Not Launching/ Crashing)] #173

DamianManelski opened this issue Nov 3, 2024 · 17 comments

Comments

@DamianManelski
Copy link

Checklist

  • I have given details of my install including Distribution, Wayland/ XOrg, Parameters Used, echo $XAUTHORITY, etc.
  • I have provided logs showing any errors, if available (use DEBUG=1 zwift)
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of previous issue.

Describe the issue

Cannot run aftrer pulling zwift image on kubuntu.
chown: cannot access '/home/user/.wine/drive_c/users/user/Documents/Zwift': No such file or directory

Distribution Details

Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
This is Kubuntu!

Reproduction steps

1.I have pull docker image to my newset kubuntu like: docker pull netbrain/zwift
2.then i run image as "sudo docker run netbrain/zwift".
3. which gives me:
Screenshot_20241103_161226
...

@netbrain
Copy link
Owner

netbrain commented Nov 3, 2024 via email

@DamianManelski
Copy link
Author

same.
obraz

@DamianManelski
Copy link
Author

obraz

@netbrain
Copy link
Owner

netbrain commented Nov 4, 2024

You probably need to delete the Zwift volume as it now probably is owned by root.

Docker volume list should show a list of volumes.

Try deleting the Zwift volume and let it be recreated when you run Zwift as a normal user

@DamianManelski
Copy link
Author

docker volume ps shows me no volume:
obraz
after docker volume prune and removing existing image it shows me the same.

@netbrain
Copy link
Owner

netbrain commented Nov 5, 2024

@sHedC got any clue on why this could be happening?

@sHedC
Copy link
Collaborator

sHedC commented Nov 6, 2024

Yeh you are not passing the volume, if you have a look at zwift.sh you can see it does quite a lot of pre-work to define what to pass through to make it work.

Once of the things is this: -v zwift-$USER:/home/user/.wine/drive_c/users/user/Documents/Zwift

Which is what you are missing:

This file: https://github.com/netbrain/zwift/blob/master/zwift.sh

Recommended approach is to install it as per the readme, but you can just download it make it executable and run it or modify it if you feel brave.

@Rasky26
Copy link

Rasky26 commented Dec 5, 2024

I am also getting the same error and I just installed following the README instructions of:

  • sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/netbrain/zwift/master/bin/install.sh)"
  • zwift

Upon running the container, I get the same error output log ending in:

2024-12-04 22:49:50 + chown -R 1000:1000 /home/user/.wine/drive_c/users/user/Documents/Zwift
2024-12-04 22:49:50 chown: cannot access '/home/user/.wine/drive_c/users/user/Documents/Zwift': No such file or directory

I then had a co-worker run the same steps on his personal linux laptop and the container successfully launched for him.

Because the command and actions were the same between the two of us, I am wondering if the error for me could be due to having a Linux username other than the default user (such as some-custom-username).

Happy to provide additional details to help troubleshoot this. I'm excited to get this up and running!

@netbrain
Copy link
Owner

netbrain commented Dec 5, 2024

DEBUG=1 zwift what does this tell you of your docker/podman command that it executes?

@Rasky26
Copy link

Rasky26 commented Dec 6, 2024

I only have docker installed on my system. Here is the output from running that command:

+ [[ -f /home/colin-oraskovich/.config/zwift/config ]]
+ [[ -f /home/colin-oraskovich/.config/zwift/colin-oraskovich-config ]]
+ [[ ! -z '' ]]
+ WINDOW_MANAGER=Other
+ IMAGE=docker.io/netbrain/zwift
+ VERSION=latest
+ NETWORKING=bridge
++ id -u
+ ZWIFT_UID=1000
++ id -g
+ ZWIFT_GID=1000
+ '[' '!' ']'
++ command -v podman
+ '[' -x '' ']'
+ CONTAINER_TOOL=docker
+ '[' docker == podman ']'
+ LOCAL_UID=1000
+ CONTAINER_UID=1000
+ CONTAINER_GID=1000
+ case "$XDG_SESSION_TYPE" in
+ WINDOW_MANAGER=Wayland
+ '[' Wayland = Wayland ']'
+ '[' -z ']'
+ WINDOW_MANAGER=XWayland
++ id -u
+ '[' 1000 -ne 1000 ']'
+ [[ ! -n '' ]]
++ curl -s https://raw.githubusercontent.com/netbrain/zwift/master/zwift.sh
++ sha256sum
++ awk '{print $1}'
+ REMOTE_SUM=a0da3674ec3747fa5ddc88556d3d806c6ef4f525081daa9b9134c9e7bbcee7a7
++ sha256sum /usr/local/bin/zwift
++ awk '{print $1}'
+ THIS_SUM=a0da3674ec3747fa5ddc88556d3d806c6ef4f525081daa9b9134c9e7bbcee7a7
+ '[' a0da3674ec3747fa5ddc88556d3d806c6ef4f525081daa9b9134c9e7bbcee7a7 = a0da3674ec3747fa5ddc88556d3d806c6ef4f525081daa9b9134c9e7bbcee7a7 ']'
+ echo 'You are running latest zwift.sh 👏'
You are running latest zwift.sh 👏
+ [[ ! -n '' ]]
+ docker pull docker.io/netbrain/zwift:latest
latest: Pulling from netbrain/zwift
d0ff64f777c1: Download complete 
Digest: sha256:c158da7fb55b1b1c21a6633e10914726eb8dc8ab0755ce1bc80b74f61cd8cafb
Status: Downloaded newer image for netbrain/zwift:latest
docker.io/netbrain/zwift:latest

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview docker.io/netbrain/zwift:latest
+ GENERAL_FLAGS=(--rm --privileged --network $NETWORKING --name zwift-$USER --security-opt label=disable --hostname $HOSTNAME -e DISPLAY=$DISPLAY -e ZWIFT_UID=$CONTAINER_UID -e ZWIFT_GID=$CONTAINER_GID -e PULSE_SERVER=/run/user/$CONTAINER_UID/pulse/native -v zwift-$USER:/home/user/.wine/drive_c/users/user/Documents/Zwift -v /run/user/$LOCAL_UID/pulse:/run/user/$CONTAINER_UID/pulse)
+ [[ -f /proc/driver/nvidia/version ]]
+ VGA_DEVICE_FLAG=--device=/dev/dri:/dev/dri
+ [[ -n unix:path=/run/user/1000/bus ]]
+ [[ unix:path=/run/user/1000/bus =~ ^unix:path=([^,]+) ]]
+ DBUS_UNIX_SOCKET=/run/user/1000/bus
+ [[ -n /run/user/1000/bus ]]
+ DBUS_CONFIG_FLAGS=(-e DBUS_SESSION_BUS_ADDRESS=$(echo $DBUS_SESSION_BUS_ADDRESS | sed 's/'$LOCAL_UID'/'$CONTAINER_UID'/') -v $DBUS_UNIX_SOCKET:$(echo $DBUS_UNIX_SOCKET | sed 's/'$LOCAL_UID'/'$CONTAINER_UID'/'))
++ echo unix:path=/run/user/1000/bus
++ sed s/1000/1000/
++ echo /run/user/1000/bus
++ sed s/1000/1000/
+ [[ '' -eq 1 ]]
+ ZWIFT_FG_FLAG=(-d)
+ '[' XWayland == Wayland ']'
+ '[' XWayland == XWayland ']'
+ '[' -z /run/user/1000/.mutter-Xwaylandauth.L7KWX2 ']'
+ WM_FLAGS=(-e XAUTHORITY=$(echo $XAUTHORITY | sed 's/'$LOCAL_UID'/'$CONTAINER_UID'/') -v /tmp/.X11-unix:/tmp/.X11-unix -v $XAUTHORITY:$(echo $XAUTHORITY | sed 's/'$LOCAL_UID'/'$CONTAINER_UID'/'))
++ echo /run/user/1000/.mutter-Xwaylandauth.L7KWX2
++ sed s/1000/1000/
++ echo /run/user/1000/.mutter-Xwaylandauth.L7KWX2
++ sed s/1000/1000/
+ '[' XWayland == XOrg ']'
+ '[' docker == podman ']'
++ docker run --rm --privileged --network bridge --name zwift-colin-oraskovich --security-opt label=disable --hostname colin-oraskovich-B650M-GAMING-PLUS-WIFI -e DISPLAY=:0 -e ZWIFT_UID=1000 -e ZWIFT_GID=1000 -e PULSE_SERVER=/run/user/1000/pulse/native -v zwift-colin-oraskovich:/home/user/.wine/drive_c/users/user/Documents/Zwift -v /run/user/1000/pulse:/run/user/1000/pulse -d --device=/dev/dri:/dev/dri -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus -v /run/user/1000/bus:/run/user/1000/bus -e XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.L7KWX2 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/.mutter-Xwaylandauth.L7KWX2:/run/user/1000/.mutter-Xwaylandauth.L7KWX2 docker.io/netbrain/zwift:latest
+ CONTAINER=2d203e5c41258d08b789914d9bd37b8e68102e90597f2ea9fc8c483ad1a00f9a
+ '[' 0 -ne 0 ']'
++ command -v xhost
+ '[' -x /usr/bin/xhost ']'
+ '[' -z ']'
++ docker inspect '--format={{ .Config.Hostname  }}' 2d203e5c41258d08b789914d9bd37b8e68102e90597f2ea9fc8c483ad1a00f9a
+ xhost +local:colin-oraskovich-B650M-GAMING-PLUS-WIFI
non-network local connections being added to access control list

@netbrain
Copy link
Owner

netbrain commented Dec 6, 2024

So this is the important part:

docker run 
--rm 
--privileged 
--network bridge 
--name zwift-colin-oraskovich 
--security-opt label=disable 
--hostname colin-oraskovich-B650M-GAMING-PLUS-WIFI 
-e DISPLAY=:0 
-e ZWIFT_UID=1000 
-e ZWIFT_GID=1000 
-e PULSE_SERVER=/run/user/1000/pulse/native 
-v zwift-colin-oraskovich:/home/user/.wine/drive_c/users/user/Documents/Zwift 
-v /run/user/1000/pulse:/run/user/1000/pulse 
-d 
--device=/dev/dri:/dev/dri 
-e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus 
-v /run/user/1000/bus:/run/user/1000/bus 
-e XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.L7KWX2 
-v /tmp/.X11-unix:/tmp/.X11-unix 
-v /run/user/1000/.mutter-Xwaylandauth.L7KWX2:/run/user/1000/.mutter-Xwaylandauth.L7KWX2 
docker.io/netbrain/zwift:latest

From here i can see that it tries to mount a volume with the flag: -v zwift-colin-oraskovich:/home/user/.wine/drive_c/users/user/Documents/Zwift

So i suspect that it's failing to do this for some reason. Why don't you try setting this to

-v /tmp/zwift-test:/home/user/.wine/drive_c/users/user/Documents/Zwift

and see what happens?

@Rasky26
Copy link

Rasky26 commented Dec 7, 2024

I ran the command (consolidated):
docker run --rm --privileged --network bridge --name zwift-colin-oraskovich --security-opt label=disable --hostname colin-oraskovich-B650M-GAMING-PLUS-WIFI -e DISPLAY=:0 -e ZWIFT_UID=1000 -e ZWIFT_GID=1000 -e PULSE_SERVER=/run/user/1000/pulse/native -v /tmp/zwift-test:/home/user/.wine/drive_c/users/user/Documents/Zwift -v /run/user/1000/pulse:/run/user/1000/pulse -d --device=/dev/dri:/dev/dri -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus -v /run/user/1000/bus:/run/user/1000/bus -e XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.L7KWX2 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/.mutter-Xwaylandauth.L7KWX2:/run/user/1000/.mutter-Xwaylandauth.L7KWX2 docker.io/netbrain/zwift:latest

And that gave me this output:

e469ec230adb3bfb439964d591fa3d01e5a964a9e241ecbea833c83db13b3db0
docker: Error response from daemon: Mounts denied: 
The path /tmp/zwift-test is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.

Following that, I attempted to add the /tmp/zwift-test folder into my Docker environment following this recommendation, and upon restarting my terminal and running the command again it now only gave me the following output: 1c882ba79d43ff4fa2114a51c1cb60d816016f0975142461fb8ee25f15a06a21.

So that seems to be a success.

@netbrain
Copy link
Owner

netbrain commented Dec 7, 2024

Exactly what system are you on? Os and docker?

I don't think this has ever worked on docker desktop. So you should be using podman or docker-ce

@Rasky26
Copy link

Rasky26 commented Dec 7, 2024

OS: Ubuntu 24.04.1 LTS

Docker:

 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:40:59 2024
 OS/Arch:           linux/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.34.3 (170107)
 Engine:
  Version:          27.2.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.21.13
  Git commit:       3ab5c7d
  Built:            Tue Aug 27 14:15:15 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0```

@netbrain
Copy link
Owner

netbrain commented Dec 7, 2024

If I were you I'd try removing docker-desktop and then install docker-ce with

curl -fsSL https://get.docker.com -o get-docker.sh 
sh get-docker.sh

Afaik Zwift has never worked with docker desktop

@Rasky26
Copy link

Rasky26 commented Dec 8, 2024

Alright, switching away from the Docker Desktop environment and just using docker-ce fixed it and I'm up and running:
Screenshot from 2024-12-08 14-33-49

Two things:

  1. Thank you so much for helping to troubleshoot. I don't know if I would have ever realized that Docker Desktop was going to be the issue.
  2. I'm trying to wrack my memory to see if I remember any differences when running the zwift command, and I feel like I don't remember seeing the large 4.75Gb file extract when I was running it on Docker Desktop. (It downloaded the entire file, but I don't remember seeing it run the extract step, though I may be mis-remembering...).

Thanks again!

@netbrain
Copy link
Owner

netbrain commented Dec 8, 2024

For point 2 I can only assume your memory is at fault as all image layers needs to be extracted after download. 👍

Glad you got it working. 🤗

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

No branches or pull requests

4 participants