-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Comments
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? |
@Bluebugs same result with 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 |
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. |
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) |
Am getting something similar (host is MacOS).
|
@bogdanciuca I got around this by allowing my host's |
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? |
@Bluebugs, I apologize for my tardy response. Life has gotten the better of me... |
@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. |
@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). |
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. |
@Bluebugs any ideas on the original error ❯ 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 |
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. |
@Bluebugs Let me know if you'd prefer to track my problem in a separate git issue. |
@Bluebugs i meant targeting different platforms. I only have Macs. |
In that case it is likely the same problem. |
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: |
Excellent find @Bluebugs. I'll be happy to test when available. |
If you guys don't mind testing #203 to see if that solve your issues. |
@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 FYI, I noticed that your PR had a CI failure, probably transient: |
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. |
That was me on Slack 🤓 |
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. |
Hello, I use macOS and faced the same issues ( Logs
|
Sorry @Bluebugs, still the same problem:
|
@PaulWaldo have you tried clearing the local docker image to make sure it downloads the latest one? |
Yeah, it seems to says in your log that it didn't download any image. |
@Bluebugs Sorry, I was away for over a week now, just got home and gave it a try:
After updating
It's worth mentioning that I have deleted the local docker image (forcing a fresh pull), cloned the repo, built the binary from the |
@bogdanciuca what is your host os? |
@Bluebugs sorry for the late response, but I did try Podman. I got the same results
Not only does it fail on my Mac, but it also fails on the Github Action
|
@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? |
Oh and can you post the debug run of podman on your machine too? |
@Bluebugs here is the link to the action: https://github.com/PaulWaldo/mastotool/blob/feature/releaser/.github/workflows/release.yml. |
@Bluebugs here is the podman debug output
Note that the reason I
|
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
|
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. |
@Bluebugs that is good news. I wonder why that message had not been printed from fyne-cross? |
If you guys could test PR #208 . Might work by doing a go install github.com/fyne-io/fyne-cross@afc530577482f11bb90e3baafc1edd4618a4fbb4 . |
Thanks @Bluebugs, but no luck running on macOS:
On a positive note, the dir cleaning steps, which were like molasses, are now lightning fast. |
Was that with docker or podman? |
It was Docker. Previously Podman gave the same error. |
Can you check with podman with that branch too? I am hoping there is a difference in behavior. |
Sorry @Bluebugs, on the mac I still get a failure with your branch
|
Oh, it seems that podman is using a different magic path for ssh-agent than docker. I will look into it. |
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. |
Can you try with podman and my update PR: |
same error, confuse me a fucking long time, @Bluebugs any solutions? [i] Target: windows/amd64 |
solved ! |
How did you get it solved? |
I use this code
show this error
my env
Special Instructions
Should parameters be passed at compile time? |
@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. |
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. |
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. |
After a full reinstall of docker, I am not able to reproduce the problem with the latest image. I think this is finally solved. |
Describe the bug:
Trying to create a cross-compile build fails early with permission errors
To Reproduce:
Steps to reproduce the behaviour:
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):
Debug info
The text was updated successfully, but these errors were encountered: