FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
12 stars 17 forks source link

Adding a user as admin does not work #305

Closed JEK58 closed 1 year ago

JEK58 commented 1 year ago

Tested both in local-production and production.

Pressing "save" will initiate request that fails with a "504" after some while.

Screenshot 2023-07-07 at 19 06 50
biuti commented 1 year ago

I just did it, user was added and confirmation mail received. What's the error in log?

JEK58 commented 1 year ago

It was a misconfiguration of the email server. But there was basically no error log that would tell you about what would be wrong. Had to add some print() to actually find out what went wrong. (If you wait long enough the client would actually hint that it has something to do with sending emails.)

Edit: I'm coming from JS/TS world so please excuse my maybe stupid questions, but why didn't you add PYTHONUNBUFFERED: "1" to the docker-compose services env sections. I see that there are a lot of print() statements in the code but none of them would appear in the docker logs. Or did I get that wrong?

biuti commented 1 year ago

Yes there's a lot of feedback to add, to help users and admins to solve issues. This is probably an important one, code should check and prevent to add users if smtp settings are not proper.

I'd like ideally to use print statement in tests, and remove / comment out them in release, I also created a log method to keep track of certain processes. But meanwhile probably you're right.

Can we close this then?

JEK58 commented 1 year ago

Yep, will close this. Maybe have a look at the PR regarding the unbuffered logs: https://github.com/FAI-CIVL/FAI-Airscore/pull/306