Unable to access conceptarium via the API
phkus opened this issue · comments
I've installed it via Docker and entered a token at localhost:8501. But I can't access it through the Curl or Request URL provided in the docs. Check custodian results in "{"custodian":false,"authorized_microverse":[]} and /save in "Only the conceptarium's custodian can save thoughts in it."
One thing that came to mind: I've used special characters in the token. Could the issue be with the URL encoding?
Hm, could you try:
docker container ls
docker exec -i -t <backend container id> /bin/bash
cd /app
cat records.json
This should print the contents of the records file, including the custodian token (it's plaintext because if you've got access to the file system, you could get the thoughts anyway). We'll see whether the right token made it there in the first place, and debug from there.
Looks like my token didn't get registered, it shows me a different one.
Just to make sure I didn't make a mistake at the beginning: The way I set a token after installation is simply by entering it in the token field below "connect to new microverse" the first time I log in, right?
The way I set a token after installation is simply by entering it in the token field below "connect to new microverse" the first time I log in, right?
Yeah, that should be it!
Looks like my token didn't get registered, it shows me a different one.
Oh no, is it a completely unrelated one? Or a messed up version due to some special characters?
No it's completely different. Should I send you more details in a mail?
Yeah, sure! I'm wondering whether one I used at some point slipped in due to some poor .gitignore rules, but let's have a look.
Edit: Oh I think that's the case! It's because you used the Docker approach, and when building and pushing the Docker images, Docker doesn't take into consideration the .gitignore rules. I'll look into building images which skip records.json and microverses.json, or move those to /knowledge, which is the mounted folder which only has user-specific data.
@phkus Could you please try removing your local Docker images and trying to docker-compose the latest ones? I made it so that the records.json file which contains the "master" custodian token is stored in the mounted knowledge folder, rather than among the source files.
That worked, I'm now the custodian. Thanks for your help!