Durtur / Dungeoneer

A virtual tabletop designed for 5e D&D, includes a map tool with dynamic lighting, initiative tracker, combat tracker and homebrew management.
GNU Affero General Public License v3.0
169 stars 16 forks source link

[BUG] Broken thumbnails in default map library #73

Closed 0x07C0 closed 1 year ago

0x07C0 commented 1 year ago

Describe the bug Client is unable to find map thumbnails when listing available maps.

Expected behavior Thumbnail is loaded and displays map or foregroundBase64 extracted from .dungeoneer_map json file.

Screenshots image

Additional context Console output:

Failed to load resource: net::ERR_FILE_NOT_FOUND 
~/.config/Dungeoneer/data/maptool_libraries/Default/thumbnails/roadside%20waterfall.dungeoneer_map.png

for every map available.

~/.config/Dungeoneer/data/maptool_libraries/Default/thumbnails/ exists, but is empty.

0x07C0 commented 1 year ago

Might be a linux-only issue. Is linux still being supported?

Durtur commented 1 year ago

@0x07C0 it's a Linux issue, I created a Linux build a few versions ago but haven't done so recently. This is due to the Sharp image library package that was crashing the renderer process on Linux. The package isn't included if the program is runnning on Linux (dataaccess.js line 32). Since later versions rely heavily on Sharp this should be fixed.

There have been a few sharp realeses and Electron releases so maybe it works if the condition is removed

0x07C0 commented 1 year ago

Removing the condition does fix the issue, but require the deletion of old library_data.json in ~/.config/Dungeoneer/data/maptool_libraries/Default/ I don't know about any bugs this will create, but sharp package does work on linux without breaking any features.

Durtur commented 1 year ago

Nice. It shouldn't create any bugs. The issue was that the map tool window did not open, it showed only a white screen without even devtools available.

0x07C0 commented 1 year ago

Does that mean that the restriction on dataaccess.js#L359 is also redundant?

Durtur commented 1 year ago

Yes it's not needed