Closed sgehrman closed 1 year ago
flatpak install flathub org.freedesktop.Sdk//21.08
add that step
Now getting this:
$ flatpak-builder --force-clean build-dir com.example.FlutterApp.json
(flatpak info:88614): WARNING : 16:44:02.412: Error unregistering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying error: org.freedesktop.Platform/x86_64/21.08 not installed Failed to init: Unable to find runtime org.freedesktop.Platform version 21.08
$ flatpak install flathub org.freedesktop.Platform
fixed it.
I'm a noob, but this might help the next person...
Now, how do I install this to test? no instructions.
$ flatpak run com.example.FlutterApp error: app/com.example.FlutterApp/x86_64/master not installed
ok, finally got it.
$ flatpak-builder --user --install --force-clean build-dir com.example.FlutterApp.json $ flatpak run com.example.FlutterApp
It runs, but I get this: Gtk-Message: 17:16:17.304: Failed to load module "canberra-gtk-module" Gtk-Message: 17:16:17.304: Failed to load module "canberra-gtk-module"
(flutter_flatpak_example:2): CRITICAL : 17:16:17.522: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found
(flutter_flatpak_example:2): CRITICAL : 17:16:17.524: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found
As mentioned in the README, Flatpak builds should be done in a reproducible environment like GitHub actions or Docker. Where are you trying to build from? Did you reference the linked example workflow?
Thank you @Merrit for providing this repo and thank you @sgehrman for adding those missing instructions.
In my case I am using Ubuntu and that's how I've built Flatpak executable:
sudo apt install flatpak flatpak-builder
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.freedesktop.Sdk//21.08
flatpak install flathub org.freedesktop.Platform
flatpak-builder --user --install --force-clean build-dir com.example.FlutterApp.json
flatpak run com.example.FlutterApp
I agree with you @Merrit that builds shall be done in a reproducible environment, but I believe that everyone will set up their CI/CD pipelines at their own discretion anyway, whereas it's good to have minimal sets of instructions, so you can actually play around and validate whether Flatpak is what you really wanted in first place.
I've just pushed a large update that should hopefully make things clearer and easier :)
instructions don't work.
$ flatpak-builder --force-clean build-dir com.example.FlutterApp.json error: org.freedesktop.Sdk/x86_64/21.08 not installed Failed to init: Unable to find sdk org.freedesktop.Sdk version 21.08