Closed HB-Stratos closed 1 year ago
Hello, thank you for bringing this up! I haven't tested any multiworld mods, so I didn't account for this.
Have you tried adding your world to the worlds
section in the config? I am not sure what the correct names are, so maybe try adding line creative: "lynxcraft:creative"
?
Maybe you could be able to find the correct world's id in <your_server_folder>/dynmap/worlds.txt
if dynmap added it there.
I tried your suggestion for an entry, but it unfortunately didn't work, it has made no difference. I have also looked into the worlds.txt file, but it does not contain anything but a commented out template.
I believe multiworld adds worlds in a way that is very close if not identical to if a datapack adds custom dimensions, so maybe that could be of help?
I also found this, and changed the entry to lynxcraft_creative: "lynxcraft:creative"
, but it appears that also has not worked.
But since trains are also not working on the overworld, might that be due to an issue somewhere else? Is there any log that might have more details? The mc server log unfortunately says exactly nothing about this by the looks of it.
I also just found this, which makes me think that my entry into worlds likely is correct now. I suspect the actual issue of why it isn't showing up lies somewhere else. Unfortunately I don't know where to search. Any ideas?
Good job with your research!
My addon works purely in the browser, any logs it could have would be there. Please open your Dynmap and press Ctrl+Shift+I and check whether there are any red messages in the Console tab.
Oh, also you didn't set any baseUrl
in your config, what address does your CTM runs on?
I should probably mention in the README that it's important, haha
ctm configs have not been modified, so it should be reachable on http:// localhost:3876/
, which I have tried to enter into the config to no success. I have also tested that [ip of my server in vpn]:3876 brings up the ctm webpage, which it does.
I'm currently not at my PC, will look into the console later.
The baseUrl should be publicly available, which if you plan on using the vpn only, would be the address within the vpn. I suspect that the addon is unsuccessfully trying to connect to CTM.
Oh, so because the addon runs only in the browser and has no server side part, it cannot access any open ports only locally available on the server? That makes sense, though is a bit of a bummer. I do also have a fully public URL for the ctm site through a reverse proxy, I'll specify that. Does it matter if there is an ending slash specified in the base URL? And what port does it default to when there is none specified? Port 80?
Yes, exactly!
I think it will work with and without trailing slash, but it will surely work without one.
Default port for http://
is 80, for https://
it's 443, just like any other webpage.
Hopefully you'll be able to make it work now! Thank you again for your issue, I will update README to be more helpful about this and eventually I'll make the addon report any error on screen instead of the console only.
Have you restarted the server? Dynmap doesn't load new config until restart I think
I am running into a very weird issue. it seems it ignores the configured url and uses it's own url
To preface: dynmap is running on map.[domain], while ctm runs on trackmap.[domain]. I have verified via curl that:
curl http://trackmap.[domain}
resulted in permanently moved
curl https://trackmap.[domain]
resulted in something that looks like the webpage you get before javascript
curl https://trackmap.[domain]/api/network
indeed gives a response that looks like a network.
I have entered base domain as "https://trackmap.[domain]", but I have tried with http too, and with and without slash, none of which has made a difference. (with slash doesn't even appear to try calling an api, but neither works
I looked at the console, and found this oddity: Despite restarting the server after changing the config, it tries to reach map.[domain]/api/network, instead of trackmap.
Have you restarted the server? Dynmap doesn't load new config until restart I think
I have restarted the server after every configuration change that I made, I can see a different console output depending on whether I used a slash or no slash in the config, so I think the configs were loaded.
The console looks something like this: call to map.[domain]/api/network resulted in 404 unsurprising as the api is under trackmap, which I have verified is written in the config. Before that there also is a call to map.[domain]/api/style.css which also results in a 404
Oh no, I think I see the issue, it should actually be base-url
instead of baseUrl
, I am so sorry, I'm not sure how I made this mistake! Please try changing that and let me know if it works.
I found something very weird. without changing the baseUrl to the new one, I removed the custom fourth world definition, and suddenly I could see trains on the overworld, but not on the custom map. perhaps the server was loading right as I saved a change to the config, I am unsure. Fixing it to say base-url appears to have fixed it for both the custom world and the normal overworld. And yeah, some better clarification that the ctr api needs to be public would be nice, as well as rough info on how to add custom worlds. Either way, I got it working. Thank you for your assistance!
Thank you too! I will update README again and make sure to test everything in the future, haha!
I have installed the addon as instructed, added the config entry (I just copied the entire default config so it is there). I am running the newest versions of dynmap and create track map that were compatible with the server version, fabric 1.19.2. These are specifically: Dynmap 3.6-899, CTM 1.4, fabric loader 0.14.22
The Layers show up as expected
But there are no train tracks to be found (marked in red is where they should be)
Here's a screenshot of CTM at the same location (there is a short track, a station, train and signals, none of which show up in dynmap)
It is likely important to note that my world is a bit custom, through the fabric multiworld mod I have added a fourth dimension, named lynxcraft:creative, which works just fine in CTM
The tests above were done in the normal overworld. I did also test placing tracks in the creative world, but these do not show up either. I am unsure how I would specify this fourth dimension in the dynmap-trains config, so I suspect them not being specified at all may be part of the issue. Or I missed something very obvious.
here are my full dynmap configs.
Thanks in advance for help with how to fix the addon and how to add the fourth world!