Merrit / flutter_flatpak_example

An example of how to package a Flutter application as a Flatpak for distribution on Linux, using the default counter example app.
64 stars 8 forks source link

error: org.freedesktop.Sdk/x86_64/21.08 not installed #5

Closed sgehrman closed 1 year ago

sgehrman commented 1 year ago

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

sgehrman commented 1 year ago

flatpak install flathub org.freedesktop.Sdk//21.08

add that step

sgehrman commented 1 year ago

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

sgehrman commented 1 year ago

$ flatpak install flathub org.freedesktop.Platform

fixed it.

I'm a noob, but this might help the next person...

sgehrman commented 1 year ago

Now, how do I install this to test? no instructions.

sgehrman commented 1 year ago

$ flatpak run com.example.FlutterApp error: app/com.example.FlutterApp/x86_64/master not installed

sgehrman commented 1 year ago

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

Merrit commented 1 year ago

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?

tomekit commented 1 year ago

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.

Merrit commented 1 year ago

I've just pushed a large update that should hopefully make things clearer and easier :)