Skip to content

fix(examples): unblock the e2e suite#113

Merged
antfu merged 1 commit into
mainfrom
fix/e2e-static-build-and-auth
Jul 17, 2026
Merged

fix(examples): unblock the e2e suite#113
antfu merged 1 commit into
mainfrom
fix/e2e-static-build-and-auth

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Why

pnpm test:e2e could not complete. Playwright starts every configured webServer, so a single failing server aborts the whole run — and two independent problems were doing exactly that.

1. Static build crashed on a permission error

The next-runtime-snapshot static webServer runs node bin.mjs build, which threw:

EACCES: permission denied, chmod '.../dist/static/__next._tree.txt'

next build emits __next.*.txt RSC segment-metadata files, and the cpSync into dist/client can drop their read bits, leaving unservable assets that also trip createBuild's recursive copy. A built SPA has to be readable to be served, so the build step now normalizes the copied tree (0755 dirs / 0644 files) — a no-op where permissions are already correct.

2. Dev server rejected unauthenticated RPC

The files-inspector dev tests reported 0 files and an empty cwd because the dev server enforced auth: the browser navigates without an OTP, so RPC calls came back not authorized. The sibling single-user demos (streaming-chat, next-runtime-snapshot) already set cli.auth: false for this; files-inspector was simply missing it.

Result

npx playwright test → 14/14 passing. pnpm lint, pnpm typecheck, and pnpm build are clean. Changes are scoped to the two example projects; no core devframe code was touched.

This PR was created with the help of an agent.

The next-runtime-snapshot static webServer aborted the whole Playwright
run with an EACCES chmod on its copied SPA assets, and the files-inspector
dev server rejected the browser's unauthenticated RPC calls.

- files-inspector: opt the dev server into `auth: false`, matching the
  other single-user localhost demos, so the served SPA can call RPC
  without an OTP round-trip.
- next-runtime-snapshot: normalize the built SPA's file permissions so
  the output is always readable/servable and downstream `createBuild`
  copies don't choke on dropped read bits.
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit ed293c7
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a59f98d7f044b00089a09a5
😎 Deploy Preview https://deploy-preview-113--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 0454e7b into main Jul 17, 2026
12 checks passed
@antfu
antfu deleted the fix/e2e-static-build-and-auth branch July 17, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants