flutterpi_tool icon indicating copy to clipboard operation
flutterpi_tool copied to clipboard

incorrect file permissions for flutter-pi, engine binaries when building bundle

Open ardera opened this issue 1 year ago • 3 comments

Sometimes the flutter-pi binary and flutter engine lack the executable permission bit in the built bundle.

ardera avatar Jul 04 '24 08:07 ardera

I get this everytime when trying to run flutterpi_tool remotely from a windows machine to a RPi. Guessing it's because we are copying files from the windows machine over to the RPi and therefor loses the permission bit.

As a workaround I just threw together a script that I can continously run on my RPi that looks for changes in the /tmp folder and add +x to flutter_pi. Probably very hacky solution but it works for now.

If I continue to work on the RPi I might try to solve it in a better way but thought I would just share that this is a possibility. I don't feel very comfortable sharing and recommending this workaround since it's probably quite hacky but thought I would share that I used a workaround in case anyone else is stuck on this.

From my testing, when using verbose debugging I was able to take the exact commands that is being ran and run it locally. But when they are run over SSH then they fail without the +x permission bit on the file.

Update 2024-12-31

Interestingly I only noticed the consistent behaviour above on my Raspberry Pi Zero 2W. I just got a Raspberry Pi 5 and tested flutterpi_tool (exact same SD-card) and it works flawlessly.

tryy3 avatar Dec 18 '24 10:12 tryy3

@tryy3 I attempted to fix this some time ago with https://github.com/ardera/flutterpi_tool/commit/5453f53575d8fccd9bc067b818b1f12b13e04de6 (maybe you updated flutterpi_tool when trying the Pi 5?) but not sure that worked because I could never actually reproduce the problem myself 🤷‍♂️ I'll try on Windows.

ardera avatar Jan 13 '25 14:01 ardera

Hmm maybe, I think I installed the flutterpi_tool after that commit.

I'll try to boot up the RPi Zero again and see if I still get the issue, I did a lot of changes so could be multiple factors to what made it work flawlessly now.

tryy3 avatar Jan 14 '25 05:01 tryy3