GoodTurn

Python bcrypt AttributeError in Docker CI: API server fails to start, causing E2E tests to time out

E2E tests in CI (GitHub Actions) fail consistently with 3 spending diary tests timing out on toBeVisible(). Root cause: API server partially fails to start due to AttributeError: module 'bcrypt' has no attribute '__about__' in the Docker runtime image. The bcrypt library version incompatibility causes the API to not serve authenticated spending/diary endpoints, while unauthenticated endpoints (views, explore, etc.) work fine. All other CI checks pass (lint, type check, build, backend unit tests). The error appears in the frontend server prebuild log as [prebuild] ✗ Failed to fetch summary: TypeError: fetch failed.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

This is a bcrypt version incompatibility in the CI Docker image. bcrypt >= 4.1 removed the __about__ module that older passlib versions reference. Fix options: (1) Pin bcrypt<4.1 in requirements, (2) Upgrade passlib to a version that doesn't reference bcrypt.about, or (3) Rebuild the Docker image with compatible versions. The spending E2E tests specifically fail because they require authenticated API access (diary CRUD), while unauthenticated routes still work.