-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Textures Not Loading (Flatpak Version) #1107
Comments
So it is looking up that string in a dictionary but it isn't there. Looks like the path in your screenshots has a prefix that isn't in the string. Could that be the problem? |
That must be the |
I'm not seeing any hard-coded paths. All the path definitions appear to be relative to the location the resource pack manager API is running from, which should count I'll have to check the Flatpak documentation again because I have a suspicion that I've missed something in the manifest. |
So... If Amulet is unable to create or write to CACHE_DIR, would that cause this error? If so, making the default location sandbox-writable or moving it to somewhere the sandbox can already write to should fix this, if that's the case. I'll make the changes after work and see what happens. Edit: I'll have to see how - or if - this impacts Bedrock worlds too, since I haven't tested any (not that Linux players would be running Bedrock though). |
When stepping through, I see paths being set during the initial execution, but they too seem to be relative to
So the directory structure isn't the issue. It has no problems finding anything inside the sandbox, as my periodic print statements from PDB show that it accepts In an effort to see what was going on under the hood, I dumped the entire log to a file, but since it was 80,000 lines, I snipped it at the top of the resource pack access (see this GIST) and I can see that it's loading the downloaded textures into the cache with no problem, proving that it's neither a permissions issue, or a write-access issue, and you can see that it finds all the pertinent .JSON and .PNG files. The built-in fix for water and lava, however, still fails, even with the modified sandbox permissions and I don't understand why. All the paths are relative to Amulet, and all the files are where they're supposed to be within the sandbox structure, which is identical (save for running from |
So, I've tweaked the resource pack model manager to print some more (excessively) detailed information on paths and file access, and here's what I have, after narrowing down over 90,000 lines from the debug output to these sixty or so:
After still not understanding why it fails to load water and lava, I thought up a clever work around: I grabbed the 1.21 Vanilla resource pack from CurseForge, saved it to Amuet's resource pack add-on folder, and reloaded Amulet, but that didn't change anything and the textures are still missing. |
I can see from the extensive debug barf that textures are being loaded from two different locations. The ones being downloaded are being saved to However, the bundled ones such as water and lava are being read from their "install location" inside the flatpak: I thought that manually copying them over to Unrelated but still important: wxPython got a patch yesterday which resolves some issues for Linux users using Wayland instead of X by patching (officially this time) a twenty-year-old piece of code, so you may want to update the wxPython version requirement for Amulet. I don't know it impacted non-Flatpak users though. This is the error Wayland users would get:
|
I believe with the changes I've made to the Minecraft Model Reader, the missing textures are finally resolved. I'm just waiting on the final build to complete on my EndeavourOS test machine in order to verify but so far on Linux Mint, it works. I'm sure there's a better way to do this, but for now, it gets the job done. |
I just inadvertently solved my problem by creating a venv (literally) at When running from PIP, Amulet is installed to When Amulet is installed inside the Flatpak, the location is changed to I guess not all the paths are relative after all. I feel like an idiot now because it was so obvious. It was right there in every error message, every time. I'm just not sure where this is defined. I'm exploring two options now. One is a way to override the sandbox location from |
Bug Report:
Water and Lava blocks aren't loading, but only in the Flatpak version.
Current Behaviour:
Water and Lava blocks aren't loading, but only in the Flatpak version.
Expected behavior:
Water and Lava blocks should load.
Steps To Reproduce:
Install the Flatpak version and run it
Environment:
Additional context
I had thought this issue resolved after updating Amulet's base code for the Flatpak from
.35
to.36
, having seen the error go away on my testing rig. However, another user informed me the issue persisted for him, even after the.36
update.So I modified
resource_pack_manager.py
again (by changinglog.error
tolog.exception
), as suggested in #1098 and ran Flatpak Amulet through the Python Debugger in Flatpak's version of Python (it runs 3.12 internally in Freedesktop 24.08, which is what I build against).While the full results are in the GIST linked below, the part that probably is of interest is this part, which repeats for all the water and lava blocks Amulet finds:
I've provided the Flatpak read/write access to the user's
$HOME
folder, but now I'm wondering if the Flatpak needs an extra set of permissions for somewhere else? If Amulet is trying to copy files within the Flatpak sandbox, it won't work as the sandbox itself is mounted as read-only. Generally speaking, however, Flatpak stores everything in$HOME/.var/app/
in a folder for each sandbox.That includes the defaults for water and lava:
Everything is in there - I double checked.
Attachments
Not really an attachment, but the complete terminal log is available here on GIST.
The text was updated successfully, but these errors were encountered: