Can't login from firefox anymore

I rebooted my Raspberry Pi running Grafana 8.4.4

Now i can’t login with firefox anymore. It says username or password wrong. But it isn’t, i can login using chrome just fine.
Also from my tablet, i can login with silk browser and chrome, but also not with firefox, same problem.

Vivaldi on Ubuntu-Desktop seems also not to work.

I also cleared all browser cache in firefox but since i can’t login even from different devices i guess that’s not the issue anyway.

Firefox on my PC with Ubuntu is 113.0.2
Firefox on my Tablet is 113.2.0.

Is this a firefox problem?

Vivaldi on Ubuntu seems also not to work…

welcome @buuuh

What do you see in your browser firefox console?

basically nothing…

yeah not much there. have not used FF in ages. can you open firefox incognito like chrome?

Incognito tab also doesn’t work. I already tried this to avoid any problems probably caused by firefox plugins…

I even just updated to grafana 9.5.2… didn’t change anything.

I just tried from may laptop which still has firefox 112.0.2 installed. Same problem. But there chrome 114.0.5735.90 also doesn’t work.

Updated Chrome on my desktop to also 114.0.5735.90… still working.

What the heck…

Next thing to check would be grafana log files

they don’t tell anything.

logger=context userId=0 orgId=0 uname= t=2023-06-01T00:18:27.458510229+02:00 level=error msg="Invalid username or password" error="invalid username or password" remote_addr= traceID=
logger=context userId=0 orgId=0 uname= t=2023-06-01T00:18:27.458911528+02:00 level=info msg="Request Completed" method=POST path=/login status=401 remote_addr= time_ms=286 duration=286.04698ms size=55 referer=http://raspee:3000/login handler=/login

Does Grafana store some Cookies/Tempfiles on the host which i can probably delete?

Are probably the entries from user_auth_token in the grafana internal sqlitedb the issue?

sqlite> select * from user_auth_token ;
63|1|828d28761251a29499dcd30eae8435e16c53c6954c8a68420f6f162d4dcdfe4d|0ef9bf9a4b342f02bf1051a35a385fa038bd57fcc11952beaab0514662899ace|Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0||1|1685562116|1685562097|1683242006|1683242006|0
64|1|0dba02288655b0f28874b83bee306f0c2675984496c695f5c0d2643f8523fe8c|96e35b16b1aed7af322ce0547a96701679d15f341e51cc97827d3cb7622d1931|Mozilla/5.0 (Linux; Android 9; KFTRWI) AppleWebKit/537.36 (KHTML, like Gecko) Silk/93.3.46 like Chrome/93.0.4577.82 Safari/537.36||1|1685565249|1685565248|1685294566|1685294566|0
66|1|90f4a1016a9da9e9d0c877df48102427ed44d7fe68bc9cefe3d0e502399d8525|1e8547c28678eed30900c4f9aa8125f7b8372a5b106f0fdc76c648ba7d855768|Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36||1|1685572480|1685572480|1685566137|1685566137|0

nope, it did not… but by deleting the contents of that table i can’t even login with chrome anymore.

It is something with the grafana sqlite db. Removing the entire sqlitedb i can login again with everything. By removing the entire sqlitedb sadly my whole dashboards and other setups are gone.
I made a backup, so i can restore it, but still don’t know what causes the login trouble.

And the logfile spams:

logger=context t=2023-06-01T00:54:42.08519227+02:00 level=warn msg="failed to look up session from cookie" error="user token not found"
logger=context userId=0 orgId=0 uname= t=2023-06-01T00:54:42.088473026+02:00 level=warn msg=Unauthorized error="user token not found" remote_addr= traceID=
logger=context userId=0 orgId=0 uname= t=2023-06-01T00:54:42.089232135+02:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr= time_ms=5 duration=5.833654ms size=40 referer= handler=/api/live/ws

after emptying the table user_auth_token i can’t login from any browser anymore. Unfortunately i didn’t make a backup before doing that. :crazy_face:

so i guess by killing the grafana server after it got stuck, the database somehow got screwed up?

How can i fix that, most likely without loosing all my other data?

With allowing anonymous access and resetting the admin password, after clearing the user_auth_token table, i somehow managed to get access again and also can login as admin even from firefox.

(I tried resetting the admin password much earlier, but it didn’t change anything)

My dashboards are still there and can be found via the search. However there seems to be no page that simply shows ALL (accessible) dashboards… quite anyoing and i wonder what people are developing software missing such essential features… :flushed:

You are a beast messing around with the sqlite table. Now you know why they call it sqlite :drum: and on top of rpi too :scream:

How many dashboards do you have? Are you able to go to a sql option that is a bit more robust like mysql?

I haven’t counted them but 10-15 dashboards i guess.

I’m also talking about the sqlite that ships with grafana located at /var/lib/grafana/grafana.db. Where grafana stores it’s own settings and stuff.

Is there even a away to make grafana use a different database?

Yeah that is what I am talking about, using mysql instead of sqlite

Basically i prefer it light(lite) weight :smiley:
And i don’t want to deal with complicated setups. Installing the debian package, and that’s it.
Maybe there is a docker image with grafana and mysql prebuilt? But i estimate, that’s to heavy already for my Pi.

1 Like