Skip to content

E2E suite fails in CI: login times out (auth broken in e2e environment) #414

Description

@TerrifiedBug

Summary

The E2E Tests workflow fails with ~30 failing tests because login does not work in the CI e2e environment. The app builds and the server starts fine (next build succeeds, prisma migrate deploy runs), but the auth flow fails, cascading into timeouts across nearly every test.

Evidence

From the E2E run on the recent Dependabot PRs (identical failure on every PR, independent of the dependency change):

  • e2e/tests/auth.spec.ts "should log in with valid credentials and redirect to dashboard" → TimeoutError: locator.waitFor.
  • "should show error for invalid credentials" → navigates to http://localhost:3000/api/auth/error instead of rendering the inline error container.
  • ~30 downstream tests (fleet, pipelines, alerts, deploy, etc.) all time out because they depend on being logged in.

Impact

This is a pre-existing e2e-suite/environment problem, not a product regression. Notably, the full E2E workflow was just moved to a weekly schedule (.github/workflows/e2e.yml cron 0 5 * * 1) — that scheduled run will be red every Monday until this is fixed.

Suggested investigation

  • Credentials provider config / NEXTAUTH_URL / NEXTAUTH_SECRET in the e2e job env.
  • Whether the e2e seed creates the expected login user.
  • Why invalid-credential errors redirect to /api/auth/error instead of surfacing inline (page-object LoginPage.expectError at e2e/pages/login.page.ts:33).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions