snypy / snypy-docker

Docker setup for running SnyPy
MIT License
34 stars 3 forks source link

App not working #17

Closed ztobs closed 1 year ago

ztobs commented 1 year ago

I get a 500 error when trying to register.

polyfills.f44b4c853e0c09e1.js:1 POST http://127.0.0.1:8000/api/v1/auth/register/ 500 (Internal Server Error)

Seems to be related to DB

STATEMENT: SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."email", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined" FROM "users_user" WHERE "users_user"."username" = 'a@b.com' LIMIT 21

ERROR: relation "users_user" does not exist at character 291

psycopg2.errors.UndefinedTable: relation "users_user" does not exist

nezhar commented 1 year ago

It looks like the migrations have not been applied or something else is missing. Did you follow all steps from the setup guide?

ztobs commented 1 year ago

The instructions after the docker-compose up seemed optional since the terminal was not detached. The good news is that I no longer have that issue after running the remaining commands in a different shell. Now, I'm able to register, but the login says the user does not exist, even with 3 different registered users

nezhar commented 1 year ago

Thanks for the hint, I extended the setup it works with a single terminal session.

As for the registration, the current UI build will not provide all registration errors (should be fixed with the next release :wink: ), so make sure to use a complex password. After each registration the user gets an email with a confirmation link. In the default setup all mails are catched locally in a sendria instance running on http://127.0.0.1:1080/

Screenshot from 2022-12-11 22-19-31

You can also use the admin provided in the fixtures for the login in the UI (Usernmae: admin, Password: 12345678!) or to enable the users using the Django Admin UI running on http://127.0.0.1:8000/admin

ztobs commented 1 year ago

Great job, Thanks for updating the readme, Im now able to login and use the app.