KEMBAR78
Clarify sending to Google Analytics in reportWebVitals by balazsorban44 · Pull Request #16664 · vercel/next.js · GitHub
Skip to content

Conversation

balazsorban44
Copy link
Member

Clarifies how to send the Web Vitals data to Google Analytics.
Here is an example by a user who was confused why the docs code example did not work out-of-the-box: #16662

@ijjk
Copy link
Member

ijjk commented Aug 28, 2020

Failing test suites

Commit: 29007b0

test/integration/amp-export-validation/test/index.test.js

  • AMP Validation on Export > should have shown errors during build
  • AMP Validation on Export > should export AMP pages
  • AMP Validation on Export > shows AMP warning without throwing error
  • AMP Validation on Export > throws error on AMP error
  • AMP Validation on Export > shows warning and error when throwing error
Expand output

● AMP Validation on Export › should have shown errors during build

expect(received).toMatch(expected)

Expected pattern: /error.*The parent tag of tag 'img' is 'div', but it can only be 'i-amphtml-sizer-intrinsic'\./
Received string:  "internal/modules/cjs/loader.js:968
  throw err;
  ^·
Error: Cannot find module 'next/dist/compiled/arg/index.js'
Require stack:
- /home/runner/work/next.js/next.js/packages/next/dist/bin/next

  1 | #!/usr/bin/env node
> 2 | "use strict";var log=_interopRequireWildcard(require("../build/output/log"));var _index=_interopRequireDefault(require("next/dist/compiled/arg/index.js"));var _constants=require("../lib/constants");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}['react','react-dom'].forEach(dependency=>{try{// When 'npm link' is used it checks the clone location. Not the project.
    |                                                                                                                ^
  3 | require.resolve(dependency);}catch(err){console.warn(`The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`);}});const defaultCommand='dev';const commands={build:async()=>await Promise.resolve().then(()=>_interopRequireWildcard(require('../cli/next-build'))).then(i=>i.nextBuild),start:async()=>await Promise.resolve().then(()=>_interopRequireWildcard(require('../cli/next-start'))).then(i=>i.nextStart),export:async()=>await Promise.resolve().then(()=>_interopRequireWildcard(require('../cli/next-export'))).then(i=>i.nextExport),dev:async()=>await Promise.resolve().then(()=>_interopRequireWildcard(require('../cli/next-dev'))).then(i=>i.nextDev),telemetry:async()=>await Promise.resolve().then(()=>_interopRequireWildcard(require('../cli/next-telemetry'))).then(i=>i.nextTelemetry)};const args=(0,_index.default)({// Types
  4 | '--version':Boolean,'--help':Boolean,'--inspect':Boolean,// Aliases
  5 | '-v':'--version','-h':'--help'},{permissive:true});// Version is inlined into the file using taskr build pipeline

  at Object.<anonymous> (../packages/next/dist/bin/next:2:112)
  at Function.executeUserEntryPoint [as runMain] (../internal/modules/run_main.js:71:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/runner/work/next.js/next.js/packages/next/dist/bin/next' ]
  }
  "
  at Object.<anonymous> (integration/amp-export-validation/test/index.test.js:27:25)

● AMP Validation on Export › should export AMP pages

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/amp-export-validation/out/first.html'

● AMP Validation on Export › shows AMP warning without throwing error

expect(received).toMatch(expected)

Expected pattern: /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
Received string:  ""

  55 |         stderr: true,
  56 |       })
> 57 |       expect(stdout).toMatch(
     |                      ^
  58 |         /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
  59 |       )
  60 |       await expect(access(join(outDir, 'cat.html'))).resolves.toBe(undefined)

  at Object.<anonymous> (integration/amp-export-validation/test/index.test.js:57:22)

● AMP Validation on Export › throws error on AMP error

expect(received).toMatch(expected)

Expected pattern: /error.*The parent tag of tag 'img' is 'div', but it can only be 'i-amphtml-sizer-intrinsic'\./
Received string:  ""

  82 |         stderr: true,
  83 |       })
> 84 |       expect(stdout).toMatch(
     |                      ^
  85 |         /error.*The parent tag of tag 'img' is 'div', but it can only be 'i-amphtml-sizer-intrinsic'\./
  86 |       )
  87 |       await expect(access(join(outDir, 'dog.html'))).resolves.toBe(undefined)

  at Object.<anonymous> (integration/amp-export-validation/test/index.test.js:84:22)

● AMP Validation on Export › shows warning and error when throwing error

expect(received).toMatch(expected)

Expected pattern: /error.*The parent tag of tag 'img' is 'div', but it can only be 'i-amphtml-sizer-intrinsic'\./
Received string:  ""

  109 |         stderr: true,
  110 |       })
> 111 |       expect(stdout).toMatch(
      |                      ^
  112 |         /error.*The parent tag of tag 'img' is 'div', but it can only be 'i-amphtml-sizer-intrinsic'\./
  113 |       )
  114 |       await expect(access(join(outDir, 'dog-cat.html'))).resolves.toBe(

  at Object.<anonymous> (integration/amp-export-validation/test/index.test.js:111:22)

test/integration/amphtml-custom-validator/test/index.test.js

  • AMP Custom Validator > should build and start successfully
  • AMP Custom Validator > should run in dev mode successfully
Expand output

● AMP Custom Validator › should build and start successfully

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● AMP Custom Validator › should run in dev mode successfully

FetchError: request to http://localhost:45517/ failed, reason: connect ECONNREFUSED 127.0.0.1:45517

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

test/integration/app-document-style-fragment/test/index.test.js

  • Custom Document Fragment Styles > correctly adds styles from fragment styles key
Expand output

● Custom Document Fragment Styles › correctly adds styles from fragment styles key

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Test suite failed to run

TypeError: Cannot read property '__app' of undefined

  309 | 
  310 | export async function stopApp(server) {
> 311 |   if (server.__app) {
      |              ^
  312 |     await server.__app.close()
  313 |   }
  314 |   await promiseCall(server, 'close')

  at stopApp (lib/next-test-utils.js:311:14)
  at integration/app-document-style-fragment/test/index.test.js:31:18

test/integration/amphtml-custom-optimizer/test/index.test.js

  • AMP Custom Optimizer > should build and start for static page
  • AMP Custom Optimizer > should build and start for dynamic page
Expand output

● AMP Custom Optimizer › should build and start for static page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● AMP Custom Optimizer › should build and start for dynamic page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

test/integration/client-navigation/test/index.test.js

  • Client Navigation > should not error on module.exports + polyfills
  • Client Navigation > should work on nested /index/index.js
  • Client Navigation > should handle undefined prop in head client-side
  • Client Navigation > Rendering via HTTP > renders a stateless component
  • Client Navigation > Rendering via HTTP > should should not contain scripts that are not js
  • Client Navigation > Rendering via HTTP > should handle undefined prop in head server-side
  • Client Navigation > Rendering via HTTP > renders with fragment syntax
  • Client Navigation > Rendering via HTTP > renders when component is a forwardRef instance
  • Client Navigation > Rendering via HTTP > renders when component is a memo instance
  • Client Navigation > Rendering via HTTP > header renders default charset
  • Client Navigation > Rendering via HTTP > header renders default viewport
  • Client Navigation > Rendering via HTTP > header helper renders header information
  • Client Navigation > Rendering via HTTP > header helper dedupes tags
  • Client Navigation > Rendering via HTTP > header helper dedupes tags with the same key as the default
  • Client Navigation > Rendering via HTTP > header helper avoids dedupe of specific tags
  • Client Navigation > Rendering via HTTP > header helper renders Fragment children
  • Client Navigation > Rendering via HTTP > should render the page with custom extension
  • Client Navigation > Rendering via HTTP > should render the page without err property
  • Client Navigation > Rendering via HTTP > should render the page with nextExport property
  • Client Navigation > Rendering via HTTP > should render the page without nextExport property
  • Client Navigation > Rendering via HTTP > renders styled jsx
  • Client Navigation > Rendering via HTTP > renders properties populated asynchronously
  • Client Navigation > Rendering via HTTP > renders a link component
  • Client Navigation > Rendering via HTTP > getInitialProps circular structure
  • Client Navigation > Rendering via HTTP > getInitialProps should be class method
  • Client Navigation > Rendering via HTTP > getInitialProps resolves to null
  • Client Navigation > Rendering via HTTP > default Content-Type
  • Client Navigation > Rendering via HTTP > setting Content-Type in getInitialProps
  • Client Navigation > Rendering via HTTP > should render 404 for _next routes that do not exist
  • Client Navigation > Rendering via HTTP > should render page that has module.exports anywhere
  • Client Navigation > Rendering via HTTP > allows to import .json files
  • Client Navigation > Rendering via HTTP > default export is not a React Component
  • Client Navigation > Rendering via HTTP > error-inside-page
  • Client Navigation > Rendering via HTTP > error-in-the-global-scope
  • Client Navigation > Rendering via HTTP > should set Cache-Control header
  • Client Navigation > Rendering via HTTP > asPath
  • Client Navigation > Rendering via HTTP > should show a valid error when undefined is thrown
  • Client Navigation > Rendering via HTTP > 404 > should 404 on not existent page
  • Client Navigation > Rendering via HTTP > 404 > should 404 on wrong casing
  • Client Navigation > Rendering via HTTP > 404 > should not 404 for /
  • Client Navigation > Rendering via HTTP > 404 > should should not contain a page script in a 404 page
  • Client Navigation > Rendering via HTTP > Url prop > should provide pathname, query and asPath
  • Client Navigation > Rendering via HTTP > Url prop > should override props.url, even when getInitialProps returns url as property
  • Client Navigation > Rendering via HTTP > with the HOC based router > should navigate as expected
  • Client Navigation > Rendering via HTTP > with the HOC based router > should include asPath
  • Client Navigation > With url property > Should keep immutable pathname, asPath and query
  • Client Navigation > foreign history manipulation > should ignore history state without options
  • Client Navigation > foreign history manipulation > should ignore history state with an invalid url
  • Client Navigation > foreign history manipulation > should ignore foreign history state with missing properties
  • Client Navigation > runtime errors > should show redbox when a client side error is thrown inside a component
  • Client Navigation > runtime errors > should show redbox when a client side error is thrown outside a component
  • Client Navigation > updating head while client routing > should update head during client routing
  • Client Navigation > updating head while client routing > should update title during client routing
  • Client Navigation > with 404 pages > should 404 on not existent page
  • Client Navigation > with 404 pages > should 404 on wrong casing
  • Client Navigation > with 404 pages > should get url dynamic param
  • Client Navigation > with 404 pages > should 404 on wrong casing of url dynamic param
  • Client Navigation > with 404 pages > should not 404 for /
  • Client Navigation > with 404 pages > should should not contain a page script in a 404 page
  • Client Navigation > with > should navigate the page
  • Client Navigation > with > should navigate back after reload
  • Client Navigation > with > should navigate forwards after reload
  • Client Navigation > with > should navigate via the client side
  • Client Navigation > with > should navigate an absolute url
  • Client Navigation > with > should navigate an absolute local url
  • Client Navigation > with > should navigate an absolute local url with as
  • Client Navigation > with tag inside the > should navigate the page
  • Client Navigation > with tag inside the > should not navigate if the tag has a target
  • Client Navigation > with URL objects > should work with
  • Client Navigation > with URL objects > should work with "Router.push"
  • Client Navigation > with URL objects > should work with the "replace" prop
  • Client Navigation > with asPath > inside getInitialProps > should show the correct asPath with a Link with as prop
  • Client Navigation > with asPath > inside getInitialProps > should show the correct asPath with a Link without the as prop
  • Client Navigation > with asPath > with next/link > should use pushState with same href and different asPath
  • Client Navigation > with asPath > with next/link > should detect asPath query changes correctly
  • Client Navigation > with asPath > with next/router > should show the correct asPath
  • Client Navigation > with asPath > with next/router > should navigate an absolute url on push
  • Client Navigation > with asPath > with next/router > should navigate an absolute url on replace
  • Client Navigation > with asPath > with next/router > should navigate an absolute local url on push
  • Client Navigation > with asPath > with next/router > should navigate an absolute local url on replace
  • Client Navigation > with different types of urls > should work with normal page
  • Client Navigation > with different types of urls > should work with dir/ page
  • Client Navigation > with different types of urls > should not work with /index page
  • Client Navigation > with different types of urls > should work with / page
  • Client Navigation > with empty getInitialProps() > should render an error
  • Client Navigation > with getInitialProp redirect > should redirect the page via client side
  • Client Navigation > with getInitialProp redirect > should redirect the page when loading
  • Client Navigation > with hash changes > when hash change via A tag > should not run getInitialProps
  • Client Navigation > with hash changes > when hash change via Link > should not run getInitialProps
  • Client Navigation > with hash changes > when hash change via Link > should scroll to the specified position on the same page
  • Client Navigation > with hash changes > when hash change via Link > should scroll to the specified position on the same page with a name property
  • Client Navigation > with hash changes > when hash change via Link > should scroll to the specified position to a new page
  • Client Navigation > with hash changes > when hash change via Link > Should update asPath
  • Client Navigation > with hash changes > when hash get removed > should not run getInitialProps
  • Client Navigation > with hash changes > when hash get removed > should not run getInitialProps when removing via back
  • Client Navigation > with hash changes > when hash set to empty > should not run getInitialProps
  • Client Navigation > with hash changes with state > when passing state via hash change > should increment the history state counter
  • Client Navigation > with hash changes with state > when passing state via hash change > should increment the shallow history state counter
  • Client Navigation > with onClick action > should reload the page and perform additional action
  • Client Navigation > with onClick action > should not reload if default was prevented
  • Client Navigation > with onClick action > should always replace the state and perform additional action
  • Client Navigation > with querystring relative urls > should work with Link
  • Client Navigation > with querystring relative urls > should work with router.push
  • Client Navigation > with querystring relative urls > should work with router.replace
  • Client Navigation > with shallow routing > should update the url without running getInitialProps
  • Client Navigation > with shallow routing > should handle the back button and should not run getInitialProps
  • Client Navigation > with shallow routing > should run getInitialProps always when rending the page to the screen
  • Client Navigation > with the HOC based router > should navigate as expected
  • Client Navigation > with the current url > should reload the page
  • Client Navigation > with the current url > should always replace the state
  • Client Navigation > with the same page but different querystring > should navigate the page
  • Client Navigation > with the same page but different querystring > should remove querystring
  • Client Navigation > with unexpected nested tag > should not redirect if passHref prop is not defined in Link
  • Client Navigation > with unexpected nested tag > should redirect if passHref prop is defined in Link
Expand output

● Client Navigation › with › should navigate the page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate back after reload

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate forwards after reload

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate via the client side

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate an absolute url

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate an absolute local url

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with › should navigate an absolute local url with as

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › With url property › Should keep immutable pathname, asPath and query

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with tag inside the › should navigate the page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with tag inside the › should not navigate if the tag has a target

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with unexpected nested tag › should not redirect if passHref prop is not defined in Link

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with unexpected nested tag › should redirect if passHref prop is defined in Link

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with empty getInitialProps() › should render an error

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with the same page but different querystring › should navigate the page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with the same page but different querystring › should remove querystring

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with the current url › should reload the page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with the current url › should always replace the state

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with onClick action › should reload the page and perform additional action

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with onClick action › should not reload if default was prevented

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with onClick action › should always replace the state and perform additional action

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via Link › should not run getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via Link › should scroll to the specified position on the same page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via Link › should scroll to the specified position on the same page with a name property

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via Link › should scroll to the specified position to a new page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via Link › Should update asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash change via A tag › should not run getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash get removed › should not run getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash get removed › should not run getInitialProps when removing via back

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes › when hash set to empty › should not run getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes with state › when passing state via hash change › should increment the history state counter

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with hash changes with state › when passing state via hash change › should increment the shallow history state counter

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with shallow routing › should update the url without running getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with shallow routing › should handle the back button and should not run getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with shallow routing › should run getInitialProps always when rending the page to the screen

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with URL objects › should work with

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with URL objects › should work with "Router.push"

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with URL objects › should work with the "replace" prop

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with querystring relative urls › should work with Link

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with querystring relative urls › should work with router.push

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with querystring relative urls › should work with router.replace

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with getInitialProp redirect › should redirect the page via client side

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with getInitialProp redirect › should redirect the page when loading

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with different types of urls › should work with normal page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with different types of urls › should work with dir/ page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with different types of urls › should not work with /index page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with different types of urls › should work with / page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with the HOC based router › should navigate as expected

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › inside getInitialProps › should show the correct asPath with a Link with as prop

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › inside getInitialProps › should show the correct asPath with a Link without the as prop

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/router › should show the correct asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/router › should navigate an absolute url on push

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/router › should navigate an absolute url on replace

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/router › should navigate an absolute local url on push

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/router › should navigate an absolute local url on replace

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/link › should use pushState with same href and different asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with asPath › with next/link › should detect asPath query changes correctly

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › runtime errors › should show redbox when a client side error is thrown inside a component

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › runtime errors › should show redbox when a client side error is thrown outside a component

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should 404 on not existent page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should 404 on wrong casing

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should get url dynamic param

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should 404 on wrong casing of url dynamic param

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should not 404 for /

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › with 404 pages › should should not contain a page script in a 404 page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › updating head while client routing › should update head during client routing

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › updating head while client routing › should update title during client routing

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › foreign history manipulation › should ignore history state without options

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › foreign history manipulation › should ignore history state with an invalid url

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › foreign history manipulation › should ignore foreign history state with missing properties

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › should not error on module.exports + polyfills

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › should work on nested /index/index.js

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › should handle undefined prop in head client-side

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders a stateless component

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should should not contain scripts that are not js

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should handle undefined prop in head server-side

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders with fragment syntax

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders when component is a forwardRef instance

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders when component is a memo instance

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header renders default charset

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header renders default viewport

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header helper renders header information

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header helper dedupes tags

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header helper dedupes tags with the same key as the default

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header helper avoids dedupe of specific tags

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › header helper renders Fragment children

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render the page with custom extension

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render the page without err property

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render the page with nextExport property

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render the page without nextExport property

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders styled jsx

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders properties populated asynchronously

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › renders a link component

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › getInitialProps circular structure

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › getInitialProps should be class method

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › getInitialProps resolves to null

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › default Content-Type

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › setting Content-Type in getInitialProps

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render 404 for _next routes that do not exist

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should render page that has module.exports anywhere

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › allows to import .json files

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › default export is not a React Component

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › error-inside-page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › error-in-the-global-scope

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should set Cache-Control header

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › Url prop › should provide pathname, query and asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › Url prop › should override props.url, even when getInitialProps returns url as property

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › 404 › should 404 on not existent page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › 404 › should 404 on wrong casing

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › 404 › should not 404 for /

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › 404 › should should not contain a page script in a 404 page

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › with the HOC based router › should navigate as expected

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › with the HOC based router › should include asPath

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Client Navigation › Rendering via HTTP › should show a valid error when undefined is thrown

FetchError: request to http://localhost:39027/async-props failed, reason: connect ECONNREFUSED 127.0.0.1:39027

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/client-navigation/test/index.test.js:67:18

test/integration/404-page-custom-error/test/index.test.js

  • Default 404 Page with custom _error > dev mode > should respond to 404 correctly
  • Default 404 Page with custom _error > dev mode > should render error correctly
  • Default 404 Page with custom _error > dev mode > should render index page normal
  • Default 404 Page with custom _error > server mode > should build successfully
  • Default 404 Page with custom _error > server mode > should respond to 404 correctly
  • Default 404 Page with custom _error > server mode > should render error correctly
  • Default 404 Page with custom _error > server mode > should render index page normal
  • Default 404 Page with custom _error > server mode > should set pages404 in routes-manifest correctly
  • Default 404 Page with custom _error > server mode > should have output 404.html
  • Default 404 Page with custom _error > serverless mode > should build successfully
  • Default 404 Page with custom _error > serverless mode > should respond to 404 correctly
  • Default 404 Page with custom _error > serverless mode > should render error correctly
  • Default 404 Page with custom _error > serverless mode > should render index page normal
  • Default 404 Page with custom _error > serverless mode > should set pages404 in routes-manifest correctly
  • Default 404 Page with custom _error > serverless mode > should have output 404.html
Expand output

● Default 404 Page with custom _error › server mode › should build successfully

expect(received).toBe(expected) // Object.is equality

Expected: 0
Received: 1

  64 |       })
  65 | 
> 66 |       expect(code).toBe(0)
     |                    ^
  67 | 
  68 |       appPort = await findPort()
  69 | 

  at Object.<anonymous> (integration/404-page-custom-error/test/index.test.js:66:20)

● Default 404 Page with custom _error › server mode › should respond to 404 correctly

FetchError: request to http://localhost/:undefined/404 failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › server mode › should render error correctly

FetchError: request to http://localhost/:undefined/err failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › server mode › should render index page normal

FetchError: request to http://localhost/:undefined/ failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › server mode › should set pages404 in routes-manifest correctly

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/404-page-custom-error/.next/routes-manifest.json'

● Default 404 Page with custom _error › server mode › should have output 404.html

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/404-page-custom-error/.next/serverless/pages-manifest.json'

  501 | 
  502 | function readJson(path) {
> 503 |   return JSON.parse(readFileSync(path))
      |                     ^
  504 | }
  505 | 
  506 | export function getBuildManifest(dir) {

  at readJson (lib/next-test-utils.js:503:21)
  at getPagesManifest (lib/next-test-utils.js:540:10)
  at getPageFileFromPagesManifest (lib/next-test-utils.js:544:25)
  at Object.<anonymous> (integration/404-page-custom-error/test/index.test.js:50:20)

● Default 404 Page with custom _error › serverless mode › should build successfully

expect(received).toBe(expected) // Object.is equality

Expected: 0
Received: 1

  92 |       })
  93 | 
> 94 |       expect(code).toBe(0)
     |                    ^
  95 | 
  96 |       appPort = await findPort()
  97 |       app = await nextStart(appDir, appPort)

  at Object.<anonymous> (integration/404-page-custom-error/test/index.test.js:94:20)

● Default 404 Page with custom _error › serverless mode › should respond to 404 correctly

FetchError: request to http://localhost/:undefined/404 failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › serverless mode › should render error correctly

FetchError: request to http://localhost/:undefined/err failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › serverless mode › should render index page normal

FetchError: request to http://localhost/:undefined/ failed, reason: connect ECONNREFUSED 127.0.0.1:80

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › serverless mode › should set pages404 in routes-manifest correctly

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/404-page-custom-error/.next/routes-manifest.json'

● Default 404 Page with custom _error › serverless mode › should have output 404.html

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/404-page-custom-error/.next/serverless/pages-manifest.json'

  501 | 
  502 | function readJson(path) {
> 503 |   return JSON.parse(readFileSync(path))
      |                     ^
  504 | }
  505 | 
  506 | export function getBuildManifest(dir) {

  at readJson (lib/next-test-utils.js:503:21)
  at getPagesManifest (lib/next-test-utils.js:540:10)
  at getPageFileFromPagesManifest (lib/next-test-utils.js:544:25)
  at Object.<anonymous> (integration/404-page-custom-error/test/index.test.js:50:20)

● Default 404 Page with custom _error › dev mode › should respond to 404 correctly

FetchError: request to http://localhost:41691/404 failed, reason: connect ECONNREFUSED 127.0.0.1:41691

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › dev mode › should render error correctly

FetchError: request to http://localhost:41691/err failed, reason: connect ECONNREFUSED 127.0.0.1:41691

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Default 404 Page with custom _error › dev mode › should render index page normal

FetchError: request to http://localhost:41691/ failed, reason: connect ECONNREFUSED 127.0.0.1:41691

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1455:11)

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/404-page-custom-error/test/index.test.js:58:20

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/404-page-custom-error/test/index.test.js:79:13

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  275 | export async function killApp(instance) {
  276 |   await new Promise((resolve, reject) => {
> 277 |     treeKill(instance.pid, (err) => {
      |                       ^
  278 |       if (err) {
  279 |         if (
  280 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:277:23
  at killApp (lib/next-test-utils.js:276:9)
  at integration/404-page-custom-error/test/index.test.js:108:20

@ijjk
Copy link
Member

ijjk commented Aug 28, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary balazsorban44/next.js patch-3 Change
buildDuration 11.9s 11.1s -780ms
nodeModulesSize 57.5 MB 57.5 MB
Page Load Tests Overall increase ✓
vercel/next.js canary balazsorban44/next.js patch-3 Change
/ failed reqs 0 0
/ total time (seconds) 2.122 2.122
/ avg req/sec 1178.37 1178.32 ⚠️ -0.05
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.182 1.075 -0.11
/error-in-render avg req/sec 2115.25 2326.17 +210.92
Client Bundles (main, webpack, commons)
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..f20b.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary balazsorban44/next.js patch-3 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-4cfda7a..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary balazsorban44/next.js patch-3 Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary balazsorban44/next.js patch-3 Change
index.html gzip 972 B 972 B
link.html gzip 978 B 978 B
withRouter.html gzip 964 B 964 B
Overall change 2.91 kB 2.91 kB

Serverless Mode
General
vercel/next.js canary balazsorban44/next.js patch-3 Change
buildDuration 13.4s 12.6s -816ms
nodeModulesSize 57.5 MB 57.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..f20b.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary balazsorban44/next.js patch-3 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-4cfda7a..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary balazsorban44/next.js patch-3 Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary balazsorban44/next.js patch-3 Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.28 MB 5.28 MB
Commit: 29007b0

@ijjk
Copy link
Member

ijjk commented Aug 30, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary balazsorban44/next.js patch-3 Change
buildDuration 11.5s 12s ⚠️ +522ms
nodeModulesSize 57.4 MB 57.4 MB
Page Load Tests Overall increase ✓
vercel/next.js canary balazsorban44/next.js patch-3 Change
/ failed reqs 0 0
/ total time (seconds) 2.301 2.258 -0.04
/ avg req/sec 1086.29 1107.13 +20.84
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.328 1.337 ⚠️ +0.01
/error-in-render avg req/sec 1882.31 1869.66 ⚠️ -12.65
Client Bundles (main, webpack, commons)
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..f20b.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary balazsorban44/next.js patch-3 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-4cfda7a..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary balazsorban44/next.js patch-3 Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary balazsorban44/next.js patch-3 Change
index.html gzip 972 B 972 B
link.html gzip 978 B 978 B
withRouter.html gzip 964 B 964 B
Overall change 2.91 kB 2.91 kB

Serverless Mode
General
vercel/next.js canary balazsorban44/next.js patch-3 Change
buildDuration 13s 13.2s ⚠️ +213ms
nodeModulesSize 57.4 MB 57.4 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..f20b.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-ce79c9a..12c9.js gzip 7.36 kB 7.36 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-9973c26..dule.js gzip 6.42 kB 6.42 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.3 kB 52.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary balazsorban44/next.js patch-3 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-28298..e0c9.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-000f151..65d4.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary balazsorban44/next.js patch-3 Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-65c8a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-4cfda7a..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary balazsorban44/next.js patch-3 Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary balazsorban44/next.js patch-3 Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.28 MB 5.28 MB
Commit: 5d3a73a

@Timer Timer merged commit d6188a8 into vercel:canary Aug 30, 2020
@hallaji
Copy link
Contributor

hallaji commented Sep 8, 2020

@balazsorban44 I just realised gtag.js has a different syntax compared to analytics.js as below:

gtag('event', <action>, {
  'event_category': <category>,
  'event_label': <label>,
  'value': <value>
});

This might lead to confusion in developers. Does it work that way? If so, gtag might be a wrapper around ga under the hood.

@hallaji
Copy link
Contributor

hallaji commented Sep 8, 2020

Created a fix #16933

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants