Hi, I’m trying to run this example in a raspberry pi 4 using ubuntu core 20, but after install ubuntu-frame and the super-cool-app snap, I only get the grey wallpaper from ubuntu-frame but no signal of the flutter app.
I added this to the snapcraft.yaml file to make the snap compatible with armhf architercture:
architectures:
- build-on: amd64
run-on: armhf
Also, when I run super-cool-app on the command line, I get this messages:
error: error running snapctl: snap "super-cool-app" has no plug or slot named "pulseaudio"
WARNING: pulseaudio interface not connected! Please run: /snap/super-cool-app/current/bin/setup.sh
/snap/super-cool-app/x2/bin/wayland-launch: 22: /snap/super-cool-app/x2/bin/wayland-launch: inotifywait: Exec format error
This does not do what you think it does. It builds and packages amd64 binaries and attempts to run them on armhf. (Spoiler alert: amd64 binaries are unsuitable for armhf.)
IIRC the Flutter toolchain supports amd64 and arm64 but not armhf.
There’s a good guide to developing GUI apps for Core here:
Hi @rickypid, I think this tutorial was written before the OSK was introduced and hasn’t yet been updated.
The first question to answer is whether Flutter supports zwp_text_input_v2 or zwp_text_input_v3. I don’t know the answer, so probably the easiest way to test this is try running your application without snap packaging as described in the first part of:
(Obviously you will also need to start the OSK in the testing environment for it to work.)
That will help identify where the problem lies.
[update]
The OSK does work with Flutter. Here’s an example:
I try to buil a snap with your example and recieived this error during install:
error: cannot perform the following tasks:
- Run install hook of "iot-example-graphical-snap" snap if present (run hook "install": cannot snap-exec: no such file or directory)
I did a lot of tests, keeping the folder structure you proposed in the example https://github.com/MirServer/iot-example-graphical-snap/tree/Flutter-demo, simply replacing the flutter application folder with my application . The build succeeds but during the installation I always get the same error:
error: cannot perform the following tasks:
- Run install hook of "iot-example-graphical-snap" snap if present (run hook "install": cannot snap-exec: no such file or directory)
Do you have any idea what it could be?
I have searched several forms and done many tests but without success.
That error isn’t very helpful in identifying what is missing. I’ve a vague memory of someone saying a reboot helped, but don’t have that to hand. Nor do I know why that would work.
You could also unpack the .snap with unsquashfs to see if the install script is corrupted.
I have unpack .snap with unsquashfs, the install hooks it’s ok:
$ cat squashfs-root/snap/hooks/install
#!/bin/sh
set -x
if [ "$(snapctl get daemon)" = "" ]
then
if grep -q -e snap_core= -e snapd_recovery_mode= /proc/cmdline
then snapctl set daemon=true
else snapctl set daemon=false
fi
fi