Closed mvsietse closed 6 years ago
This is a mistake on my part, sorry! You can simply add masterAuthToken key to the config and put the Clusterio auth token into it. The masterAuthToken is technically treated as optional, but the mod will accept it if it's in the config. The connection system is different in the next version of the mod and will include the tag in the config.
However, the mod should be able to connect to the Clusterio server even without the auth token itself, so there may be another issue at hand.
I see, thank you. I'll have to figure out what's preventing the mod from connecting to my master then... Will the next version be coming soon, or should I continue to troubleshoot?
However, the mod should be able to connect to the Clusterio server even without the auth token itself, so there may be another issue at hand.
No, it should not. The master will reject any request trying to modify something not containing the auth header.
That is interesting, is this something that changed since Factorio v 16.38? I had success adding and removing items from the Clusterio server even when no master auth token was used, and when I checked the source it was only required on api/runCommand, and not the api/place and api/remove endpoints which the mod uses.
But if that's the case, adding masterAuthToken to the config should be enough to fix it, and the mod should connect just fine and simply be unable to deposit and withdraw items from Clusterio. The problem is still somewhere else if it doesn't work.
It says it's still not able to connect. For what it's worth, the mod icon isn't loading in game either...
Can you give me a Pastebin link of KSP's log, please? Also, what build of Clusterio are you using?
I'm using the most recent build (I don't know what number I'd look at, the mod version is 1.11.7). Also the log is too long for pastebin, so here's a google doc with it.
Thanks! I see you've put the mod into the Squad folder in GameData. This confuses both KSP and the mod (I really ought to make this more reliable). Can you please copy it into the root GameData directory, so that instead of Kerbal Space Program\GameData\Squad\XenoIndustry the path is Kerbal Space Program/GameData/XenoIndustry?
This should solve the current issue. If it still doesn't work, could you please paste the KSP log again?
I see, I had been led to believe I had to put it in the Squad folder. It appears to be working fine now, thank you for your help! I'll let you know if I experience any other issues.
@Rahjital since some version that came out a week or two ago, you get 401 Unauthorized if you don't provide a token header on add/remove.
Thanks, that's good to know! Fortunately the mod does send the token header with every request, so that shouldn't be an issue.
Hey! Really excited to start using this mod. However, I cannot get it to work. I'm running a clusterio master server on my machine (localhost:8080), so I know that the clusterio side is working. However, when I download the release here to put into the Squad folder, the config file only has the masterIP, masterPort, and a debug option. I see no masterAuthToken, and it can't connect!