bmartin5692 / bumper

A standalone and self-hosted implementation of the central server used by Ecovacs vacuum robots.
GNU General Public License v3.0
286 stars 48 forks source link

Logged out, can't log back in #55

Closed zombielinux closed 4 years ago

zombielinux commented 4 years ago

Describe the bug After a toddler hits the log-out button, I cannot log in.

To Reproduce Steps to reproduce the behavior:

  1. Hand phone to toddler
  2. Gaze upon the "login" screen
  3. Attempt to log in with usual username/password
  4. See Log

Expected behavior Login with view of robot

Actual Behavior [2019-10-14 16:51:35,487] :: INFO :: confserver :: client with devid $HASH attempting login [2019-10-14 16:51:38,566] :: ERROR :: confserver :: 'did' Traceback (most recent call last): File "/root/bumper/bumper/confserver.py", line 492, in _auth_any bumper.user_add_bot(tmpuser["userid"], bot["did"]) KeyError: 'did'

Desktop (please complete the following information):

Smartphone (please complete the following information):

Vacuum (please complete the following information):

Extra Info

Sucks cannot log in using any username/password combination.

bmartin5692 commented 4 years ago

@zombielinux - Thanks for the laugh, I've been there with toddler bugs.

I wasn't quite able to reproduce this, and actually think your database may be corrupt. I think the best thing is to delete the bumper.db in your data directory then try again. I went ahead and put in a test and some better handling if a bot happens to end up in the database without a DID attribute. Hopefully that will catch and fail gracefully if this happens in the future. This change has been merged into the master, if you want to pull and try again.