Meta Issues (Again)

Having resolved the initial issue of “stupid typo” in my last post, I have now encountered a new error:

Composing metadata...
Run failed, some data was ignored.
Errors were raised during this compose run:
general
  E: filters-but-no-output

io.github.evilsupahfly.amulet_flatpak
  E: file-read-error
Refer to the generated issue report data for details on the individual problems.
Error: ERROR: appstreamcli compose failed: Child process exited with code 1

[2024-10-14 09:58:15] ERROR: flatpak-builder failed. 

I fixed the mismatched ID and tried to build the flatpak again, but it started complaining about not having a .desktop or icon, so I added them and updated my XML and YML sources accordingly (pasted below).

I’ve read through the Desktop Integration docs, the Metainfo Guidelines pages, and to be sure I was following the expected conventions, I read through Requirements & Conventions, but I’m still somehow missing something.

I initially didn’t change the YML, but that caused an error, so I added the .desktop and icon lines to the existing metadata-xml section. When that failed, I gave them their own sections, and that too failed.

New XML:

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
  <id>io.github.evilsupahfly.amulet_flatpak</id>
  
  <name>Amulet Map Editor - Flatpak Edition</name>
  <summary>Amulet is a Minecraft world editor that allows users to modify and create worlds with ease</summary>
  
  <metadata_license>FTL</metadata_license>
  <project_license>AGPL-3.0-or-later</project_license>
  
  <description>
    <p>
      Amulet is a simple, yet powerful, world editor for modifying Minecraft saved worlds.
    </p>
  </description>
  <developer id="io.github.evilsupahfly.amulet_flatpak">
    <name>Amulet Developer: Team Amulet</name>
    <name>Flatpak Developer: EvilSupahFly</name>
  </developer>
  <url type="homepage">https://github.com/amulet-Team/Amulet-Map-Editor/</url>
  <url type="vcs-browser">https://github.com/EvilSupahFly/Amulet-Flatpak/</url>
  <releases>
    <release version="0.10.36" date="2024-01-18">
      <url type="details">https://github.com/EvilSupahFly/Amulet-Flatpak/releases/tag/0.10.36</url>
    </release>
  </releases>
  <launchable type="desktop-id">io.github.evilsupahfly.amulet_flatpak.desktop</launchable>
  <icon type="stock">io.github.evilsupahfly.amulet_flatpak.png</icon>
  <content_rating type="oars-1.0">
    <content_attribute id="social-chat">moderate</content_attribute>
  </content_rating>

  <categories>
    <category>Game</category>
    <category>KidsGame</category>
  </categories>
  
</component>

New YML:

id: io.github.evilsupahfly.amulet_flatpak
name: Amulet Map Editor
version: 0.10.36
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: amulet_map_editor

finish-args:
  - --device=all
  - --share=network
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --filesystem=home:persistent
  - --filesystem=~/.cache:persistent
  - --filesystem=host:create
  - --env=LIBGL_ALWAYS_SOFTWARE="0"
  - --env=OPENGL_VERSION=3.3
  - --env=OPENGL_LIB=/usr/lib/x86_64-linux-gnu/libGL.so
  - --env=PYTHONDEBUG=3
  - --env=PYTHONVERBOSE=3
  - --env=PYTHONTRACEMALLOC=10
modules:
  - shared-modules/glew/glew.json
  - shared-modules/glu/glu-9.json
  - pip-gen.yaml
  - name: metainfo-xml
    buildsystem: simple
    build-commands:
      - install -Dm644 io.github.evilsupahfly.amulet_flatpak.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.metainfo.xml
  - name: metainfo-ico
    buildsystem: simple
    build-commands:
      - install -Dm644 io.github.evilsupahfly.amulet_flatpak.png -t ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/io.github.evilsupahfly.amulet_flatpak.png
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.png
  - name: metainfo-desktop
    buildsystem: simple
    build-commands:
      - install -Dm755 io.github.evilsupahfly.amulet_flatpak.desktop -t ${FLATPAK_DEST}/share/applications/io.github.evilsupahfly.amulet_flatpak.desktop
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.desktop

versioning:
  auto-increment: true

The files exist in the root folder of the project, along side the XML file. I also created the directory structures under share thinking that would resolve this, but that didn’t help either.

Please tell me I didn’t miss something stupidly obvious again like last time… Is there a means by which I can obtain a more detailed log upon failure?

Not sure which bit of the documentation said version is a valid field here. but it is wrong.

Same for this. And flatpak-builder probably tells you

1 Like

Without seeing the desktop file it’s hard to guess. Check the icon name in there. It’s probably incorrect.

-t does not require the filename at the end, only the target directory, It should be

- install -Dm644 io.github.evilsupahfly.amulet_flatpak.png -t ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/
1 Like

The version entries were mentioned in the “building your first flatpak” doc I read last year when I first started taking an interest in Flatpak after all the controversy surrounding Snap. I can’t find the original document I read at that time, but that’s where I got the foundation for my initial manifest.

As for the desktop file… The filename is io.github.evilsupahfly.amulet_flatpak.desktop and the contents were auto-generated by the AppStream Project.

[Desktop Entry]
Version=1.0
Type=Application

Name=Amulet Minecraft Map Editor (Flatpak Edition)
Comment=A powerful map editor for Minecraft worlds
Categories=Game;KidsGame;

Icon=io.github.evilsupahfly.amulet_flatpak.png
Exec=flatpak run io.github.evilsupahfly.amulet_flatpak
Terminal=true
Name[en_CA]=io.github.evilsupahfly.amulet_flatpak.desktop

I went back a looked at the guide pages and apparently I misread the docs.

So I’m # out the version stuff, and taking out the filenames in the metainfo entries:

  - name: metainfo-xml
    buildsystem: simple
    build-commands:
      - install -Dm644 io.github.evilsupahfly.amulet_flatpak.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.metainfo.xml
  - name: metainfo-ico
    buildsystem: simple
    build-commands:
      - install -Dm644 io.github.evilsupahfly.amulet_flatpak.png -t ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.png
  - name: metainfo-desktop
    buildsystem: simple
    build-commands:
      - install -Dm755 io.github.evilsupahfly.amulet_flatpak.desktop -t ${FLATPAK_DEST}/share/applications/
    sources:
      - type: file
        path: io.github.evilsupahfly.amulet_flatpak.desktop

… I’m still wondering if there’s a way to get a better error report though. Granted, taking on something like Amulet for my first Flatpak project was probably not the best idea…

It’s the icon name that should be here, not the icon file name. So no extension. Because you can also have a SVG

1 Like

I doubt this is in our documentation. flatpak-builder even tells you.

Ever since Day One, it’s complained about that, but it never failed with a fatal exit, so I assumed it was just some verbose debug output.

[Desktop Entry]
Version=1.0
Type=Application

Name=Amulet Minecraft Map Editor (Flatpak Edition)
Comment=A powerful map editor for Minecraft worlds
Categories=Game;KidsGame;

Icon=io.github.evilsupahfly.amulet_flatpak
Exec=flatpak run io.github.evilsupahfly.amulet_flatpak
Terminal=true
Name[en_CA]=io.github.evilsupahfly.amulet_flatpak.desktop

I’ve removed the .png in the .desktop file, but I should leave it in the XML, right?

  </releases>
  <launchable type="desktop-id">io.github.evilsupahfly.amulet_flatpak.desktop</launchable>
  <icon type="stock">io.github.evilsupahfly.amulet_flatpak.png</icon>
  <content_rating type="oars-1.0">

you should remove the icon entry in the appstream file. Otherwise, yes it’s also wrong to put the extension there.

1 Like

Thanks a ton, guys!

io.github.evilsupahfly.amulet_flatpak permissions:
    ipc	network	fallback-x11	wayland	x11	devices	file access [1]	tags [2]

    [1] home, host:create, ~/.cache
    [2] 


 1.	   	io.github.evilsupahfly.amulet_flatpak	master	i	amulet_flatpak-origin	0 bytes


Installing…
F: No checksum specified, getting tip of app/io.github.evilsupahfly.amulet_flatpak/x86_64/master from origin amulet_flatpak-origin
F: tip resolved to: 4db410ea2a30edaf4af2cd74dd1627d5b91729d4c64c33d2fcd214c008247e1d
F: Getting parental controls details for app/io.github.evilsupahfly.amulet_flatpak/x86_64/master from amulet_flatpak-origin
F: Skipping parental controls check for app/io.github.evilsupahfly.amulet_flatpak/x86_64/master since parental controls are disabled globally
F: running triggers from /usr/share/flatpak/triggers
F: running trigger desktop-database.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/desktop-database.trigger /home/evilsupahfly/.local/share/flatpak'
F: running trigger gtk-icon-cache.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/gtk-icon-cache.trigger /home/evilsupahfly/.local/share/flatpak'
F: running trigger mime-database.trigger
F: Running 'bwrap --unshare-ipc --unshare-net --unshare-pid --ro-bind / / --proc /proc --dev /dev --bind /home/evilsupahfly/.local/share/flatpak /home/evilsupahfly/.local/share/flatpak -- /usr/share/flatpak/triggers/mime-database.trigger /home/evilsupahfly/.local/share/flatpak'
F: Pruning repo
F: Pruned 204395/0 objects, size 0 bytes
Installation complete.

[2024-10-14 12:45:05] SUCCESS: flatpak install succeeded!