Cannot login after restoring database

56 views
Skip to first unread message

Mamisoa Andriantafika

unread,
Apr 30, 2024, 4:58:16 PM4/30/24
to py4web
Hi,

I initialize a new py4web app from a working one with an empty mysql database.
I remove all files from database directory.
1) If I try to create a new user from the dashboard, I get the error:
Invalid field value: past_passwords_hash.
So I cannot login.
2) then if I restore the database and use existing users:
a) I cannot login using known users: invalid credentials
b) I can change the password or other fields from the dashboard BUT it is not saved in the database. Although the app can read data without troubles.
Fields can be updated from the app, but I cannot access the pasword field as I cannot login.

I find no error in the browser console.
I have this not reccurent error in the py4web output:
attempted access to fixture Session from outside a request > Thread-3 > 22:55:07.505

Any idea ?

Mamisoa

Massimo

unread,
May 8, 2024, 1:09:18 AM5/8/24
to py4web
Dan you provide a complete traceback?

Maurice Waka

unread,
May 8, 2024, 5:56:55 PM5/8/24
to Massimo, py4web
I once had the same issue but here.....I remove all files from database directory

I had to re-register and the problem was solved. I may have removed all auth user details making it difficult to login

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/f484d129-c540-4832-abea-e1d8a4497c01n%40googlegroups.com.

Mamisoa Andriantafika

unread,
May 9, 2024, 5:48:19 AM5/9/24
to py4web
@massimo I actually don't have any error message.

OK I did a stupid mistake: the password recorded in the browser on my developpment machine and work machine were different. Sorry.

But while investigating, I found an error in the javascript view from the dashboard:

I created a new environnement: 

Py4web: 1.20240507.1 on Python 3.12.3 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:46:43) [GCC 11.2.0]

and used the scaffold app that uses local sqlite by default.

I get the same error: Invalid field value: past_passwords_hash trying to create a new login _dashboard.Capture d’écran du 2024-05-09 10-33-29.png

I can create a login from the application, but I cannot modify any field from the dashboard. There is a mapping error in the js from the view. 

cf attached file

Mamisoa
Capture d’écran du 2024-05-09 11-18-48.png
Reply all
Reply to author
Forward
0 new messages