App Claims Files Are Missing (They're Not)

I was able to get my initial flatpak project running (the Flatpak Amulet Minecraft Map Editor), but I noticed that it was missing textures, so I’ve attempted to add the missing things by copying them from the original Python install of Amulet, however, despite the files being there according to the debug shell:

[/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block] ls -Fla
total 36
drwxr-xr-x 3 evilsupahfly evilsupahfly 4096 Dec 31  1969 ./
drwxr-xr-x 3 evilsupahfly evilsupahfly 4096 Dec 31  1969 ../
drwxr-xr-x 2 evilsupahfly evilsupahfly 4096 Dec 31  1969 banner/
-rw-r--r-- 2 evilsupahfly evilsupahfly  651 Dec 31  1969 barrier.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1265 Dec 31  1969 end_portal.png
-rw-r--r-- 2 evilsupahfly evilsupahfly  213 Dec 31  1969 grass.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1286 Dec 31  1969 lava.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1405 Dec 31  1969 structure_void.png
-rw-r--r-- 3 evilsupahfly evilsupahfly  927 Dec 31  1969 water.png

The terminal output indicates the textures are missing:

[~/Downloads/flatpack-stuff/Amulet-Flatpak/Amulet-Flatpak] flatpak run io.github.evilsupahfly.amulet-flatpak
INFO - PyMCTranslate Version 298
Gtk-Message: 01:15:31.713: Failed to load module "xapp-gtk3-module"
INFO - Could not find loader for /home/evilsupahfly/.minecraft Could not find a matching format for /home/evilsupahfly/.minecraft
INFO - Could not find loader for /home/evilsupahfly/.minecraft Could not find a matching format for /home/evilsupahfly/.minecraft
INFO - Could not find loader for /home/evilsupahfly/.minecraft Could not find a matching format for /home/evilsupahfly/.minecraft
INFO - Could not find loader for /home/evilsupahfly/.minecraft Could not find a matching format for /home/evilsupahfly/.minecraft
INFO - Loading level /home/evilsupahfly/.minecraft/saves/Otherwhere
INFO - Loading level /home/evilsupahfly/.minecraft/saves/Otherwhere
INFO - No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
INFO - No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
INFO - Downloading java launcher manifest file.
INFO - Downloading java launcher manifest file.
INFO - Finished downloading java launcher manifest file.
INFO - Finished downloading java launcher manifest file.
INFO - OpenGL Version 3.3.0 NVIDIA 560.35.03
INFO - OpenGL Version 3.3.0 NVIDIA 560.35.03
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
INFO - Finished setting up texture atlas in OpenGL
INFO - Finished setting up texture atlas in OpenGL
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/lava'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/barrier'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/barrier.png'
ERROR - Failed to load block model {'model': 'minecraft:block/barrier'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/barrier.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'
ERROR - Failed to load block model {'model': 'minecraft:block/water'}
'/app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png'

How do I fix this?

You should share your Manifest, so People can help you

1 Like

What do you mean by “debug shell”? Usually the files inside the sandbox are not owned by your user.

What is inside the sandbox if you run it directly via flatpak:

flatpak run --command=ls io.github.evilsupahfly.amulet-flatpak -al /app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/

By “debug shell” I mean I did this:

flatpak run --devel --command=sh --system-talk-name=org.freedesktop.login1 io.github.evilsupahfly.amulet-flatpak

And systematically checked each directory down the path listed to be sure it was present.

I’ll post the manifest when I get home.

This could be because in an effort to fix the missing textures, I gzipped them from the original Python package and added the .tar.gz to my project as an extra local file, which gets unzipped to the specified location.

I should know better by now too. The question is incomplete (usually) without the manifest. :sweat_smile: :man_facepalming:

This is my primary manifest:

id: io.github.evilsupahfly.amulet-flatpak
name: Amulet Map Editor
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: amulet_map_editor

finish-args:
  - --device=all
  - --share=network
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --filesystem=home:create
  - --talk-name=org.freedesktop.Notifications
  - --env=LIBGL_ALWAYS_SOFTWARE="0"
  - --env=OPENGL_VERSION=3.3
  - --env=OPENGL_LIB=/usr/lib/x86_64-linux-gnu/libGL.so
  - --env=XAPP_GTK3=true

modules:
  - shared-modules/glew/glew.json
  - shared-modules/glu/glu-9.json
  - pip_gen.yaml
  - resource_pack/resource_pack.yaml

This is pip-gen.yaml which was generated automagically by flatpak-pip-generator based on the Amulet project’s requirements.txt:

name: pip_gen_test
build-commands: []
buildsystem: simple
modules:
  - name: python3-meson-python
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "meson-python" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/91/c0/104cb6244c83fe6bc3886f144cc433db0c0c78efac5dc00e409a5a08c87d/meson_python-0.16.0-py3-none-any.whl
        sha256: 842dc9f5dc29e55fc769ff1b6fe328412fe6c870220fc321060a1d2d395e69e8
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl
        sha256: 5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/aa/5f/bb5970d3d04173b46c9037109f7f05fc8904ff5be073ee49bb6ff00301bc/pyproject_metadata-0.8.0-py3-none-any.whl
        sha256: ad858d448e1d3a1fb408ac5bac9ea7743e7a8bbb472f2693aaa334d2db42f526
  - name: python3-versioneer
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "versioneer" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/b0/79/f0f1ca286b78f6f33c521a36b5cbd5bd697c0d66217d8856f443aeb9dd77/versioneer-0.29-py3-none-any.whl
        sha256: 0f1a137bb5d6811e96a79bb0486798aeae9b9c6efc24b389659cebb0ee396cb9
  - name: python3-numpy
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "numpy" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz
        sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
  - name: python3-lz4
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "lz4" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/cf/d4/12915eb3083dfd1746d50b71b73334030b129cd25abbed9133dd2d413c21/lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
        sha256: 0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563
  - name: python3-amulet-core
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "amulet-core" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/96/62/5a6fa5775726afa37153ce895ed8ddb886cee48ab3cf6c4d1a3cde5fa41f/PyMCTranslate-1.2.28-py3-none-any.whl
        sha256: 8166347a39bbcd784a298b6797216cb7b18c6bbe32d43f6740197138e9ec1c01
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/00/b9/48aa1754bc30143d7623253ff507986123829e9ae78a266ec34e08c0c544/amulet-nbt-2.1.3.tar.gz
        sha256: a9de4fe068329c7a921f09dd4cec37c25c01ac2abeb4e10000e82e526e36d0fc
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/16/df/6ad86c1a64350274a05cf56ecb205e1acea74ea376d7a02c4b34b0251388/amulet_core-1.9.25-py3-none-any.whl
        sha256: a626a09e93112032d8de046cef59b3a87bf02e840930fa7218f5b2caacf29254
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/8a/69/03882a4a7ed933d1f0c622d93a5b2eef2fa51c4bf8ca1ec84d43b88eb113/amulet_leveldb-1.0.2.tar.gz
        sha256: b3aa511ef71bf6bc6b21e96395bded0f392b1dc093ef58d5535067d80ab41541
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/cf/d4/12915eb3083dfd1746d50b71b73334030b129cd25abbed9133dd2d413c21/lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
        sha256: 0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/ca/31/3c57313757b3a47dcf32d2a9bad55d913b797efc8814db31bed8a7142396/mutf8-1.0.6.tar.gz
        sha256: 1bbbefb67c2e5a57104750bb04b0912200b57b2fa9841be245279e83859cb346
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz
        sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/56/29/3ec311dc18804409ecf0d2b09caa976f3ae6215559306b5b530004e11156/platformdirs-3.11.0-py3-none-any.whl
        sha256: e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/9b/fb/a70a4214956182e0d7a9099ab17d50bfcba1056188e9b14f35b9e2b62a0d/portalocker-2.10.1-py3-none-any.whl
        sha256: 53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf
  - name: python3-amulet-map-editor
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "amulet-map-editor" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/96/62/5a6fa5775726afa37153ce895ed8ddb886cee48ab3cf6c4d1a3cde5fa41f/PyMCTranslate-1.2.28-py3-none-any.whl
        sha256: 8166347a39bbcd784a298b6797216cb7b18c6bbe32d43f6740197138e9ec1c01
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/99/48/00e31747821d3fc56faddd00a4725454d1e694a8b67d715cf20f531506a5/PyOpenGL-3.1.7-py3-none-any.whl
        sha256: a6ab19cf290df6101aaf7470843a9c46207789855746399d0af92521a0a92b7a
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/93/09/d08b3d07dbd88258276496a47273778f330f5ccf8390cb21b16b29d660de/PyOpenGL-accelerate-3.1.7.tar.gz
        sha256: 2b123621273a939f7fd2ec227541e399f9b5d4e815d69ae0bdb1b6c70a293680
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/00/b9/48aa1754bc30143d7623253ff507986123829e9ae78a266ec34e08c0c544/amulet-nbt-2.1.3.tar.gz
        sha256: a9de4fe068329c7a921f09dd4cec37c25c01ac2abeb4e10000e82e526e36d0fc
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/16/df/6ad86c1a64350274a05cf56ecb205e1acea74ea376d7a02c4b34b0251388/amulet_core-1.9.25-py3-none-any.whl
        sha256: a626a09e93112032d8de046cef59b3a87bf02e840930fa7218f5b2caacf29254
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/8a/69/03882a4a7ed933d1f0c622d93a5b2eef2fa51c4bf8ca1ec84d43b88eb113/amulet_leveldb-1.0.2.tar.gz
        sha256: b3aa511ef71bf6bc6b21e96395bded0f392b1dc093ef58d5535067d80ab41541
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/92/ad/7f808413857992512188eaed55108be7201cf18defcd36e8ed9fe9d9c3fc/amulet_map_editor-0.10.35.tar.gz
        sha256: d9a24afa04fc4be3ca029d5ef1bb394b32497533d4e176e3d742f43edab6319a
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/cf/d4/12915eb3083dfd1746d50b71b73334030b129cd25abbed9133dd2d413c21/lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
        sha256: 0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/70/bd/172abef53c86d3e84d7436a484dd57c0f4d62c125ff2dd139394d2f70970/minecraft_resource_pack-1.4.4-py3-none-any.whl
        sha256: 84047a45a8a94b14b63589f3cb7a897f3bccb2632ab40d8b665d89808ebbddd4
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/ca/31/3c57313757b3a47dcf32d2a9bad55d913b797efc8814db31bed8a7142396/mutf8-1.0.6.tar.gz
        sha256: 1bbbefb67c2e5a57104750bb04b0912200b57b2fa9841be245279e83859cb346
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz
        sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl
        sha256: 5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/cd/74/ad3d526f3bf7b6d3f408b73fde271ec69dfac8b81341a318ce825f2b3812/pillow-10.4.0.tar.gz
        sha256: 166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/56/29/3ec311dc18804409ecf0d2b09caa976f3ae6215559306b5b530004e11156/platformdirs-3.11.0-py3-none-any.whl
        sha256: e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/9b/fb/a70a4214956182e0d7a9099ab17d50bfcba1056188e9b14f35b9e2b62a0d/portalocker-2.10.1-py3-none-any.whl
        sha256: 53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/aa/64/d749e767a8ce7bdc3d533334e03bb1106fc4e4803d16f931fada9007ee13/wxPython-4.2.1.tar.gz
        sha256: e48de211a6606bf072ec3fa778771d6b746c00b7f4b970eb58728ddf56d13d5c
  - name: python3-amulet-leveldb
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "amulet-leveldb" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/8a/69/03882a4a7ed933d1f0c622d93a5b2eef2fa51c4bf8ca1ec84d43b88eb113/amulet_leveldb-1.0.2.tar.gz
        sha256: b3aa511ef71bf6bc6b21e96395bded0f392b1dc093ef58d5535067d80ab41541
  - name: python3-amulet-nbt
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "amulet-nbt" --report=pip_report.json
        --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/00/b9/48aa1754bc30143d7623253ff507986123829e9ae78a266ec34e08c0c544/amulet-nbt-2.1.3.tar.gz
        sha256: a9de4fe068329c7a921f09dd4cec37c25c01ac2abeb4e10000e82e526e36d0fc
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/ca/31/3c57313757b3a47dcf32d2a9bad55d913b797efc8814db31bed8a7142396/mutf8-1.0.6.tar.gz
        sha256: 1bbbefb67c2e5a57104750bb04b0912200b57b2fa9841be245279e83859cb346
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz
        sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
  - name: python3-minecraft-resource-pack
    buildsystem: simple
    build-commands:
      - >-
        pip3 install --verbose --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "minecraft-resource-pack"
        --report=pip_report.json --no-build-isolation
    sources:
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/00/b9/48aa1754bc30143d7623253ff507986123829e9ae78a266ec34e08c0c544/amulet-nbt-2.1.3.tar.gz
        sha256: a9de4fe068329c7a921f09dd4cec37c25c01ac2abeb4e10000e82e526e36d0fc
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/70/bd/172abef53c86d3e84d7436a484dd57c0f4d62c125ff2dd139394d2f70970/minecraft_resource_pack-1.4.4-py3-none-any.whl
        sha256: 84047a45a8a94b14b63589f3cb7a897f3bccb2632ab40d8b665d89808ebbddd4
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/ca/31/3c57313757b3a47dcf32d2a9bad55d913b797efc8814db31bed8a7142396/mutf8-1.0.6.tar.gz
        sha256: 1bbbefb67c2e5a57104750bb04b0912200b57b2fa9841be245279e83859cb346
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz
        sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/cd/74/ad3d526f3bf7b6d3f408b73fde271ec69dfac8b81341a318ce825f2b3812/pillow-10.4.0.tar.gz
        sha256: 166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06
      - type: file
        url: >-
          https://files.pythonhosted.org/packages/56/29/3ec311dc18804409ecf0d2b09caa976f3ae6215559306b5b530004e11156/platformdirs-3.11.0-py3-none-any.whl
        sha256: e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e

This is the newest addition - my attempt to fix the missing textures, which hasn’t actually fixed anything, resource_pack.yaml:

name: resource_pack
build-commands:
  - >-
    set -e
    install -Dm 0755 minecraft_model_reader.tar.gz -t ${FLATPAK_DEST}/lib/python3.11/site-packages/
buildsystem: simple
sources:
  - type: file
    path: ../resource_pack/minecraft_model_reader.tar.gz
  - type: script
    dest: '${FLATPAK_DEST}/lib/python3.11/site-packages/'
    commands:
      - tar -xzf ${FLATPAK_DEST}/lib/python3.11/site-packages/minecraft_model_reader.tar.gz -v -C ${FLATPAK_DEST}/lib/python3.11/site-packages/
      - rm -f ${FLATPAK_DEST}/lib/python3.11/site-packages/minecraft_model_reader.tar.gz

My original project didn’t include resource_pack.yaml because that’s supposed to be included with Amulet’s Python source, and which works fine when Amulet is installed directly through PIP. However, when built by the flatpak builder, Amulet can’t find - or doesn’t recognize - the textures, so I tried to add them manually after the fact.

This:

evilsupahfly on Black-Beast at Sat 31 Aug 2024 10:48:08 EDT
[~/Downloads/flatpack-stuff/Amulet-Flatpak/Amulet-Flatpak] flatpak run --command=ls io.github.evilsupahfly.amulet-flatpak -al /app/lib/python3.11/site-packages/minecraft_model_reader/api/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/
total 36
drwxr-xr-x 3 evilsupahfly evilsupahfly 4096 Dec 31  1969 .
drwxr-xr-x 3 evilsupahfly evilsupahfly 4096 Dec 31  1969 ..
drwxr-xr-x 2 evilsupahfly evilsupahfly 4096 Dec 31  1969 banner
-rw-r--r-- 2 evilsupahfly evilsupahfly  651 Dec 31  1969 barrier.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1265 Dec 31  1969 end_portal.png
-rw-r--r-- 2 evilsupahfly evilsupahfly  213 Dec 31  1969 grass.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1286 Dec 31  1969 lava.png
-rw-r--r-- 2 evilsupahfly evilsupahfly 1405 Dec 31  1969 structure_void.png
-rw-r--r-- 3 evilsupahfly evilsupahfly  927 Dec 31  1969 water.png

I had planned to rebuild the project from scratch again, but this time without the resource pack extra I made, and compare the results, which I’ll reply with as soon as I have.

In the meantime, I’m just wondering why it works when installed (in a Python VENV) with PIP and doesn’t work when made into a Flatpak which - based on the manifest output from flatpak-pip-generator - appears to me like it does all the same things with PIP, but inside the flatpak sandbox.

Update:

I rebuilt the package without my resource_pack call, reinstalled the Amulet flatpak, and the missing textures are still an issue, so I re-ran ls inside the sandbox, but this time I called flatpak with -vv to see if I could get an idea of what’s going on and why.

Output exceeded character limit for posts, so I’ve posted it as a snippet on GIST.

I see quite a few [x] is not a symlink messages, but I don’t know if that’s normal. Amulet has no trouble getting RW access to the Minecraft saves in my $HOME so it must not be that big a deal.

My work-fried, under-slept self just realized that the missing textures are in minecraft-resource-pack which is already supposed to be included in the project, having been pulled in from requirements.txt:

versioneer
meson-python
glad
pyopengl
PyOpenGL-accelerate
numpy
lz4
amulet-core
amulet-map-editor
amulet-leveldb
amulet-nbt
minecraft-resource-pack

So now I’m REALLY confused about why the textures aren’t loading!

**Edit: This is verifiable by checking pip_gen.yaml in my earlier post.

Previously, I was building and installing from a local source. So I used the workflow for bilelmoussaoui/flatpak-github-actions to build the Amulet flatpak in my GIT repository instead, and the flatpak built by the workflow is also having these missing texture issues. Can somebody please explain to me what I’m doing wrong?
:face_with_spiral_eyes:

I don’t know Python enough so I can’t really help. There are a lot of Python applications on Flathub so I don’t think that there’s a general issue, your application somehow doesn’t like the environment Flatpak is providing. Did you check if any other files are missing which could result in the errors?

To debug this further, you can try building with online support (this is not allowed on Flathub & therefore everything is usually downloaded for an offline build).

I think this should be a template you can use, but there could be mistakes I made (I did not test the snippet).

modules:
  - shared-modules/glew/glew.json
  - shared-modules/glu/glu-9.json
  - name: application
    build-commands:
      - pip3 install --prefix=${FLATPAK_DEST} <OPTIONS> <PACKAGE_NAME>
      - …
    buildsystem: simple
    build-options:
      build-args:
        - --share=network

And maybe you should remove access to the home dir (–filesystem=home) when testing, just to be sure that nothing from your development system is interfering.

1 Like

So, the package is being installed, and both the .png images and the .JSON are present in their expected locations. Unfortunately, I can’t disable HOME access while testing because I need to be able to load a Minecraft world to be sure Amulet is working.

Currently, I’m looking at trying to debug the model/texture module to see what’s happening under the hood, but every time I change something, it crashes.

The template, however, I’ll take for a test drive after work tonight.