Skip to content

FE-M0-25 · The error pages on the local stack, from the pull request

ID FE-M0-25 · Level L0 · Run order row 29a · Why R-APP-07 to R-APP-10, D10, D15, D29 · Issue #202

On your Mac's local stack, from main, where pack G merged in #209: every Playwright spec passes, the seven new ones among them (the 404 page, a page failing on the server and in the browser, the shell and root layouts failing, and a refusal and a failed request beside their control). You have also seen each error page yourself, and checked that the fault page can't open without E2E_FAULTS=1. This step changes no file: the code is on main.

  • Pack E is merged (#199), and TL-M0-19's e2e job is on main (#207).
  • Pack G is merged (#209).
  • Docker Desktop is running, the local stack is running, and apps/web/.env.local points at it (FE-M0-06). Nothing runs on ports 3000 or 3100.
  • You are in ~/opleet-v2/opleet and git status --short prints nothing.

1 · main, the database from its migrations, and the E2E logins

Section titled “1 · main, the database from its migrations, and the E2E logins”
Terminal window
git fetch origin
git switch main
git pull
pnpm install
pnpm supabase db reset
pnpm db:e2e-users

2 · Unit tests, typecheck, lint and the rule check

Section titled “2 · Unit tests, typecheck, lint and the rule check”
Terminal window
pnpm --filter web test
pnpm --filter web typecheck
pnpm lint
pnpm docs:rules

Playwright starts the built app with E2E_FAULTS=1 itself (playwright.config.ts); you set nothing.

Terminal window
pnpm --filter web build
pnpm --filter web e2e

4 · The fault page is off without the switch

Section titled “4 · The fault page is off without the switch”
Terminal window
pnpm --filter web start

In a browser, sign in at http://localhost:3000 as the E2E admin and open http://localhost:3000/e2e-faults. Then stop the app with Ctrl+C.

Terminal window
E2E_FAULTS=1 pnpm --filter web start

Signed in as the E2E admin at http://localhost:3000:

  1. Open /tidak-ada.
  2. Open /e2e-faults. In the browser's console, run document.cookie = "opleet-e2e-fault=page; path=/" and reload. Then run document.cookie = "opleet-e2e-fault=; path=/; max-age=0" and press Coba lagi.
  3. Do the same with shell in place of page, and press Coba lagi · Try again. Then with root.
  4. On /e2e-faults, press Ask for a language the database refuses.

Stop the app with Ctrl+C.

  • Block 1: “Finished supabase db reset”, then “11 logins in the E2E organization, all pools. .env.e2e updated (password not shown).”
  • Block 2: “ℹ tests 52” and “ℹ pass 52” (pack F added 7); typecheck with “Keys: 112. With English: 112. Without: 0.” and no errors; “No fixes applied.”; a line starting “Rules:” and no error. These are main's counts at 0d3f1b3; later merges may raise them, and what matters is “ℹ fail 0”, “Without: 0” and no rule error.
  • Block 3: the build lists ƒ /e2e-faults among the routes. Playwright ends with “34 passed”, among them the R-APP-07, R-APP-08 (twice), R-APP-09 (shell and root) and R-APP-10 (twice) lines. Lines starting [WebServer] ⨯ Error: E2E fault: are the forced failures in the server's log, and expected.
  • Block 4: /e2e-faults shows the 404 page inside the shell: “Halaman tidak ditemukan”, with the menu.
  • Block 5:
    1. /tidak-ada shows the same 404 page, with Ke halaman awal leading to /dashboard.
    2. page: the menu stays, and the page area shows “Halaman ini gagal dimuat”, “Ref:” with a number, and Coba lagi. No “E2E fault” anywhere. After clearing the cookie, Coba lagi shows “The fault page rendered.”
    3. shell and root: a plain page with no menu, “Opleet sedang bermasalah” with “Opleet ran into a problem” below it, a reference, Coba lagi · Try again and Ke halaman masuk · Go to sign-in. After clearing the cookie, the button brings the dashboard back.
    4. “Bahasa xx belum tersedia.” appears just under the button, and the rest of the page stays.
Terminal window
git status --short

Nothing: the specs and the builds leave no tracked file changed.

  • A spec fails: run pnpm --filter web exec playwright show-report, open the failing test, and paste its name, its error and the page address into #202. FE fixes it on a branch.
  • Every fault spec fails with “/e2e-faults answers 404: the app runs without E2E_FAULTS=1”: another server was already on port 3100, and Playwright reused it. Stop it and run block 3's second line again.
  • Block 4 shows “The fault page rendered.”: the shell has E2E_FAULTS set. Run unset E2E_FAULTS and run block 4 again. The fault page must never open without it.
  • Block 5's root page doesn't change: the cookie was set on another path. Use path=/ exactly as written.
  • R-APP-10's network spec fails at “sign-out”: the sign-out redirect reached the page as an error. Paste the report's screenshot; that one is FE's to fix.

Nothing to undo: the step changes no file, and pnpm supabase db reset and pnpm db:e2e-users give the local database back. Nothing touches staging or production.

Not run yet. Log each run as a comment on #202.