Closed wchristian closed 2 years ago
For fetching/saving the configuration in the dashboard CM uses auth from the account you used to login to the dashboard with, not the bot account running for the subreddit. Meaning, the reddit account you logged in with must be able to access/edit the wiki page for the subreddit you are viewing IE r/VaushV
Can you confirm that your account has full
mod permissions or at least manage wiki
mod permission for r/VaushV
?
Ah, sorry, i was unclear, that happens in a lot of places in the ui. The frontpage debug log loads fine, but on the bot page the spinner goes endlessly and the network tab of chrome says there's a 404 XHR call.
Also the config looks like this, and i'm logged into the browser with VaushVall, and the permissions look like this.
operator:
name: VaushVall
bots:
- name: VaushVall
credentials:
reddit:
accessToken: CCCCCCCCCCCCCCCCCC
refreshToken: DDDDDDDDDDDDDDDDDDDDDDDDDDD
clientId: AAAAAAAAAAAAAAAAAA
clientSecret: BBBBBBBBBBBBBBBBBBBBB
subreddits:
names:
- vaushv
web:
credentials:
clientId: AAAAAAAAAAAAAAAAAA
clientSecret: BBBBBBBBBBBBBBBBBBBBB
I have a hunch this has to do with session persistence. You have not set caching
in your operator config, correct?
Can you try this:
web:
credentials:
...
session:
secret: mySecret
No caching is configured. I added the section as you have it there, with the exact secret text "meepmarp", deleted cookies, restarted, reconnected, no change.
However i noticed something.
This works: http://localhost:8085/?instance=localhost%3A8095&bot=VaushVall&sub=r%2FVaushV
That page links to the bot config page, and the url looks as follows, and doesn't work.
http://localhost:8085/config?format=yaml&instance=&bot=VaushVall&subreddit=r/VaushV
If i insert the instance text from above into the url, it works.
So that value gets lost somehow.
Btw, if you wanna discuss this in more realtime: Mithaldu#5818 (Tho i'm in europe and it's past midnight here already.)
Ah excellent catch, that's a good lead and should help me reproduce. I will hit you up on discord if I need more info, thanks!
P.S. for now you should be able to fix this by adding this to your operator config at the top level:
api:
friendly: local
Can confirm that seems to fix things. :)
The bot moderates fine as far as i can tell, but in the web interface, when i click on e.g. the config view, i get this:
http://localhost:8085/config?format=yaml&instance=&bot=VaushVall&subreddit=r/VaushV
The docker log shows nothing. Where do i even start debugging this?