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

cannot create directory '/app/fyne-cross/bin/windows-amd64': Permission denied #201

Open
PaulWaldo opened this issue Aug 18, 2023 · 81 comments · Fixed by #203 or #208
Open

cannot create directory '/app/fyne-cross/bin/windows-amd64': Permission denied #201

PaulWaldo opened this issue Aug 18, 2023 · 81 comments · Fixed by #203 or #208

Comments

@PaulWaldo
Copy link

Describe the bug:

Trying to create a cross-compile build fails early with permission errors

To Reproduce:

Steps to reproduce the behaviour:

  1. Run any fyne-cross command
  2. See error could not create the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1

Example code:

Device and debug info (please complete the following information):

Device info
  • OS: Linux
  • Version: Ubuntu 23.04 (running in VMWare on a macOS host)
  • Go version: go version go1.20.3 linux/amd64
  • fyne-cross version: v1.4.0
  • Fyne version: v2.3.5
Debug info
paul@kubuntu:~/src/personal/mastotool$ fyne-cross windows -debug -pull --no-cache
[i] Target: windows/amd64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"amd64", os:"windows", id:"windows-amd64", env:map[string]string{"CC":"zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "CXX":"zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "GOARCH":"amd64", "GOOS":"windows"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/home/paul/src/personal/mastotool", inContainer:"/app"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:windows"}, runner:(*command.localContainerEngine)(0xc0000a8090)}
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:windows
/usr/local/bin/docker pull docker.io/fyneio/fyne-cross-images:windows
windows: Pulling from fyneio/fyne-cross-images
Digest: sha256:6bec023193006495217fd8f8c9da305ed20865f3698bc6ce013bd0e49d89c795
Status: Image is up to date for fyneio/fyne-cross-images:windows
docker.io/fyneio/fyne-cross-images:windows

What's Next?
View summary of image vulnerabilities and recommendations → docker scout quickview docker.io/fyneio/fyne-cross-images:windows
[✓] Image is up to date
[i] Cleaning target directories...
/usr/local/bin/docker run --rm -t -w /app -v /home/paul/src/personal/mastotool:/app:z --platform linux/amd64 -u 1000:1000 --entrypoint fixuid -v /tmp/ssh-XXXXXXQKcu6A/agent.1448:/tmp/ssh-agent -e SSH_AUTH_SOCK=/tmp/ssh-agent -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=windows -e GOARCH=amd64 -e CC=zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows -e CXX=zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows docker.io/fyneio/fyne-cross-images:windows rm -rf /app/fyne-cross/bin/windows-amd64
fixuid: fixuid should only ever be used on development systems. DO NOT USE IN PRODUCTION
fixuid: runtime UID '1000' already matches container user 'docker' UID
fixuid: runtime GID '1000' already matches container group 'docker' GID
/usr/local/bin/docker run --rm -t -w /app -v /home/paul/src/personal/mastotool:/app:z --platform linux/amd64 -u 1000:1000 --entrypoint fixuid -v /tmp/ssh-XXXXXXQKcu6A/agent.1448:/tmp/ssh-agent -e SSH_AUTH_SOCK=/tmp/ssh-agent -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CC=zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows -e CXX=zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows -e GOOS=windows -e GOARCH=amd64 docker.io/fyneio/fyne-cross-images:windows mkdir -p /app/fyne-cross/bin/windows-amd64
fixuid: fixuid should only ever be used on development systems. DO NOT USE IN PRODUCTION
fixuid: runtime UID '1000' already matches container user 'docker' UID
fixuid: runtime GID '1000' already matches container group 'docker' GID
mkdir: cannot create directory '/app/fyne-cross/bin/windows-amd64': Permission denied
[✗] could not create the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1

@Bluebugs
Copy link
Contributor

Could you try the develop branch of fyne-cross? Also by any chance, do you have any of the 'fyne-cross/bin/windows-amd64' path existing in your current project? And if yes, what are their owner?

@PaulWaldo
Copy link
Author

@Bluebugs same result with develop branch.
If I understand your path question properly, I don't think so.

paul@kubuntu:~/src/personal/mastotool$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/paul/go/bin

@Bluebugs
Copy link
Contributor

I meant for the path inside your repository. If there is a fyne-cross one and the access right/ owner name sense and same for all the sub directory.

@PaulWaldo
Copy link
Author

Ah, I see @Bluebugs. Here you go:

paul@kubuntu:~/src/personal/mastotool$ fyne-cross windows
[i] Target: windows/amd64
[i] Cleaning target directories...
mkdir: cannot create directory '/app/fyne-cross/bin/windows-amd64': Permission denied
[✗] could not create the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1
paul@kubuntu:~/src/personal/mastotool$ ls -lR fyne-cross
fyne-cross:
total 12
drwxr-xr-x 2 paul paul 4096 Aug 17 16:39 bin
drwxr-xr-x 2 paul paul 4096 Aug 17 16:39 dist
drwxr-xr-x 2 paul paul 4096 Aug 17 16:39 tmp

fyne-cross/bin:
total 0

fyne-cross/dist:
total 0

fyne-cross/tmp:
total 0

paul@kubuntu:~/src/personal/mastotool$ id
uid=1000(paul) gid=1000(paul) groups=1000(paul),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),133(lxd),134(sambashare)

@bogdanciuca
Copy link

bogdanciuca commented Aug 19, 2023

Am getting something similar (host is MacOS).

[i] Target: windows/amd64
[i] Cleaning target directories...
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.Ll0aUQ4a1W/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.Ll0aUQ4a1W/Listeners: operation not supported.
[✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 125

@PaulWaldo
Copy link
Author

Am getting something similar, but on MacOS.

[i] Target: windows/amd64
[i] Cleaning target directories...
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.Ll0aUQ4a1W/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.Ll0aUQ4a1W/Listeners: operation not supported.
[✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 125

@bogdanciuca I got around this by allowing my host's /tmp folder to be mounted by Docker. It feels slimy and probably not the most secure thing to do...

@Bluebugs
Copy link
Contributor

I have to look at the detail, but that last error is related to access to the ssh agent to propagate ssh key for go to download private module. What exactly did you do to make it work?

@PaulWaldo
Copy link
Author

@Bluebugs, I apologize for my tardy response. Life has gotten the better of me...
I am using Docker Desktop on macOS, so this is what I did
CleanShot 2023-08-24 at 16 38 50@2x

@Bluebugs
Copy link
Contributor

@bogdanciuca would you mind checking if this also solve your issue? If so, I think the problem is with the propagation of the ssh agent access for private repository. Will have to figure a way to detect this configuration in docker.

@bogdanciuca
Copy link

@PaulWaldo thanks for the tip, but it looks like I have the same file sharing settings as you.

@Bluebugs Doesn't seem so. Also, I'm not using any other private repo (except the one being built).

@Bluebugs
Copy link
Contributor

I think there is something going with docker for Mac in this configuration. Good news, I can reproduce, but I don't know what is going on yet.

@PaulWaldo
Copy link
Author

@Bluebugs any ideas on the original error could not create the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1? I also see @bogdanciuca's problem for the other platforms

❯ fyne-cross linux
[i] Target: linux/amd64
[i] Cleaning target directories...
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.aUlAu9fgDk/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.aUlAu9fgDk/Listeners: operation not supported.
[✗] could not clean the "temp" dir /app/fyne-cross/tmp/linux-amd64: exit status 125
❯ fyne-cross darwin -app-id xyzzy
[i] Target: darwin/amd64
[i] Cleaning target directories...
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.aUlAu9fgDk/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.aUlAu9fgDk/Listeners: operation not supported.
[✗] could not clean the "temp" dir /app/fyne-cross/tmp/darwin-amd64: exit status 125

@Bluebugs
Copy link
Contributor

When you say other platform, do you mean using fyne-cross on a different host os or using it to target a different os? If the latter, it will not be surprising as it should affect all target.

@bogdanciuca
Copy link

@Bluebugs Let me know if you'd prefer to track my problem in a separate git issue.

@PaulWaldo
Copy link
Author

@Bluebugs i meant targeting different platforms. I only have Macs.

@Bluebugs
Copy link
Contributor

In that case it is likely the same problem.

@Bluebugs
Copy link
Contributor

I finally figured out what, at least with ssh-agent, is going on. Hopefully once I have that in a PR it will fix the other problem. Basically on MacOS, the container run in a VM and so can't access directly the SSH_AUTH_SOCK of the host. Docker decided to do an automatic dark magic by having a magic path in the VM: /run/host-services/ssh-auth.sock whenever the host has a ssh agent running. This path is hard coded and will magically work. So the logic for darwin host is to use that path when a SSH_AUTH_SOCK is present instead of the content of SSH_AUTH_SOCK.

@PaulWaldo
Copy link
Author

Excellent find @Bluebugs. I'll be happy to test when available.
Docker on macOS does do black magic like that sometimes 🤨

@Bluebugs Bluebugs mentioned this issue Aug 26, 2023
2 tasks
@Bluebugs
Copy link
Contributor

If you guys don't mind testing #203 to see if that solve your issues.

@PaulWaldo
Copy link
Author

@Bluebugs I have good news and bad news. It looks like your fixed resolved this specific issue 👍:

❯ fyne-cross windows -app-id com.example.myapp
[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64
[i] Checking for go.mod: /Users/paul/src/personal/mastotool/go.mod
[✓] go.mod found
[i] Packaging app...
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1

So, it gets further, but the end-to-end process is still failing. Should I create a separate Issue for the buildvcs problem?

FYI, I noticed that your PR had a CI failure, probably transient:
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/fyneio/fyne-cross-images/manifests/web": received unexpected HTTP status: 503 Service Unavailable.

@Bluebugs
Copy link
Contributor

That's an interesting progress. We got report of that issue about buildvcs by other. That one is a different problem and I need to just generate new image. Will try to do that today.

@PaulWaldo
Copy link
Author

That was me on Slack 🤓

@Bluebugs
Copy link
Contributor

Bluebugs commented Sep 1, 2023

I have released a new version of fyne-cross-image that should address your buildvcs error. Let me know if things are working with fyne-cross developer branch and the latest fyne-cross-image.

@Crocmagnon
Copy link

Crocmagnon commented Sep 2, 2023

Hello, I use macOS and faced the same issues (docker: Error response from daemon: error while creating mount source path). I can confirm that fyne-cross's develop branch and the latest images fixed the issue, without having to add /tmp to shared folder in Docker Desktop settings.

Logs
❯ fyne-cross linux -arch='*'
[i] Target: linux/amd64
[i] Cleaning target directories...
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/linux-amd64
[✓] "bin" dir cleaned: /app/fyne-cross/bin/linux-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/linux-amd64
[i] Checking for go.mod: /Users/gaugendre/Projects/fyne-test/go.mod
[✓] go.mod found
[i] Packaging app...
[✓] Package: "/Users/gaugendre/Projects/fyne-test/fyne-cross/dist/linux-amd64/fyne-test.tar.xz"
[i] Target: linux/386
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/linux-386
[✓] "dist" dir cleaned: /app/fyne-cross/dist/linux-386
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/linux-386
[i] Checking for go.mod: /Users/gaugendre/Projects/fyne-test/go.mod
[✓] go.mod found
[i] Packaging app...
[✓] Package: "/Users/gaugendre/Projects/fyne-test/fyne-cross/dist/linux-386/fyne-test.tar.xz"
[i] Target: linux/arm
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /app/fyne-cross/dist/linux-arm
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/linux-arm
[✓] "bin" dir cleaned: /app/fyne-cross/bin/linux-arm
[i] Checking for go.mod: /Users/gaugendre/Projects/fyne-test/go.mod
[✓] go.mod found
[i] Packaging app...
[✓] Package: "/Users/gaugendre/Projects/fyne-test/fyne-cross/dist/linux-arm/fyne-test.tar.xz"
[i] Target: linux/arm64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/linux-arm64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/linux-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/linux-arm64
[i] Checking for go.mod: /Users/gaugendre/Projects/fyne-test/go.mod
[✓] go.mod found
[i] Packaging app...
[✓] Package: "/Users/gaugendre/Projects/fyne-test/fyne-cross/dist/linux-arm64/fyne-test.tar.xz"

❯ fyne-cross windows -app-id com.example.fyne-test
[i] Target: windows/arm64
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-arm64
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-arm64
[i] Checking for go.mod: /Users/gaugendre/Projects/fyne-test/go.mod
[✓] go.mod found
[i] Packaging app...
  adding: fyne-test.exe (deflated 49%)
[✓] Package: "/Users/gaugendre/Projects/fyne-test/fyne-cross/dist/windows-arm64/fyne-test.exe.zip"

@PaulWaldo
Copy link
Author

Sorry @Bluebugs, still the same problem:

❯ go get -u github.com/fyne-io/fyne-cross@develop
go: downloading github.com/fyne-io/fyne-cross v1.4.1-0.20230830175225-aac9d4e73d9e
go: downloading github.com/aws/aws-sdk-go v1.45.2
go: downloading k8s.io/kube-openapi v0.0.0-20230901164831-6c774f458599
go: upgraded github.com/aws/aws-sdk-go v1.44.332 => v1.45.2
go: upgraded github.com/fyne-io/fyne-cross v1.4.0 => v1.4.1-0.20230830175225-aac9d4e73d9e
go: upgraded k8s.io/kube-openapi v0.0.0-20230816210353-14e408962443 => v0.0.0-20230901164831-6c774f458599
❯ fyne-cross windows -app-id com.example.myapp -pull
[i] Target: windows/amd64
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:windows
[✓] Image is up to date
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64
[i] Checking for go.mod: /Users/paul/src/personal/mastotool/go.mod
[✓] go.mod found
[i] Packaging app...
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1

@Crocmagnon
Copy link

@PaulWaldo have you tried clearing the local docker image to make sure it downloads the latest one?

@Bluebugs
Copy link
Contributor

Bluebugs commented Sep 2, 2023

Yeah, it seems to says in your log that it didn't download any image.

@bogdanciuca
Copy link

bogdanciuca commented Sep 2, 2023

@Bluebugs Sorry, I was away for over a week now, just got home and gave it a try:

2023/09/02 20:17:08 Fyne error:  Failed to inject metadata init file, omitting metadata
2023/09/02 20:17:08   Cause: exit status 1
2023/09/02 20:17:08   At: /go/pkg/mod/fyne.io/fyne/v2@v2.3.5/cmd/fyne/internal/commands/build.go:215
go: errors parsing go.mod:
/app/go.mod:3: invalid go version '1.21.0': must match format 1.23

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1

After updating go.mod to use the old versioning, I got the same error as @PaulWaldo :

error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1

It's worth mentioning that I have deleted the local docker image (forcing a fresh pull), cloned the repo, built the binary from the develop branch and ran it. Am I missing something?

@Bluebugs
Copy link
Contributor

Bluebugs commented Sep 2, 2023

@bogdanciuca what is your host os?

@PaulWaldo
Copy link
Author

@Bluebugs sorry for the late response, but I did try Podman. I got the same results

❯ unset SSH_AUTH_SOCK
❯ fyne-cross version
fyne-cross version v1.4.0
❯ fyne-cross darwin -pull -app-id abc123
[i] Target: darwin/amd64
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:darwin
[✓] Image is up to date
[i] Cleaning target directories...
unable to upgrade to tcp, received 409
[✗] could not clean the "bin" dir /app/fyne-cross/bin/darwin-amd64: exit status 1
❯ fyne-cross darwin -pull -app-id abc123 -engine podman
[i] Target: darwin/amd64
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:darwin
[✓] Image is up to date
[i] Cleaning target directories...
Error: preparing container 0b8b69aa9e181286d6ff63c60c562bb268ef214b1bfd44acb8aa275fdcf1f16d for attach: lsetxattr /Users/paul/src/personal/mastotool/.git: operation not supported
[✗] could not clean the "bin" dir /app/fyne-cross/bin/darwin-amd64: exit status 126

Not only does it fail on my Mac, but it also fails on the Github Action

2023-09-22T13:47:23.3782560Z ##[group]Run brew install podman
2023-09-22T13:47:23.3783450Z �[36;1mbrew install podman�[0m
2023-09-22T13:47:23.3783800Z �[36;1mpodman machine init�[0m
2023-09-22T13:47:23.3784280Z �[36;1mpodman machine start�[0m
2023-09-22T13:47:23.3981730Z shell: /bin/bash -e {0}
2023-09-22T13:47:23.3982210Z ##[endgroup]
2023-09-22T13:47:32.3909580Z �[34m==>�[0m �[1mDownloading https://ghcr.io/v2/homebrew/core/podman/manifests/4.6.2�[0m
2023-09-22T13:47:33.3031450Z �[32m==>�[0m �[1mFetching �[32mpodman�[39m�[0m
2023-09-22T13:47:33.3133400Z �[34m==>�[0m �[1mDownloading https://ghcr.io/v2/homebrew/core/podman/blobs/sha256:799b17ef0f6d03deb70c22b87dc134e544ac6ceea382a363bd78de46f40a94b7�[0m
2023-09-22T13:47:34.1959840Z �[34m==>�[0m �[1mPouring podman--4.6.2.monterey.bottle.tar.gz�[0m
2023-09-22T13:47:35.4047650Z �[34m==>�[0m �[1mCaveats�[0m
2023-09-22T13:47:35.4147910Z         In order to run containers locally, podman depends on a Linux kernel.
2023-09-22T13:47:35.4248230Z         One can be started manually using `podman machine` from this package.
2023-09-22T13:47:35.4349770Z         To start a podman VM automatically at login, also install the cask
2023-09-22T13:47:35.4450020Z         "podman-desktop".
2023-09-22T13:47:35.4549870Z 
2023-09-22T13:47:35.4651050Z Bash completion has been installed to:
2023-09-22T13:47:35.4734860Z   /usr/local/etc/bash_completion.d
2023-09-22T13:47:35.4822790Z �[34m==>�[0m �[1mSummary�[0m
2023-09-22T13:47:35.4898680Z 🍺  /usr/local/Cellar/podman/4.6.2: 190 files, 55.5MB
2023-09-22T13:47:51.3901680Z Extracting compressed file
2023-09-22T13:48:40.5287930Z Image resized.
2023-09-22T13:48:40.5310470Z Machine init complete
2023-09-22T13:48:40.5313180Z To start your machine run:
2023-09-22T13:48:40.5313450Z 
2023-09-22T13:48:40.5313630Z 	podman machine start
2023-09-22T13:48:40.5313820Z 
2023-09-22T13:48:40.5856810Z Starting machine "podman-machine-default"
2023-09-22T13:48:41.1043680Z Waiting for VM ...
2023-09-22T13:50:24.0198970Z Mounting volume... /Users:/Users
2023-09-22T13:50:25.8722610Z Mounting volume... /private:/private
2023-09-22T13:50:27.3354520Z Mounting volume... /var/folders:/var/folders
2023-09-22T13:50:29.0683390Z 
2023-09-22T13:50:29.0718780Z This machine is currently configured in rootless mode. If your containers
2023-09-22T13:50:29.0732360Z require root permissions (e.g. ports < 1024), or if you run into compatibility
2023-09-22T13:50:29.0733730Z issues with non-podman clients, you can switch using the following command: 
2023-09-22T13:50:29.0735720Z 
2023-09-22T13:50:29.0736410Z 	podman machine set --rootful
2023-09-22T13:50:29.0737000Z 
2023-09-22T13:50:29.0737740Z API forwarding listening on: /Users/runner/.local/share/containers/podman/machine/qemu/podman.sock
2023-09-22T13:50:29.0741000Z 
2023-09-22T13:50:29.0741680Z The system helper service is not installed; the default Docker API socket
2023-09-22T13:50:29.0742930Z address can't be used by podman. If you would like to install it run the
2023-09-22T13:50:29.0769890Z following commands:
2023-09-22T13:50:29.0772250Z 
2023-09-22T13:50:29.0776580Z 	sudo /usr/local/Cellar/podman/4.6.2/bin/podman-mac-helper install
2023-09-22T13:50:29.0777540Z 	podman machine stop; podman machine start
2023-09-22T13:50:29.0777860Z 
2023-09-22T13:50:29.0778450Z You can still connect Docker API clients by setting DOCKER_HOST using the
2023-09-22T13:50:29.0778870Z following command in your terminal session:
2023-09-22T13:50:29.0779080Z 
2023-09-22T13:50:29.0779950Z 	export DOCKER_HOST='unix:///Users/runner/.local/share/containers/podman/machine/qemu/podman.sock'
2023-09-22T13:50:29.0780310Z 
2023-09-22T13:50:29.0780750Z Machine "podman-machine-default" started successfully
2023-09-22T13:50:29.0837010Z ##[group]Run fyne-cross \
2023-09-22T13:50:29.0837360Z �[36;1mfyne-cross \�[0m
2023-09-22T13:50:29.0837630Z �[36;1m  darwin \�[0m
2023-09-22T13:50:29.0837880Z �[36;1m   \�[0m
2023-09-22T13:50:29.0838100Z �[36;1m  -name mastotool \�[0m
2023-09-22T13:50:29.0838540Z �[36;1m  -app-id com.github.PaulWaldo.mastotool�[0m
2023-09-22T13:50:29.0838860Z �[36;1m�[0m
2023-09-22T13:50:29.0839070Z �[36;1mls -lR�[0m
2023-09-22T13:50:29.1060190Z shell: /bin/bash -e {0}
2023-09-22T13:50:29.1060530Z ##[endgroup]
2023-09-22T13:50:29.2984500Z [i] Target: darwin/amd64
2023-09-22T13:50:29.2985900Z [i] Cleaning target directories...
2023-09-22T13:50:29.6649000Z Trying to pull docker.io/fyneio/fyne-cross-images:darwin...
2023-09-22T13:50:30.3657640Z Getting image source signatures
2023-09-22T13:50:30.3788610Z Copying blob sha256:14726c8f78342865030f97a8d3492e2d1a68fbd22778f9a31dc6be4b4f12a9bc
2023-09-22T13:50:30.3789870Z Copying blob sha256:9c368a637512fb8b34c662dffdd52dc718c40e39148b4fb1a3e11e055cdb47c2
2023-09-22T13:50:30.3804160Z Copying blob sha256:67cc0f803d06379b8a3c2faeb564b16da15c636bb4f5c57923d4044e90f0f572
2023-09-22T13:50:30.3821500Z Copying blob sha256:0f97dc54b8ddb06010cf5cc586cb1c562753390ee3709268848b67e6af75f722
2023-09-22T13:50:30.3851540Z Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
2023-09-22T13:50:30.3912890Z Copying blob sha256:0d7accad1951a57a3ec91aba2492fb9fd075e32f05c345f548c7ba8f122fcf33
2023-09-22T13:50:30.8368730Z Copying blob sha256:b092e14c51c5dbf2e5056aeee24f732ee612c4f8a14d1c5c2e0cc4be20d46491
2023-09-22T13:50:30.8571780Z Copying blob sha256:b36fd807c86f51ec598887c31121cab3b28c70c699fefb3e981a65ebb2164201
2023-09-22T13:50:32.1958910Z Copying blob sha256:088494f09b79e86b1bfcd2564d9d322afd650c9bc601bffef83478134027f9c0
2023-09-22T13:50:38.3944480Z Copying blob sha256:820d3c100cd8d530f544df6f4a5c7bb865950e21c02ac96e7173d19c494dcee5
2023-09-22T13:50:39.8298620Z Copying blob sha256:c420e5fe046eb1f5b6921f1553428f4f17f1606f49bd4c0d21f7a88b27550743
2023-09-22T13:50:41.7521360Z Copying blob sha256:e8079da3a2fdcfdf7911632e8999b3939ebc73af6a0e6612fef23478d34984eb
2023-09-22T13:54:45.4622670Z Copying config sha256:7d1d63f6687d801ccbe413e01cb432190135448b7cfe3e5edf62ee0dc2c4568b
2023-09-22T13:54:45.4908910Z Writing manifest to image destination
2023-09-22T13:54:45.6198760Z Error: statfs /private/tmp/com.apple.launchd.1YjY7dhatT/Listeners: operation not supported
2023-09-22T13:54:45.6200080Z [✗] could not clean the "dist" dir /app/fyne-cross/dist/darwin-amd64: exit status 125
2023-09-22T13:54:45.6225550Z ##[error]Process completed with exit code 1.
2023-09-22T13:54:45.6367740Z Post job cleanup.

@Bluebugs
Copy link
Contributor

@PaulWaldo very interesting. The podman error seems to point to this issue: containers/podman#19132 . What is your file system? Does that make sense as an explanation?

it seems that your github action is exposing a ssh agent that is troubling fyne-cross. Can you share a link to it or the yaml for it?

@Bluebugs
Copy link
Contributor

Oh and can you post the debug run of podman on your machine too?

@PaulWaldo
Copy link
Author

@Bluebugs here is the link to the action: https://github.com/PaulWaldo/mastotool/blob/feature/releaser/.github/workflows/release.yml.
Note it is still a work in progress, hence the feature branch

@PaulWaldo
Copy link
Author

@Bluebugs here is the podman debug output

❯ fyne-cross windows -app-id com.example.myapp -pull -debug -engine podman
[i] Target: windows/amd64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"amd64", os:"windows", id:"windows-amd64", env:map[string]string{"CC":"zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "CXX":"zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "GOARCH":"amd64", "GOOS":"windows"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/Users/paul/src/personal/mastotool", inContainer:"/app"}, command.containerMountPoint{name:"cache", localHost:"/Users/paul/Library/Caches/fyne-cross", inContainer:"/go"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:windows"}, runner:(*command.localContainerEngine)(0xc0000da090)}
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:windows
/usr/local/bin/podman pull docker.io/fyneio/fyne-cross-images:windows
Trying to pull docker.io/fyneio/fyne-cross-images:windows...
Getting image source signatures
Copying blob sha256:0d7accad1951a57a3ec91aba2492fb9fd075e32f05c345f548c7ba8f122fcf33
Copying blob sha256:14726c8f78342865030f97a8d3492e2d1a68fbd22778f9a31dc6be4b4f12a9bc
Copying blob sha256:9c368a637512fb8b34c662dffdd52dc718c40e39148b4fb1a3e11e055cdb47c2
Copying blob sha256:67cc0f803d06379b8a3c2faeb564b16da15c636bb4f5c57923d4044e90f0f572
Copying blob sha256:0f97dc54b8ddb06010cf5cc586cb1c562753390ee3709268848b67e6af75f722
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:b092e14c51c5dbf2e5056aeee24f732ee612c4f8a14d1c5c2e0cc4be20d46491
Copying blob sha256:b36fd807c86f51ec598887c31121cab3b28c70c699fefb3e981a65ebb2164201
Copying blob sha256:088494f09b79e86b1bfcd2564d9d322afd650c9bc601bffef83478134027f9c0
Copying blob sha256:820d3c100cd8d530f544df6f4a5c7bb865950e21c02ac96e7173d19c494dcee5
Copying blob sha256:c420e5fe046eb1f5b6921f1553428f4f17f1606f49bd4c0d21f7a88b27550743
Copying config sha256:1e3d0da6428d4a46df420175ccb189ec7114934f3e2183900d6c7af3d24ba484
Writing manifest to image destination
1e3d0da6428d4a46df420175ccb189ec7114934f3e2183900d6c7af3d24ba484
[✓] Image is up to date
[i] Cleaning target directories...
/usr/local/bin/podman run --rm -t -w /app -v /Users/paul/src/personal/mastotool:/app:z -v /Users/paul/Library/Caches/fyne-cross:/go:z --userns keep-id -e use_podman=1 --arch=amd64 -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=windows -e GOARCH=amd64 -e CC=zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows -e CXX=zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows docker.io/fyneio/fyne-cross-images:windows rm -rf /app/fyne-cross/bin/windows-amd64
Error: preparing container 75aec2439bebdea44a654f4bc971da198bd081ca467dbc7d1a6400da7d358a76 for attach: lsetxattr /Users/paul/src/personal/mastotool/.git: operation not supported
[✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 126

Note that the reason I unset SSH_AUTH_SOCK is because I have 1Password managing my SSH key. If I don't do that I get this

❯ fyne-cross windows -app-id com.example.myapp -pull -debug -engine podman
[i] Target: windows/amd64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"amd64", os:"windows", id:"windows-amd64", env:map[string]string{"CC":"zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "CXX":"zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows", "GOARCH":"amd64", "GOOS":"windows"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/Users/paul/src/personal/mastotool", inContainer:"/app"}, command.containerMountPoint{name:"cache", localHost:"/Users/paul/Library/Caches/fyne-cross", inContainer:"/go"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:windows"}, runner:(*command.localContainerEngine)(0xc0000da090)}
[i] Checking for a newer version of the docker image: docker.io/fyneio/fyne-cross-images:windows
/usr/local/bin/podman pull docker.io/fyneio/fyne-cross-images:windows
Trying to pull docker.io/fyneio/fyne-cross-images:windows...
Getting image source signatures
Copying blob sha256:0d7accad1951a57a3ec91aba2492fb9fd075e32f05c345f548c7ba8f122fcf33
Copying blob sha256:14726c8f78342865030f97a8d3492e2d1a68fbd22778f9a31dc6be4b4f12a9bc
Copying blob sha256:9c368a637512fb8b34c662dffdd52dc718c40e39148b4fb1a3e11e055cdb47c2
Copying blob sha256:67cc0f803d06379b8a3c2faeb564b16da15c636bb4f5c57923d4044e90f0f572
Copying blob sha256:0f97dc54b8ddb06010cf5cc586cb1c562753390ee3709268848b67e6af75f722
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:b092e14c51c5dbf2e5056aeee24f732ee612c4f8a14d1c5c2e0cc4be20d46491
Copying blob sha256:b36fd807c86f51ec598887c31121cab3b28c70c699fefb3e981a65ebb2164201
Copying blob sha256:088494f09b79e86b1bfcd2564d9d322afd650c9bc601bffef83478134027f9c0
Copying blob sha256:820d3c100cd8d530f544df6f4a5c7bb865950e21c02ac96e7173d19c494dcee5
Copying blob sha256:c420e5fe046eb1f5b6921f1553428f4f17f1606f49bd4c0d21f7a88b27550743
Copying config sha256:1e3d0da6428d4a46df420175ccb189ec7114934f3e2183900d6c7af3d24ba484
Writing manifest to image destination
1e3d0da6428d4a46df420175ccb189ec7114934f3e2183900d6c7af3d24ba484
[✓] Image is up to date
[i] Cleaning target directories...
/usr/local/bin/podman run --rm -t -w /app -v /Users/paul/src/personal/mastotool:/app:z -v /Users/paul/Library/Caches/fyne-cross:/go:z --userns keep-id -e use_podman=1 --arch=amd64 -v /Users/paul/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock:/tmp/ssh-agent -e SSH_AUTH_SOCK=/tmp/ssh-agent -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=windows -e GOARCH=amd64 -e CC=zig cc -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows -e CXX=zig c++ -target x86_64-windows-gnu -Wdeprecated-non-prototype -Wl,--subsystem,windows docker.io/fyneio/fyne-cross-images:windows rm -rf /app/fyne-cross/bin/windows-amd64
Error: statfs /Users/paul/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock: operation not supported
[✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 125
❯ echo $SSH_AUTH_SOCK
/Users/paul/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock

@PaulWaldo
Copy link
Author

I don't know if it helps, but I see a little more debug info when attempting to run the workflow locally using https://github.com/nektos/act
The path /root/.cache/fyne-cross is not shared from the host and is not known to Docker.

| [i] Target: linux/amd64
| [i] Cleaning target directories...
| Unable to find image 'fyneio/fyne-cross-images:linux' locally
| linux: Pulling from fyneio/fyne-cross-images
14726c8f7834: Already exists 
9c368a637512: Already exists 
67cc0f803d06: Already exists 
0f97dc54b8dd: Already exists 
4f4fb700ef54: Already exists 
0d7accad1951: Already exists 
b092e14c51c5: Already exists 
b36fd807c86f: Already exists 
088494f09b79: Already exists 
820d3c100cd8: Already exists 
c420e5fe046e: Already exists 
a645cacff43e: Pull complete 
Digest: sha256:01904efd97a14445cb243e2b70257665fb91aaad539cf6a091d78998e0d4cca6
| Status: Downloaded newer image for fyneio/fyne-cross-images:linux
| docker: Error response from daemon: Mounts denied: 
| The path /root/.cache/fyne-cross 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/desktop/mac for more info.
| ERRO[0037] error waiting for container:                 
| [✗] could not clean the "bin" dir /app/fyne-cross/bin/linux-amd64: exit status 125
[Release/Create Artifacts]   ❌  Failure - Main Build MastoTool (linux, 1.21.x)
[Release/Create Artifacts] exitcode '1': failure

@Bluebugs
Copy link
Contributor

Oh, there is something interesting in the debug log regarding the access right. Apparently the z flag on the mounted volume is not supported on MacOs. I will look what that means and make a pr if possible.

@PaulWaldo
Copy link
Author

@Bluebugs that is good news. I wonder why that message had not been printed from fyne-cross?

@Bluebugs Bluebugs mentioned this issue Sep 27, 2023
2 tasks
@Bluebugs
Copy link
Contributor

If you guys could test PR #208 . Might work by doing a go install github.com/fyne-io/fyne-cross@afc530577482f11bb90e3baafc1edd4618a4fbb4 .

@PaulWaldo
Copy link
Author

Thanks @Bluebugs, but no luck running on macOS:

❯ go install github.com/fyne-io/fyne-cross@afc530577482f11bb90e3baafc1edd4618a4fbb4
go: downloading github.com/fyne-io/fyne-cross v1.4.1-0.20230927002342-afc530577482
❯ fyne-cross freebsd -name jhjh
[i] Target: freebsd/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/freebsd-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/freebsd-amd64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/freebsd-amd64
[i] Checking for go.mod: /Users/paul/src/personal/mastotool/go.mod
[✓] go.mod found
[i] Packaging app...
[!] Default icon not found at "Icon.png"
[✓] Created a placeholder icon using Fyne logo for testing purpose
go: downloading fyne.io/fyne/v2 v2.4.0
go: downloading golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
go: downloading golang.org/x/sys v0.12.0
go: downloading github.com/go-text/typesetting v0.0.0-20230803102845-24e03d8b5372
go: downloading github.com/yuin/goldmark v1.5.6
go: downloading golang.org/x/image v0.12.0
go: downloading fyne.io/systray v1.10.1-0.20230722100817-88df1e0ffa9a
go: downloading github.com/fyne-io/image v0.0.0-20230811065323-ed435dc8bca6
go: downloading github.com/go-text/render v0.0.0-20230619120952-35bccb6164b8
go: downloading golang.org/x/net v0.15.0
go: downloading golang.org/x/text v0.13.0
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1

❯ fyne-cross windows -name jhjh -app-id a.b.c
[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64
[i] Checking for go.mod: /Users/paul/src/personal/mastotool/go.mod
[✓] go.mod found
[i] Packaging app...
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1

On a positive note, the dir cleaning steps, which were like molasses, are now lightning fast.

@Bluebugs
Copy link
Contributor

Thanks @Bluebugs, but no luck running on macOS:

Was that with docker or podman?

@PaulWaldo
Copy link
Author

It was Docker. Previously Podman gave the same error.

@Bluebugs
Copy link
Contributor

Can you check with podman with that branch too? I am hoping there is a difference in behavior.

@PaulWaldo
Copy link
Author

Sorry @Bluebugs, on the mac I still get a failure with your branch

❯ fyne-cross freebsd -name jhjh -engine podman
[i] Target: freebsd/amd64
[i] Cleaning target directories...
Trying to pull docker.io/fyneio/fyne-cross-images:freebsd-amd64...
Getting image source signatures
Copying blob sha256:0d7accad1951a57a3ec91aba2492fb9fd075e32f05c345f548c7ba8f122fcf33
Copying blob sha256:14726c8f78342865030f97a8d3492e2d1a68fbd22778f9a31dc6be4b4f12a9bc
Copying blob sha256:9c368a637512fb8b34c662dffdd52dc718c40e39148b4fb1a3e11e055cdb47c2
Copying blob sha256:67cc0f803d06379b8a3c2faeb564b16da15c636bb4f5c57923d4044e90f0f572
Copying blob sha256:0f97dc54b8ddb06010cf5cc586cb1c562753390ee3709268848b67e6af75f722
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:b092e14c51c5dbf2e5056aeee24f732ee612c4f8a14d1c5c2e0cc4be20d46491
Copying blob sha256:b36fd807c86f51ec598887c31121cab3b28c70c699fefb3e981a65ebb2164201
Copying blob sha256:088494f09b79e86b1bfcd2564d9d322afd650c9bc601bffef83478134027f9c0
Copying blob sha256:820d3c100cd8d530f544df6f4a5c7bb865950e21c02ac96e7173d19c494dcee5
Copying blob sha256:c420e5fe046eb1f5b6921f1553428f4f17f1606f49bd4c0d21f7a88b27550743
Copying blob sha256:5f4c1d2a62658b5052836efa6f4fb2790c17b2f1fb7bad4f4626eaa8f2ebc6a1
Copying blob sha256:334ec8092f9ba07139e6400af3e15aec81476b6dc2217158b1b3e72c1ebc7959
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:408a9c73f1f306ca8e9841a5b1eb543525e4f77b37aec79fd6e125cc51e64e95
Copying blob sha256:a2cc62531bf2454a6a96340872257b43ba7cba288dfeb715cded4de400c56e33
Copying blob sha256:66351becc044af562e5dfb39470387ad3bc630f20566480759a1750fa48b8508
Copying config sha256:6b8147aadd7d4908baed32b40db121c671eaf26fd457107396fc65786ad87ea3
Writing manifest to image destination
Error: statfs /run/host-services/ssh-auth.sock: no such file or directory
[✗] could not clean the "bin" dir /app/fyne-cross/bin/freebsd-amd64: exit status 125

@Bluebugs
Copy link
Contributor

Oh, it seems that podman is using a different magic path for ssh-agent than docker. I will look into it.

@Bluebugs
Copy link
Contributor

According to containers/podman#14074 podman doesn't support ssh-agent forwarding at the moment on MacOS. I will do a PR to turn it on and document that.

@Bluebugs
Copy link
Contributor

Can you try with podman and my update PR: go install github.com/fyne-io/fyne-cross@8489955341f5c1ac230697afa86034444432830d ?

@af913337456
Copy link

same error, confuse me a fucking long time, @Bluebugs any solutions?

[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64
rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/bin': Permission denied
rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/dist': Permission denied
rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/tmp': Permission denied
[✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1

@af913337456
Copy link

same error, confuse me a fucking long time, @Bluebugs any solutions?

[i] Target: windows/amd64 [i] Cleaning target directories... [✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64 [✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64 rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/bin': Permission denied rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/dist': Permission denied rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/tmp': Permission denied [✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1

solved !

@Bluebugs
Copy link
Contributor

same error, confuse me a fucking long time, @Bluebugs any solutions?

[i] Target: windows/amd64 [i] Cleaning target directories... [✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64 [✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64 rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/bin': Permission denied rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/dist': Permission denied rm: cannot remove '/app/fyne-cross/bin/windows-amd64/fyne-cross/tmp': Permission denied [✗] could not clean the "bin" dir /app/fyne-cross/bin/windows-amd64: exit status 1

solved !

How did you get it solved?

@junmaqiang
Copy link

junmaqiang commented Oct 14, 2023

I use this code

go install github.com/fyne-io/fyne-cross@8489955341f5c1ac230697afa86034444432830d

show this error

[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-amd64
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-amd64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-amd64
[i] Checking for go.mod: /Users/go/src/go_project_template/go.mod
[✓] go.mod found
[i] Packaging app...
2023/10/14 16:13:24 Fyne error:  Failed to inject metadata init file, omitting metadata
2023/10/14 16:13:24   Cause: exit status 1
2023/10/14 16:13:24   At: /go/pkg/mod/fyne.io/fyne/v2@v2.3.5/cmd/fyne/internal/commands/build.go:215
go: errors parsing go.mod:
/app/go.mod:3: invalid go version '1.21.3': must match format 1.23

my env

Darwin x86_64
go version go1.21.3 darwin/amd64
fyne cli version: v2.4.0
fyne-cross version v1.4.1-0.20230929231344-8489955341f5
Docker version 24.0.6, build ed223bc

Special Instructions

①I executed git init
②The remote warehouse address was added, but it was just an invalid warehouse address added randomly.

Should parameters be passed at compile time?

@Bluebugs
Copy link
Contributor

@junmaqiang this looks like a different problem where fyne running inside the container doesn't have the right to create file in the current directory while the other are having an issue with accessing file inside the .git subdirectory for reading. If you do not mind creating a different issue for this.

@Bluebugs
Copy link
Contributor

I am finally able to reproduce the problem after updating an Intel Mac to latest docker. Something broke in the last 3 months in our use of docker. I will look through the release log of docker to see if I can get any clue.

@nnsay
Copy link

nnsay commented Nov 7, 2023

I am finally able to reproduce the problem after updating an Intel Mac to latest docker. Something broke in the last 3 months in our use of docker. I will look through the release log of docker to see if I can get any clue.

Thank you fix the bug but I find the fyne-cross-images images are old. Can you help to build and push newer images base on the new base image.
image

I build the fyneio/fyne-cross-images:windows in my local and run the fyne-cross windows, I find the result is still error:

[i] Target: windows/arm64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/windows-arm64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/windows-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/windows-arm64
[i] Checking for go.mod: /Users/wangjian/github/nnsay/aes-helper/go.mod
[✓] go.mod found
[i] Packaging app...
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

error building application: exit status 1
[✗] could not package the Fyne app: exit status 1
make: *** [build-win] Error 1

@nnsay
Copy link

nnsay commented Nov 8, 2023

After some testing, I found a way to way to resolve the error obtaining VCS status problem. The way is to remove or hide the .git folder when you package by fyne-cross. My test result look like below:

image

The above way is my remove way for the .git folder. Our source code will be copy to new folder but not .git.
My hide way for the .git is to refactor code base, for example put source files into some else folder but not root folder.

I find out that the .git will be volumed to the container, if do not send the .git folder to container, the fyne-cross package will work well.

@Bluebugs
Copy link
Contributor

With Apple last update, docker on my laptop got broken and I can not test/ reproduce this anymore. If anyone has time, the latest published fyne cross image should fix the problem reported here. Let me know if this work for you.

@Bluebugs
Copy link
Contributor

After a full reinstall of docker, I am not able to reproduce the problem with the latest image. I think this is finally solved.

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 a pull request may close this issue.

7 participants