fix(auth): resolve password utility import mismatch causing API restart loop
name: Bug Report
about: Report a bug in the Corpus Collector Backend.
title: "[Bug]: fix(auth): resolve password utility import mismatch causing API restart loop"
labels: "bug"
assignees: ''
title: "fix(backend): fix(auth): resolve password utility import mismatch causing API restart loop"
🐛 Bug Report
Describe the bug
The backend API container repeatedly restarted because the application failed during startup with an import error in the authentication service. The service imported get_password_hash from the password utility module, but that symbol was missing in the module at runtime, causing process exit and Docker restart loop.
To Reproduce
Steps to reproduce the behavior:
- Start the backend with Docker Compose.
- Run
docker psand observe the API container status. - Run
docker logs <api-container-id>. - See error:
ImportError: cannot import name 'get_password_hash' from app.utils.password_utilsand repeated restarts.
Expected behavior
The API should start successfully, remain in Up state, and authentication routes should load without import errors.
Screenshots
Please Refer Comments
Environment
- OS: Linux
- Browser: N/A (backend startup issue)
- Version: Python 3.13, FastAPI backend in Docker
Additional context
Observed non-blocking warning during startup:
Warning: Could not initialize LogBull logger: Invalid project ID format ...
This warning does not cause the restart loop. The primary failure was the auth password utility import mismatch.