Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify error message in isSerializableProps #22856

Merged
merged 7 commits into from
Jul 25, 2021

Conversation

arturmuller
Copy link
Contributor

I recently received the "Props must be returned as a plain object" error when I accidentally dropped an array directly inside props. This is a trivial error to fix once you know what you did, but I spent good 30 minutes looking in all the wrong places. I hope that this slight clarification in the error message would save someone from wasting their time if they make a similar mistake like myself.

@ijjk
Copy link
Member

ijjk commented Mar 7, 2021

Failing test suites

Commit: e896570

test/unit/is-serializable-props.unit.test.js

  • isSerializableProps > handles null and undefined props
Expand output

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 1`

- Snapshot  - 1
+ Received  + 1

  Error serializing props returned from `test` in "/".
- Reason: Props must be returned as a plain object from test: `{ props: { ... } }`.
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Null]`).

   5 |   it('handles null and undefined props', () => {
   6 |     expect(() => isSerializableProps('/', 'test', null))
>  7 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
   8 | "Error serializing props returned from \`test\` in \\"/\\".
   9 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\`."
  10 | `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:7:8)

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 2`

- Snapshot  - 1
+ Received  + 1

  Error serializing props returned from `test` in "/".
- Reason: Props must be returned as a plain object from test: `{ props: { ... } }`.
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Undefined]`).

  11 | 
  12 |     expect(() => isSerializableProps('/', 'test', undefined))
> 13 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  14 | "Error serializing props returned from \`test\` in \\"/\\".
  15 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\`."
  16 | `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:13:8)

@ijjk
Copy link
Member

ijjk commented Mar 7, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 11.2s 12s ⚠️ +839ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.179 2.27 ⚠️ +0.09
/ avg req/sec 1147.41 1101.3 ⚠️ -46.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.426 1.538 ⚠️ +0.11
/error-in-render avg req/sec 1752.58 1625.92 ⚠️ -126.66
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
amp-e3e9bc99..932c.js gzip 536 B 536 B
hooks-5023ef..3670.js gzip 888 B 888 B
index-3a2b03..c677.js gzip 227 B 227 B
link-177412b..043e.js gzip 1.67 kB 1.67 kB
routerDirect..1a66.js gzip 303 B 303 B
withRouter-9..1b7d.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 615 B 615 B
link.html gzip 623 B 623 B
withRouter.html gzip 609 B 609 B
Overall change 1.85 kB 1.85 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 14.9s 14.7s -152ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
amp-e3e9bc99..932c.js gzip 536 B 536 B
hooks-5023ef..3670.js gzip 888 B 888 B
index-3a2b03..c677.js gzip 227 B 227 B
link-177412b..043e.js gzip 1.67 kB 1.67 kB
routerDirect..1a66.js gzip 303 B 303 B
withRouter-9..1b7d.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
_error.js 1.02 MB 1.02 MB ⚠️ +117 B
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.5 kB 10.5 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB ⚠️ +117 B
link.js 1.08 MB 1.08 MB ⚠️ +117 B
routerDirect.js 1.07 MB 1.07 MB ⚠️ +117 B
withRouter.js 1.07 MB 1.07 MB ⚠️ +117 B
Overall change 5.27 MB 5.27 MB ⚠️ +585 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 14.5s 14.6s ⚠️ +97ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall increase ✓
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.313 2.183 -0.13
/ avg req/sec 1080.81 1145.46 +64.65
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.557 1.499 -0.06
/error-in-render avg req/sec 1605.81 1667.8 +61.99
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-aedc815..1421.js gzip 1.26 kB 1.26 kB
_error-71ec2..1a96.js gzip 3.38 kB 3.38 kB
amp-33a09cb0..6745.js gzip 536 B 536 B
hooks-4e968a..f870.js gzip 902 B 902 B
index-5c6845..f75c.js gzip 230 B 230 B
link-99f0c6c..b84a.js gzip 1.65 kB 1.65 kB
routerDirect..bb56.js gzip 306 B 306 B
withRouter-7..2133.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 326 B 326 B
Overall change 326 B 326 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 586 B 586 B
link.html gzip 594 B 594 B
withRouter.html gzip 582 B 582 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "5W0YzoXhDWudoxYxve6y6",
+        "buildId": "zYJ7pv0DxY34ujj0bm2_p",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_buildManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_ssgManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "5W0YzoXhDWudoxYxve6y6",
+        "buildId": "zYJ7pv0DxY34ujj0bm2_p",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_buildManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_ssgManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "5W0YzoXhDWudoxYxve6y6",
+        "buildId": "zYJ7pv0DxY34ujj0bm2_p",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_buildManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/5W0YzoXhDWudoxYxve6y6/_ssgManifest.js"
+      src="/_next/static/zYJ7pv0DxY34ujj0bm2_p/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: e896570

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Can you update the integration test to make it pass.

@arturmuller
Copy link
Contributor Author

@timneutkens sure thing, will do.

@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Failing test suites

Commit: 55b8d8d

test/unit/is-serializable-props.unit.test.js

  • isSerializableProps > handles null and undefined props
  • isSerializableProps > handles non-plain object props
Expand output

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 1`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Null]`)."
-

   5 |   it('handles null and undefined props', () => {
   6 |     expect(() => isSerializableProps('/', 'test', null))
>  7 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
   8 | "Error serializing props returned from \`test\` in \\"/\\".
   9 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Null]\`)."
  10 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:7:8)

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 2`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Undefined]`)."
-

  11 | 
  12 |     expect(() => isSerializableProps('/', 'test', undefined))
> 13 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  14 | "Error serializing props returned from \`test\` in \\"/\\".
  15 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Undefined]\`)."
  16 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:13:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 1`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Array]`)."
-

  19 |   it('handles non-plain object props', () => {
  20 |     expect(() => isSerializableProps('/', 'test', []))
> 21 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  22 | "Error serializing props returned from \`test\` in \\"/\\".
  23 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Array]\`)."
  24 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:21:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 2`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  25 | 
  26 |     expect(() => isSerializableProps('/', 'test', class Foobar {}))
> 27 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  28 | "Error serializing props returned from \`test\` in \\"/\\".
  29 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  30 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:27:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 3`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  31 | 
  32 |     expect(() => isSerializableProps('/', 'test', function Foobar() {}))
> 33 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  34 | "Error serializing props returned from \`test\` in \\"/\\".
  35 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  36 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:33:8)

@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 12.6s 12.7s ⚠️ +99ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall increase ✓
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.174 2.094 -0.08
/ avg req/sec 1149.94 1193.98 +44.04
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.325 1.308 -0.02
/error-in-render avg req/sec 1887.16 1910.59 +23.43
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 14.6s 14.5s -106ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
_error.js 1.02 MB 1.02 MB ⚠️ +117 B
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB ⚠️ +117 B
link.js 1.08 MB 1.08 MB ⚠️ +117 B
routerDirect.js 1.07 MB 1.07 MB ⚠️ +117 B
withRouter.js 1.07 MB 1.07 MB ⚠️ +117 B
Overall change 5.27 MB 5.27 MB ⚠️ +585 B

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 14.4s 14.4s ⚠️ +24ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.137 2.22 ⚠️ +0.08
/ avg req/sec 1169.94 1125.92 ⚠️ -44.02
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.345 1.423 ⚠️ +0.08
/error-in-render avg req/sec 1858.66 1756.53 ⚠️ -102.13
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.62 kB 6.62 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-0c62a59..94b7.js gzip 1.26 kB 1.26 kB
_error-97d24..ed28.js gzip 3.38 kB 3.38 kB
amp-2926e4c2..9ccc.js gzip 536 B 536 B
hooks-1ed65b..8908.js gzip 902 B 902 B
index-6259b6..77d8.js gzip 230 B 230 B
link-b722682..14a4.js gzip 1.65 kB 1.65 kB
routerDirect..862a.js gzip 306 B 306 B
withRouter-4..76fd.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 587 B 587 B
link.html gzip 593 B 593 B
withRouter.html gzip 580 B 580 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "iWk6gXvsXuDIC4vHWBfMA",
+        "buildId": "WHTcP4szRrocXUbz72VNn",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_buildManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_ssgManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "iWk6gXvsXuDIC4vHWBfMA",
+        "buildId": "WHTcP4szRrocXUbz72VNn",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_buildManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_ssgManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "iWk6gXvsXuDIC4vHWBfMA",
+        "buildId": "WHTcP4szRrocXUbz72VNn",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_buildManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/iWk6gXvsXuDIC4vHWBfMA/_ssgManifest.js"
+      src="/_next/static/WHTcP4szRrocXUbz72VNn/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 55b8d8d

@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Failing test suites

Commit: 5340c01

test/unit/is-serializable-props.unit.test.js

  • isSerializableProps > handles null and undefined props
  • isSerializableProps > handles non-plain object props
Expand output

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 1`

- Snapshot  - 4
+ Received  + 2

-
-       "Error serializing props returned from `test` in \"/\".
+ "Error serializing props returned from `test` in \"/\".
-       Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Null]`)."
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Null]`)."
-

   5 |   it('handles null and undefined props', () => {
   6 |     expect(() => isSerializableProps('/', 'test', null))
>  7 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
   8 |       "Error serializing props returned from \`test\` in \\"/\\".
   9 |       Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Null]\`)."
  10 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:7:8)

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 2`

- Snapshot  - 4
+ Received  + 2

-
-       "Error serializing props returned from `test` in \"/\".
+ "Error serializing props returned from `test` in \"/\".
-       Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Undefined]`)."
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Undefined]`)."
-

  11 | 
  12 |     expect(() => isSerializableProps('/', 'test', undefined))
> 13 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  14 |       "Error serializing props returned from \`test\` in \\"/\\".
  15 |       Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Undefined]\`)."
  16 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:13:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 1`

- Snapshot  - 4
+ Received  + 2

-
-       "Error serializing props returned from `test` in \"/\".
+ "Error serializing props returned from `test` in \"/\".
-       Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Array]`)."
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Array]`)."
-

  19 |   it('handles non-plain object props', () => {
  20 |     expect(() => isSerializableProps('/', 'test', []))
> 21 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  22 |       "Error serializing props returned from \`test\` in \\"/\\".
  23 |       Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Array]\`)."
  24 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:21:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 2`

- Snapshot  - 4
+ Received  + 2

-
-       "Error serializing props returned from `test` in \"/\".
+ "Error serializing props returned from `test` in \"/\".
-       Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  25 | 
  26 |     expect(() => isSerializableProps('/', 'test', class Foobar {}))
> 27 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  28 |       "Error serializing props returned from \`test\` in \\"/\\".
  29 |       Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  30 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:27:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 3`

- Snapshot  - 4
+ Received  + 2

-
-       "Error serializing props returned from `test` in \"/\".
+ "Error serializing props returned from `test` in \"/\".
-       Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
+ Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  31 | 
  32 |     expect(() => isSerializableProps('/', 'test', function Foobar() {}))
> 33 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  34 |       "Error serializing props returned from \`test\` in \\"/\\".
  35 |       Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  36 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:33:8)

This reverts commit 5340c01.
@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 11.8s 11.7s -85ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.06 2.009 -0.05
/ avg req/sec 1213.49 1244.11 +30.62
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.256 1.285 ⚠️ +0.03
/error-in-render avg req/sec 1989.92 1945.22 ⚠️ -44.7
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 13.6s 13.7s ⚠️ +79ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
_error.js 1.02 MB 1.02 MB ⚠️ +117 B
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB ⚠️ +117 B
link.js 1.08 MB 1.08 MB ⚠️ +117 B
routerDirect.js 1.07 MB 1.07 MB ⚠️ +117 B
withRouter.js 1.07 MB 1.07 MB ⚠️ +117 B
Overall change 5.27 MB 5.27 MB ⚠️ +585 B

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 13.9s 13.7s -225ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 2.02 2.027 ⚠️ +0.01
/ avg req/sec 1237.78 1233.41 ⚠️ -4.37
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.257 1.256 0
/error-in-render avg req/sec 1988.3 1989.89 +1.59
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.62 kB 6.62 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-0c62a59..94b7.js gzip 1.26 kB 1.26 kB
_error-97d24..ed28.js gzip 3.38 kB 3.38 kB
amp-2926e4c2..9ccc.js gzip 536 B 536 B
hooks-1ed65b..8908.js gzip 902 B 902 B
index-6259b6..77d8.js gzip 230 B 230 B
link-b722682..14a4.js gzip 1.65 kB 1.65 kB
routerDirect..862a.js gzip 306 B 306 B
withRouter-4..76fd.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 587 B 587 B
link.html gzip 593 B 593 B
withRouter.html gzip 580 B 580 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "UwiMt43EgZ6CHOG1HAXII",
+        "buildId": "SfdlLsP7hlg65jS39KOoE",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_buildManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_ssgManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "UwiMt43EgZ6CHOG1HAXII",
+        "buildId": "SfdlLsP7hlg65jS39KOoE",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_buildManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_ssgManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "UwiMt43EgZ6CHOG1HAXII",
+        "buildId": "SfdlLsP7hlg65jS39KOoE",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_buildManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/UwiMt43EgZ6CHOG1HAXII/_ssgManifest.js"
+      src="/_next/static/SfdlLsP7hlg65jS39KOoE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 5340c01

@arturmuller
Copy link
Contributor Author

Hey, @timneutkens, I am having some issues with getting the snapshots to pass:

  • If I update the snapshots via npx jest is-serializable-props -u it changes a whole bunch of other stuff (ie changes intentation for every snapshot in that suite) and if I only commit those that I actually intended to fix it doesn't pass. It does pass for me locally though.
  • If I manually update the snapshots in such a way not to mess up the intentation it also doesn't pass.
  • I am also getting linting errors on the CI even though if I run npx prettier --check test/unit/is-serializable-props everything passes.

I am not sure what am I doing wrong. Plis halp.

@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Failing test suites

Commit: e2f0e80

test/unit/is-serializable-props.unit.test.js

  • isSerializableProps > handles null and undefined props
  • isSerializableProps > handles non-plain object props
Expand output

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 1`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Null]`)."
-

   5 |   it('handles null and undefined props', () => {
   6 |     expect(() => isSerializableProps('/', 'test', null))
>  7 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
   8 | "Error serializing props returned from \`test\` in \\"/\\".
   9 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Null]\`)."
  10 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:7:8)

● isSerializableProps › handles null and undefined props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles null and undefined props 2`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Undefined]`)."
-

  11 | 
  12 |     expect(() => isSerializableProps('/', 'test', undefined))
> 13 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  14 | "Error serializing props returned from \`test\` in \\"/\\".
  15 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Undefined]\`)."
  16 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:13:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 1`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Array]`)."
-

  19 |   it('handles non-plain object props', () => {
  20 |     expect(() => isSerializableProps('/', 'test', []))
> 21 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  22 | "Error serializing props returned from \`test\` in \\"/\\".
  23 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Array]\`)."
  24 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:21:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 2`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  25 | 
  26 |     expect(() => isSerializableProps('/', 'test', class Foobar {}))
> 27 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  28 | "Error serializing props returned from \`test\` in \\"/\\".
  29 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  30 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:27:8)

● isSerializableProps › handles non-plain object props

expect(received).toThrowErrorMatchingInlineSnapshot(snapshot)

Snapshot name: `isSerializableProps handles non-plain object props 3`

- Snapshot  - 2
+ Received  + 0

-
  "Error serializing props returned from `test` in \"/\".
  Reason: Props must be returned as a plain object from test: `{ props: { ... } }` (received: `[object Function]`)."
-

  31 | 
  32 |     expect(() => isSerializableProps('/', 'test', function Foobar() {}))
> 33 |       .toThrowErrorMatchingInlineSnapshot(`
     |        ^
  34 | "Error serializing props returned from \`test\` in \\"/\\".
  35 | Reason: Props must be returned as a plain object from test: \`{ props: { ... } }\` (received: \`[object Function]\`)."
  36 |     `)

  at Object.<anonymous> (unit/is-serializable-props.unit.test.js:33:8)

@ijjk
Copy link
Member

ijjk commented Mar 15, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 11.6s 11.3s -323ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 1.954 1.947 -0.01
/ avg req/sec 1279.12 1283.88 +4.76
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.192 1.286 ⚠️ +0.09
/error-in-render avg req/sec 2097.74 1944.26 ⚠️ -153.48
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 13.1s 12.7s -388ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.67 kB 6.67 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
_error.js 1.02 MB 1.02 MB ⚠️ +117 B
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB ⚠️ +117 B
link.js 1.08 MB 1.08 MB ⚠️ +117 B
routerDirect.js 1.07 MB 1.07 MB ⚠️ +117 B
withRouter.js 1.07 MB 1.07 MB ⚠️ +117 B
Overall change 5.27 MB 5.27 MB ⚠️ +585 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary arturmuller/next.js patch-1 Change
buildDuration 12.7s 12.7s -35ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +406 B
Page Load Tests Overall increase ✓
vercel/next.js canary arturmuller/next.js patch-1 Change
/ failed reqs 0 0
/ total time (seconds) 1.89 1.95 ⚠️ +0.06
/ avg req/sec 1322.56 1281.79 ⚠️ -40.77
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.219 1.182 -0.04
/error-in-render avg req/sec 2050.95 2115.86 +64.91
Client Bundles (main, webpack, commons)
vercel/next.js canary arturmuller/next.js patch-1 Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.62 kB 6.62 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary arturmuller/next.js patch-1 Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary arturmuller/next.js patch-1 Change
_app-0c62a59..94b7.js gzip 1.26 kB 1.26 kB
_error-97d24..ed28.js gzip 3.38 kB 3.38 kB
amp-2926e4c2..9ccc.js gzip 536 B 536 B
hooks-1ed65b..8908.js gzip 902 B 902 B
index-6259b6..77d8.js gzip 230 B 230 B
link-b722682..14a4.js gzip 1.65 kB 1.65 kB
routerDirect..862a.js gzip 306 B 306 B
withRouter-4..76fd.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary arturmuller/next.js patch-1 Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary arturmuller/next.js patch-1 Change
index.html gzip 587 B 587 B
link.html gzip 593 B 593 B
withRouter.html gzip 580 B 580 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "mpArwxOJOKhQJrAFVWEA-",
+        "buildId": "TcnSDmrzLnv6Ih52-uHqK",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_buildManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_ssgManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "mpArwxOJOKhQJrAFVWEA-",
+        "buildId": "TcnSDmrzLnv6Ih52-uHqK",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_buildManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_ssgManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "mpArwxOJOKhQJrAFVWEA-",
+        "buildId": "TcnSDmrzLnv6Ih52-uHqK",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_buildManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/mpArwxOJOKhQJrAFVWEA-/_ssgManifest.js"
+      src="/_next/static/TcnSDmrzLnv6Ih52-uHqK/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: e2f0e80

Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kodiakhq kodiakhq bot merged commit c88898b into vercel:canary Jul 25, 2021
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Aug 19, 2021
I recently received the "Props must be returned as a plain object" error when I accidentally dropped an array directly inside `props`. This is a trivial error to fix once you know what you did, but I spent good 30 minutes looking in all the wrong places. I hope that this slight clarification in the error message would save someone from wasting their time if they make a similar mistake like myself.
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants