.json files stored wrong and some aren't even generated?
BuyMyMojo opened this issue · 5 comments
Bunch of file missing 404 errors with the latest fabric mods 10.2
three.module.js:31838 GET https://buymymojo.net/minecraftmaps/current-arcade/data/Arcade/lowres/x-1/z-1.json? 404
That file is stored in a weird folder instead of where it is looking GIF
some are just actually not generated like lowres/x1/z1.json
Map if needed
Another map on the same server also with compression enabled but manually generated using the cli
Can give you the whole map if you need it
About the 404 Errors
Tiles that are not generated will always throw a 404 .. that is not an error, i just cant hide those error logs in the console using javascript, but bluemap handles those fine and displays an empty tile.
They are also on the correct place .. e.g. if you have a file: x-4/2/z4/5.json.gz
you remove the /
to get the coordinates of that tile: x-42 z45 .json.gz
^^
About the actual problem:
Your problem is, that you are using an external webserver that is not correctly configured for bluemap.
So, bluemap by default saves the tiles with gz-compression, because that is saving about 80% filesize .. you could turn compression off in the config, but i would strongly advise against it ^^
The web-server has to be configured, so that when it gets a request to a tile, e.g. data/Arcade/hires/x-5/z-2.json
it also searches for it's gzipped version (data/Arcade/hires/x-5/z-2.json.gz
) .. and then sending that file without decompressing it but using the Content-Encoding: gzip
http flag, so the browser does the work of decompressing the file before giving it to bluemap.
Your server is not doing that last part i think.
Here are some example configurations for apache and nginx other users figured out that make it work, maybe that helps you: #7 (comment)
:)
The server is configured for gz, the other map linked is just stored in an adjacent folder on the server with the same config, both stored using compression
I am also getting a lot of these errors now that I look again
VM129:1 Uncaught SyntaxError: Unexpected token � in JSON at position 0
at JSON.parse (<anonymous>)
at Object.onLoad (three.module.js:36694)
at XMLHttpRequest.<anonymous> (three.module.js:31774)
Okay,
https://buymymojo.net/minecraftmaps/current-arcade/data/Arcade/hires/x-4/z-3.json
this works fine... but if i add a "?" on the end of the url...
https://buymymojo.net/minecraftmaps/current-arcade/data/Arcade/hires/x-4/z-3.json?
it is sending the file compressed but without the Content-Encoding: gzip
flag .. so it breaks if i add a ? ..
https://buymymojo.net/minecraftmaps/current-arcade/data/Arcade/hires/x-4/z-3.json?234454
this should also work (with any number after the ?)
The ? is added in bluemaps latest versions because of cache-handling .. that is on purpose and has to stay there, so you will need to configure your server so it doesn't break if there are any GET-parameters on the url ^^
@BuyMyMojo i'll close this for now, reopen if the issue persists.