Flatpak run - error: No remote refs found similar to ‘flathub’

I’m trying to submit a binary app release for an app called Greenery. I’m at the stage where I’m testing locally with flatpak run according to this documentation:

I installed flatpak-builder and then issued the following command according to docs:

flatpak run org.flatpak.Builder --force-clean --sandbox --user --install --install-deps-from=flathub --ccache --mirror-scr
eenshots-url=https://dl.flathub.org/media/ --repo=repo builddir ~/Development/greenery/greenery-flathub/finance.greenery.greenery/finance.greenery.Greenery.json

This resulted in the following output:

Dependency Sdk: org.gnome.Sdk 0.9.7
Installing org.gnome.Sdk/x86_64/0.9.7 from flathub
error: No remote refs found similar to ‘flathub’
Error installing deps: running flatpak --user install -y --noninteractive flathub org.gnome.Sdk/x86_64/0.9.7: Child process exited with code 1

I have uploaded my Flathub Manifest directory here so that it can be reviewed:

I have also run the lint command checker on finance.greenery.Greenery.json and no issues came up.

This is happening because you don’t have the flathub remote added to the user installation. The error is misleading because flatpak can’t be certain you’re not trying to install a ref (app or runtime) named like flathub.

You can either add the remote, or manually install the runtime in the system installation.

Also, this version is incorrect.

"base-version": "0.9.7",
"runtime": "org.gnome",
"runtime-version": "0.9.7",
"sdk": "org.gnome.Sdk",

There’s probably no benefit to using the GNOME runtime (which should be "runtime": "org.gnome.Platform" and "runtime-version": "45" anyway) for an Electron app. I would suggest:

"base-version": "23.08",
"runtime": "org.freedesktop.Platform",
"runtime-version": "23.08",
"sdk": "org.freedesktop.Sdk",

base-version is the version of the Electron baseapp, which should match the version of the freedesktop runtime. (If you were using the GNOME or KDE runtime, it would match the freedesktop runtime version it’s derived from.)

Which documentation told you to set these value this way?

Just so I can track it down and fixit.

1 Like

I was using the Exodus Wallet manifest as an example for the overall structure for the manifest files and then I used this section of the docs (I misread the docs):

For all of the parameters that need to be set - say runtime or base-version, etc… Is there a section in the Docs that lists each parameter (on a per file basis in the manifest) and every available option that can be set. I have not found this in the Docs yet.

I’m on Debian 11 so are you saying that I need to use apt and install version 23.08 for org.freedesktop.Platform?

How does the remote option work? It needs to be configured and then org.freedesktop.Platform is installed remotely?

I set the base-version to 0.9.7 which is the current version numbering for our app Greenery, how can that match up with the freedesktop runtime? Is freedesktop providing support for Electron? I may be setting base-version incorrectly as it should be set to the version of Electron that we are using?

Also where do I set the current version of the Greenery app that I’m trying to submit ? (Note it will be a Binary Release Only): Currently Greenery is at version 0.9.7

There is man flatpak-manifest: Flatpak Builder Command Reference - Flatpak documentation

No, it needs to be installed by flatpak

A remote is what other package managers would call a repository. The term is inherited from ostree.

Assuming you have the flathub remote added to the system installation, you can do flatpak install flathub org.freedesktop.Sdk//23.08, and then flatpak-builder won’t attempt to install it in the user installation.

The correct value for base-version is specific to the base app you’re using. In the case of org.electronjs.Electron2.BaseApp, it corresponds to the runtime version it itself was based on.

See Electron - Flatpak documentation

You don’t need to put that anywhere in the manifest except in the sources section if you’re using a versioned archive or git tag. Flatpak doesn’t know or care about versions; runtime-version and base-version are actually branch names.

You can specify your app’s version in the MetaInfo (aka appdata) file, which is primarily used by the Flathub website and software store frontends.

I’d like to add that I ran the lint checker on all the files I could. The main Greenery.json file showed no errors however three other files had the following errors:


“errors”: [
“jsonschema”: [
“‘runtime’ is a required property”
“message”: “Please consult the documentation at Flatpak builder lint | Flathub Documentation


Traceback (most recent call last):
File “/app/bin/flatpak-builder-lint”, line 8, in
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 169, in main
if results := run_checks(args.type, path, args.exceptions, args.appid):
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 53, in run_checks
check_method_arg: Union[str, dict] = manifest.show_manifest(path)
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/manifest.py”, line 21, in show_manifest
raise Exception(ret.stderr.decode(“utf-8”))
Exception: Can’t parse ‘/home/lexton/Development/greenery/greenery-flathub/finance.greenery.greenery/finance.greenery.Greenery.desktop’: :1:8: Parse error: unexpected identifier `Desktop’, expected value


Traceback (most recent call last):
File “/app/bin/flatpak-builder-lint”, line 8, in
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 169, in main
if results := run_checks(args.type, path, args.exceptions, args.appid):
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 53, in run_checks
check_method_arg: Union[str, dict] = manifest.show_manifest(path)
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/manifest.py”, line 21, in show_manifest
raise Exception(ret.stderr.decode(“utf-8”))
Exception: Can’t parse ‘/home/lexton/Development/greenery/greenery-flathub/finance.greenery.greenery/finance.greenery.Greenery.appdata.xml’: :1:1: Parse error: unexpected character `<', expected value

Are some of these errors utf-8 encoding issues? I should check for invisible chars just in case and as for the xml file it may not be formatted properly.

As for flathub.json it looks there are required parameters that I need to add, I created this file based off of other Manifests that I saw. Is there a default template that I can use where I can fill in the options?

I tried the flatpak freedesktop install command and it stated that it was already installed. I need to run through these documentation links first - thanks for the info

You’re supposed to specify the artifact type when invoking flatpak-builder-lint. It apparently assumes manifest when you don’t. Regardless, it’s not meant to be used on flathub.json or a .desktop file.

I have moved the finance.greenery.greenery directory to ~/Development

Is the directory case sensitive when it comes to the app id? My app id should be finance.greenery.Greenery so should I have the directory name match this? Also should I be moving the directory into a flatpak path locally (where flathub apps are installed) on my drive?

I ran this command:

flatpak run --command=flatpak-builder-lint org.flatpak.Builder builddir ~/Development/finance.greenery.greenery/

with this error message:

raceback (most recent call last):
File “/app/bin/flatpak-builder-lint”, line 8, in
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 169, in main
if results := run_checks(args.type, path, args.exceptions, args.appid):
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/cli.py”, line 70, in run_checks
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/checks/appid.py”, line 41, in check_build
metadata = builddir.parse_metadata(path)
File “/app/lib/python3.11/site-packages/flatpak_builder_lint/builddir.py”, line 16, in parse_metadata
raise OSError(errno.ENOENT, f"No metadata file in build directory: {builddir}")
FileNotFoundError: [Errno 2] No metadata file in build directory: /home/lexton/Development/finance.greenery.greenery/

I have updated my finance.greenery.greenery directory on to github pages. Can you please review and see if you see any issues.

It is at the top post that I did here in this thread.

The Electron - Flatpack documentation that you replied with goes into detail on building an Electron app on Flathub. However as I’ve mentioned I need to submit a Binary Release for Greenery which I have already compiled and uploaded to our Releases area on github. So for the flatpak run command below do I need a --install-deps-from argument? My guess is that the flatpak run command should download the binary I set in Greenery.json and install it to this path: /app/share/applications/finance.greenery.Greenery.desktop

flatpak run org.flatpak.Builder --force-clean --sandbox --user --install --install-deps-from=flathub --ccache --mirror-screenshots-url=https://dl.flathub.org/media/ --repo=repo builddir ~/Development/finance.greenery.Greenery.json

You’re using extra-data to download and unpack the archive at install time. That’s only necessary when you don’t have permission to redistribute it. As mentioned on the Submission page, that means you can’t use org.flatpak.Builder from Flathub; you need to use the native version of flatpak-builder from your distribution’s package manger instead.

But instead of using extra-data, you can use the archive source type and install into /app/ in build-commands. Your app’s data will end up in the ostree repo and be distributed directly from Flathub’s CDN. This provides efficient delta updates, rather than users needing to download the whole thing again on each update. You can also remove the line disabling separate-locales to get a Locale extension, further saving bandwidth and disk space.

That’s true, but much of it is still relevant.

I got this command to work below and I see that it installs locally.

flatpak-builder --force-clean --sandbox --user --install builddir ./finance.greenery.Greenery.json

In my Greenery.json file it looks like the binary is installed here: “install -D greenery /app/bin/greenery”

I am unable to execute flatpak run finance.greenery.Greenery:

$: flatpak run finance.greenery.Greenery

[2 zypak-helper] WARNING: supplied target /app/extra/Greenery does not look like a valid Chromium binary!
[2 zypak-helper] Zypak needs to be called directly on the executable binary, not any wrappers.
[2 zypak-helper] exec failed for /app/extra/Greenery: No such file or directory (errno 2)

I installed what I believe to be v23 of Electron and also v18 of Node for the Flathub runtime. Is there a way to use what is configured locally in the shell through an env or other method so that Node 16 and Electron 20 are set? Or do I have to configure the Flathub runtime to use these specific versions? I tried installing the Node 16 runtime and it came back stating that I had the choice between Node 18 and Node 20.

Thank you for your assistance. As I move forward with the process I need to disclose that I am one of the developers on the Greenery Wallet project.

The link to our homepage is in the appdata.xml file. With the research that I have done I see that apps like Firefox are doing binary releases with special keys. Do I need to setup a special key while submitting Greenery as a Binary Release?

That’s just the wrapper script defined in the manifest that invokes zypak (which is the bit in the Electron baseapp that allows Chromium’s sandbox to work inside flatpak). When the script runs, it fails with:

Because you’re using extra-data, the apply_extra script is invoked by flatpak on the end user system during installation. Your apply_extra script contains:

mv Greenery-linux-x64/* .

I’d guess that flatpak runs the script with the working directory as /app/extra, but I’m not sure, so I would specify the destination explicitly. Also, is the binary inside the archive actually named Greenery as the wrapper script expects?

I’m not sure what you’re referring to here. If you’re building the Electron app outside of flatpak, then you control which version of Electron you’re using; The flatpak SDK has nothing to do with it. Newer is generally better for improved portal support though.

I liked it better when I didn’t know this was crypto.

But if you’re upstream for this (as I said before) you don’t really need to use extra-data as long as you’re okay with the app being downloaded directly from Flathub. Other proprietary app wrapper flatpaks only do so because they lack that permission from the vendor.

Mozilla has special permission to publish the Firefox flatpak directly from their build server. That’s not generally available.