daveschumaker / artbot-for-stable-diffusion

A front-end GUI for interacting with the AI Horde / Stable Diffusion distributed cluster
https://tinybots.net/artbot
MIT License
172 stars 40 forks source link

Some users encountering issues with being periodically logged out of the AI Horde #205

Open daveschumaker opened 8 months ago

daveschumaker commented 8 months ago

I was talking about this on Discord and I suspect this is what is happening:

I suspect there is a race condition on my end. If I recall, when ArtBot pings to AI Horde API to check your user info with your API key, if it gets an invalid response (e.g., server timeout, server down, some sort of network hiccup), it just ends up logging you out by essentially erasing the stored API key.

The API endpoint ArtBot periodically pings to check user status is the same endpoint used when "logging in" to the AI Horde. If the endpoint returns a timeout, bad response, or some network condition happens, ArtBot assumes the login failed. The logic seems to incorrectly carry over to where we periodically ping the API for updated user stats.