Skip to content

[test] Properly log framereceived payload#91266

Merged
eps1lon merged 2 commits into
canaryfrom
sebbie/03-12-_test_properly_log_framereceived_payload
Mar 12, 2026
Merged

[test] Properly log framereceived payload#91266
eps1lon merged 2 commits into
canaryfrom
sebbie/03-12-_test_properly_log_framereceived_payload

Conversation

@eps1lon
Copy link
Copy Markdown
Member

@eps1lon eps1lon commented Mar 12, 2026

We just stringified the value as-is which can produce invalid JS. This is only noticedable in Playwright traces where the errors are just noise.

Before:
CleanShot 2026-03-12 at 16 26 17@2x

After:
CleanShot 2026-03-12 at 18 16 34@2x

I originally sent the payload as is but that seems too expensive for Playwright. Regularly saw 300+ ms when doing that instead of using upfront serialization which takes around 10-70ms.

@nextjs-bot nextjs-bot added created-by: Next.js team PRs by the Next.js team. tests labels Mar 12, 2026
Copy link
Copy Markdown
Member Author

eps1lon commented Mar 12, 2026

Comment thread test/lib/browsers/playwright.ts Outdated
@nextjs-bot
Copy link
Copy Markdown
Contributor

nextjs-bot commented Mar 12, 2026

Failing test suites

Commit: 60f8730 | About building and testing Next.js

pnpm test-dev test/e2e/app-dir/navigation/navigation.test.ts (job)

  • app dir - navigation > hash-link-back-to-same-page > should scroll to the specified hash (DD)
  • app dir - navigation > hash-with-scroll-offset > should scroll to the specified hash (DD)
Expand output

● app dir - navigation › hash-with-scroll-offset › should scroll to the specified hash

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  223 |
  224 |   describe('hash-with-scroll-offset', () => {
> 225 |     it('should scroll to the specified hash', async () => {
      |     ^
  226 |       const browser = await next.browser('/hash-with-scroll-offset')
  227 |
  228 |       const checkLink = async (

  at it (e2e/app-dir/navigation/navigation.test.ts:225:5)
  at describe (e2e/app-dir/navigation/navigation.test.ts:224:3)
  at Object.describe (e2e/app-dir/navigation/navigation.test.ts:4:1)

● app dir - navigation › hash-link-back-to-same-page › should scroll to the specified hash

page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('#to-other-page') to be visible

  523 |
  524 |     return this.startChain(async () => {
> 525 |       const el = await page.waitForSelector(selector, {
      |                             ^
  526 |         timeout,
  527 |         state,
  528 |       })

  at waitForSelector (lib/browsers/playwright.ts:525:29)
  at Object.<anonymous> (e2e/app-dir/navigation/navigation.test.ts:270:7)
  at Proxy._chain (lib/browsers/playwright.ts:655:23)
  at Proxy._chain (lib/browsers/playwright.ts:636:17)
  at Proxy.startChain (lib/browsers/playwright.ts:524:17)
  at Object.waitForElementByCss (e2e/app-dir/navigation/navigation.test.ts:279:10)

pnpm test-dev-turbo test/development/app-dir/browser-log-forwarding/fixtures/verbose-level/verbose-level.test.ts (turbopack) (job)

  • browser-log-forwarding verbose level > should forward all logs to terminal (DD)
Expand output

● browser-log-forwarding verbose level › should forward all logs to terminal

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `browser-log-forwarding verbose level should forward all logs to terminal 1`

- Snapshot  - 3
+ Received  + 3

  [browser] browser log: this is a log message (app/page.tsx:7:13)
  [browser] browser info: this is an info message (app/page.tsx:8:13)
- [browser] browser warn: this is a warning message (app/page.tsx:9:13)
+ [browser] browser debug: this is a debug message (app/page.tsx:11:13)
- [browser] browser error: this is an error message 
+ [browser] browser warn: this is a warning message (app/page.tsx:9:13)
- [browser] browser debug: this is a debug message (app/page.tsx:11:13)
+ [browser] browser error: this is an error message

  36 |       .join('\n')
  37 |
> 38 |     expect(browserLogs).toMatchInlineSnapshot(`
     |                         ^
  39 |      "[browser] browser log: this is a log message (app/page.tsx:7:13)
  40 |      [browser] browser info: this is an info message (app/page.tsx:8:13)
  41 |      [browser] browser warn: this is a warning message (app/page.tsx:9:13)

  at Object.toMatchInlineSnapshot (development/app-dir/browser-log-forwarding/fixtures/verbose-level/verbose-level.test.ts:38:25)

@nextjs-bot
Copy link
Copy Markdown
Contributor

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▇▁█▁█
Cold (Ready in log) 435ms 437ms ▇▁█▂▇
Cold (First Request) 1.186s 1.232s █▃█▃▇
Warm (Listen) 457ms 456ms █▁█▁█
Warm (Ready in log) 440ms 439ms █▁█▁▇
Warm (First Request) 343ms 340ms █▁█▁▇
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▁▁▁▁▁
Cold (Ready in log) 439ms 437ms ▅▆▇▁▇
Cold (First Request) 1.946s 1.954s ▄▄▄▁▃
Warm (Listen) 455ms 456ms ▁▁▁▁▁
Warm (Ready in log) 438ms 438ms ▅▄▄▁▆
Warm (First Request) 1.953s 1.988s ▃▃▃▁▃

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 3.868s 3.837s ▇▁█▁▇
Cached Build 3.951s 3.912s █▁█▁▆
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 14.262s 14.277s ▂▂▁▁▂
Cached Build 14.372s 14.321s ▂▁▂▁▂
node_modules Size 481 MB 481 MB ▁████
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **408 kB** → **408 kB** ✅ -21 B

80 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 764 B 764 B
Total 764 B 764 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 452 B 451 B
Total 452 B 451 B ✅ -1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
5528-HASH.js gzip 5.54 kB N/A -
6280-HASH.js gzip 59.6 kB N/A -
6335.HASH.js gzip 169 B N/A -
912-HASH.js gzip 4.59 kB N/A -
e8aec2e4-HASH.js gzip 62.6 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB
main-app-HASH.js gzip 254 B 254 B
main-HASH.js gzip 39.2 kB 39.2 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
262-HASH.js gzip N/A 4.59 kB -
2889.HASH.js gzip N/A 169 B -
5602-HASH.js gzip N/A 5.55 kB -
6948ada0-HASH.js gzip N/A 62.6 kB -
9544-HASH.js gzip N/A 60.4 kB -
Total 233 kB 234 kB ⚠️ +729 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 194 B
_error-HASH.js gzip 183 B 180 B 🟢 3 B (-2%)
css-HASH.js gzip 331 B 330 B
dynamic-HASH.js gzip 1.81 kB 1.81 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 351 B 352 B
hooks-HASH.js gzip 384 B 383 B
image-HASH.js gzip 580 B 581 B
index-HASH.js gzip 260 B 260 B
link-HASH.js gzip 2.51 kB 2.51 kB
routerDirect..HASH.js gzip 320 B 319 B
script-HASH.js gzip 386 B 386 B
withRouter-HASH.js gzip 315 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.98 kB 7.98 kB ✅ -1 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 125 kB 125 kB
page.js gzip 266 kB 266 kB
Total 391 kB 391 kB ⚠️ +237 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 617 B 614 B
middleware-r..fest.js gzip 156 B 155 B
middleware.js gzip 43.9 kB 43.7 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 45.6 kB 45.3 kB ✅ -261 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 715 B 718 B
Total 715 B 718 B ⚠️ +3 B
Build Cache
Canary PR Change
0.pack gzip 4.19 MB 4.19 MB
index.pack gzip 107 kB 108 kB
index.pack.old gzip 108 kB 107 kB
Total 4.41 MB 4.41 MB ✅ -292 B

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 331 kB 331 kB
app-page-exp..prod.js gzip 179 kB 179 kB
app-page-tur...dev.js gzip 331 kB 331 kB
app-page-tur..prod.js gzip 179 kB 179 kB
app-page-tur...dev.js gzip 327 kB 327 kB
app-page-tur..prod.js gzip 177 kB 177 kB
app-page.run...dev.js gzip 328 kB 328 kB
app-page.run..prod.js gzip 177 kB 177 kB
app-route-ex...dev.js gzip 75.9 kB 75.9 kB
app-route-ex..prod.js gzip 51.6 kB 51.6 kB
app-route-tu...dev.js gzip 75.9 kB 75.9 kB
app-route-tu..prod.js gzip 51.6 kB 51.6 kB
app-route-tu...dev.js gzip 75.5 kB 75.5 kB
app-route-tu..prod.js gzip 51.4 kB 51.4 kB
app-route.ru...dev.js gzip 75.5 kB 75.5 kB
app-route.ru..prod.js gzip 51.4 kB 51.4 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 43.3 kB 43.3 kB
pages-api-tu..prod.js gzip 32.9 kB 32.9 kB
pages-api.ru...dev.js gzip 43.2 kB 43.2 kB
pages-api.ru..prod.js gzip 32.9 kB 32.9 kB
pages-turbo....dev.js gzip 52.6 kB 52.6 kB
pages-turbo...prod.js gzip 38.5 kB 38.5 kB
pages.runtim...dev.js gzip 52.6 kB 52.6 kB
pages.runtim..prod.js gzip 38.5 kB 38.5 kB
server.runti..prod.js gzip 62.4 kB 62.4 kB
Total 2.94 MB 2.94 MB ⚠️ +2 B
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/43d9832d3bff0ef930964c799e2b8c5d32d83c25/next

@eps1lon eps1lon force-pushed the sebbie/03-12-_test_properly_log_framereceived_payload branch from 03b9ae5 to 60f8730 Compare March 12, 2026 16:12
@eps1lon eps1lon marked this pull request as ready for review March 12, 2026 17:16
@eps1lon eps1lon requested a review from unstubbable March 12, 2026 17:17
@eps1lon eps1lon merged commit 0b1604a into canary Mar 12, 2026
159 checks passed
@eps1lon eps1lon deleted the sebbie/03-12-_test_properly_log_framereceived_payload branch March 12, 2026 18:23
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants