Expand output
● Basic Features › Dynamic import › custom chunkfilename › should render the correct filename
expect(received).toMatch(expected)Expected pattern: /test chunkfilename/Received string: "{\"props\":{\"pageProps\":{\"statusCode\":500}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"development\",\"isFallback\":false,\"err\":{\"name\":\"ModuleNotFoundError\",\"message\":\"Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\",\"stack\":\"ModuleNotFoundError: Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/Compilation.js:925:10\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:401:22\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:130:21\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:224:22\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:2830:7\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:6877:13\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:214:25\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:213:14\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:25:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43\"},\"gip\":true}" 144 | it('should render the correct filename', async () => { 145 | const $ = await get$('/dynamic/chunkfilename')> 146 | expect($('body').text()).toMatch(/test chunkfilename/) | ^ 147 | expect($('html').html()).toMatch(/hello-world\.js/) 148 | expect($('html').html()).toMatch(/hello-world-css\.css/) 149 | }) at Object.<anonymous> (integration/basic/test/dynamic.js:146:34)
● Basic Features › Dynamic import › custom chunkfilename › should render the component on client side
TIMED OUT: /test chunkfilename/Failed to compile./components/hello-chunkfilename.jsModule not found: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'This error occured during the build process and can only be dismissed by fixing the error. 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/dynamic.js:155:11)
● Basic Features › Dynamic import › custom loading › should render custom loading on the server side whenssr:false andloading is provided
expect(received).toBe(expected) // Object.is equalityExpected: "LOADING"Received: "" 168 | it('should render custom loading on the server side when `ssr:false` and `loading` is provided', async () => { 169 | const $ = await get$('/dynamic/no-ssr-custom-loading')> 170 | expect($('p').text()).toBe('LOADING') | ^ 171 | }) 172 | 173 | it('should render the component on client side', async () => { at Object.<anonymous> (integration/basic/test/dynamic.js:170:31)
● Basic Features › Dynamic import › custom loading › should render the component on client side
TIMED OUT: /Hello World 1/Failed to compile./components/hello-chunkfilename.jsModule not found: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'This error occured during the build process and can only be dismissed by fixing the error. 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/dynamic.js:180:11)
● Basic Features › Dynamic import › Multiple modules › should only include the rendered module script tag
expect(received).toMatch(expected)Expected pattern: /hello1\.js/Received string: "<head><style data-next-hide-fouc=\"true\">body{display:none}</style><noscript data-next-hide-fouc=\"true\"><style>body{display:block}</style></noscript><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width\"><meta name=\"next-head-count\" content=\"2\"><link rel=\"preload\" href=\"/_next/static/development/pages/_app.js?ts=1589475628061\" as=\"script\"><link rel=\"preload\" href=\"/_next/static/runtime/webpack.js?ts=1589475628061\" as=\"script\"><link rel=\"preload\" href=\"/_next/static/runtime/main.js?ts=1589475628061\" as=\"script\"><noscript id=\"__next_css__DO_NOT_USE__\"></noscript></head><body><div id=\"__next\"></div><script src=\"/_next/static/runtime/react-refresh.js?ts=1589475628061\"></script><script src=\"/_next/static/development/dll/dll_4837185721bd9b4b2227.js?ts=1589475628061\"></script><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":500}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"development\",\"isFallback\":false,\"err\":{\"name\":\"ModuleNotFoundError\",\"message\":\"Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\",\"stack\":\"ModuleNotFoundError: Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/Compilation.js:925:10\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:401:22\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:130:21\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:224:22\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:2830:7\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:6877:13\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:214:25\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:213:14\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:25:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43\"},\"gip\":true}</script><script nomodule src=\"/_next/static/runtime/polyfills.js?ts=1589475628061\"></script><script async data-next-page=\"/_app\" src=\"/_next/static/development/pages/_app.js?ts=1589475628061\"></script><script src=\"/_next/static/runtime/webpack.js?ts=1589475628061\" async></script><script src=\"/_next/static/runtime/main.js?ts=1589475628061\" async></script><script src=\"/_next/static/development/_buildManifest.js?ts=1589475628061\" async></script><script src=\"/_next/static/development/_ssgManifest.js?ts=1589475628061\" async></script></body>" 194 | const $ = await get$('/dynamic/multiple-modules') 195 | const html = $('html').html()> 196 | expect(html).toMatch(/hello1\.js/) | ^ 197 | expect(html).not.toMatch(/hello2\.js/) 198 | }) 199 | at Object.<anonymous> (integration/basic/test/dynamic.js:196:22)
● Basic Features › Dynamic import › Multiple modules › should only load the rendered module in the browser
expect(received).toMatch(expected)Expected pattern: /hello1\.js/Received string: "<head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width\"><meta name=\"next-head-count\" content=\"2\"><link rel=\"preload\" href=\"/_next/static/development/pages/_app.js?ts=1589475628190\" as=\"script\"><link rel=\"preload\" href=\"/_next/static/runtime/webpack.js?ts=1589475628190\" as=\"script\"><link rel=\"preload\" href=\"/_next/static/runtime/main.js?ts=1589475628190\" as=\"script\"><noscript id=\"__next_css__DO_NOT_USE__\"></noscript><script charset=\"utf-8\" src=\"/_next/static/chunks/0.js\"></script></head><body style=\"overflow: hidden;\"><div id=\"__next\"></div><script src=\"/_next/static/runtime/react-refresh.js?ts=1589475628190\"></script><script src=\"/_next/static/development/dll/dll_4837185721bd9b4b2227.js?ts=1589475628190\"></script><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":500}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"development\",\"isFallback\":false,\"err\":{\"name\":\"ModuleNotFoundError\",\"message\":\"Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\",\"stack\":\"ModuleNotFoundError: Module not found: Error: Can't resolve './hello-chunkfilename.module.scss' in '/home/runner/work/next.js/next.js/test/integration/basic/components'\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/Compilation.js:925:10\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:401:22\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:130:21\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:224:22\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:2830:7\\n at /home/runner/work/next.js/next.js/node_modules/neo-async/async.js:6877:13\\n at /home/runner/work/next.js/next.js/node_modules/webpack/lib/NormalModuleFactory.js:214:25\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:213:14\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:13:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/Resolver.js:285:5\\n at eval (eval at create (/home/runner/work/next.js/next.js/node_modules/tapable/lib/HookCodeFactory.js:33:10), \\u003canonymous\\u003e:25:1)\\n at /home/runner/work/next.js/next.js/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43\"},\"gip\":true}</script><script nomodule=\"\" src=\"/_next/static/runtime/polyfills.js?ts=1589475628190\"></script><script async=\"\" data-next-page=\"/_app\" src=\"/_next/static/development/pages/_app.js?ts=1589475628190\"></script><script src=\"/_next/static/runtime/webpack.js?ts=1589475628190\" async=\"\"></script><script src=\"/_next/static/runtime/main.js?ts=1589475628190\" async=\"\"></script><script src=\"/_next/static/development/_buildManifest.js?ts=1589475628190\" async=\"\"></script><script src=\"/_next/static/development/_ssgManifest.js?ts=1589475628190\" async=\"\"></script><script src=\"/_next/static/development/pages/_error.js\"></script><div id=\"__next-build-watcher\" style=\"position: fixed; bottom: 10px; right: 20px; width: 0px; height: 0px; z-index: 99999;\"></div><div id=\"__next-prerender-indicator\" style=\"position: fixed; bottom: 20px; right: 10px; width: 0px; height: 0px; z-index: 99998; transition: all 100ms ease 0s;\"></div><nextjs-portal></nextjs-portal></body>" 208 | .elementByCss('html') 209 | .getAttribute('innerHTML')> 210 | expect(html).toMatch(/hello1\.js/) | ^ 211 | expect(html).not.toMatch(/hello2\.js/) 212 | } finally { 213 | if (browser) { at Object.<anonymous> (integration/basic/test/dynamic.js:210:24)
● Basic Features › Dynamic import › Multiple modules › should only render one bundle if component is used multiple times
TypeError: Cannot read property 'length' of null 221 | const html = $('html').html() 222 | try {> 223 | expect(html.match(/chunks[\\/]hello1\.js/g).length).toBe(2) // one for preload, one for the script tag | ^ 224 | expect(html).not.toMatch(/hello2\.js/) 225 | } catch (err) { 226 | console.error(html) at Object.<anonymous> (integration/basic/test/dynamic.js:223:18)
● Basic Features › Dynamic import › Import mapping › should render dynamic imports bundle
expect(received).toBe(expected) // Object.is equalityExpected: trueReceived: false 234 | const $ = await get$('/dynamic/bundle') 235 | const bodyText = $('body').text()> 236 | expect(/Dynamic Bundle/.test(bodyText)).toBe(true) | ^ 237 | expect(/Hello World 1/.test(bodyText)).toBe(true) 238 | expect(/Hello World 2/.test(bodyText)).toBe(false) 239 | }) at Object.<anonymous> (integration/basic/test/dynamic.js:236:49)
● Basic Features › Dynamic import › Import mapping › should render dynamic imports bundle with additional components
expect(received).toBe(expected) // Object.is equalityExpected: trueReceived: false 242 | const $ = await get$('/dynamic/bundle?showMore=1') 243 | const bodyText = $('body').text()> 244 | expect(/Dynamic Bundle/.test(bodyText)).toBe(true) | ^ 245 | expect(/Hello World 1/.test(bodyText)).toBe(true) 246 | expect(/Hello World 2/.test(bodyText)).toBe(true) 247 | }) at Object.<anonymous> (integration/basic/test/dynamic.js:244:49)
● Basic Features › Dynamic import › Import mapping › should render components
: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: 247 | }) 248 | > 249 | it('should render components', async () => { | ^ 250 | const browser = await webdriver(context.appPort, '/dynamic/bundle') 251 | 252 | while (true) { at new Spec (../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22) at Suite.<anonymous> (integration/basic/test/dynamic.js:249:7)
● Basic Features › Dynamic import › Import mapping › should render support React context
: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: 265 | }) 266 | > 267 | it('should render support React context', async () => { | ^ 268 | const browser = await webdriver(context.appPort, '/dynamic/bundle') 269 | 270 | while (true) { at new Spec (../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22) at Suite.<anonymous> (integration/basic/test/dynamic.js:267:7)
● Basic Features › Dynamic import › Import mapping › should load new components and render for prop changes
: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: 277 | }) 278 | > 279 | it('should load new components and render for prop changes', async () => { | ^ 280 | const browser = await webdriver(context.appPort, '/dynamic/bundle') 281 | 282 | await browser at new Spec (../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22) at Suite.<anonymous> (integration/basic/test/dynamic.js:279:7)
● Basic Features › Hot Module Reloading › delete a page and add it back › should load the page properly
NoSuchWindowError: no such window: target window already closedfrom unknown error: web view not found (Session info: headless chrome=81.0.4044.129) 251 | 252 | while (true) {> 253 | const bodyText = await browser.elementByCss('body').text() | ^ 254 | if ( 255 | /Dynamic Bundle/.test(bodyText) && 256 | /Hello World 1/.test(bodyText) && at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/dynamic.js:253:28)
● Basic Features › Hot Module Reloading › editing a page › should detect the changes and display it
StaleElementReferenceError: stale element reference: element is not attached to the page document (Session info: headless chrome=81.0.4044.129) 146 | 147 | const newTabLink = await browser.findElement(By.css('#new'))> 148 | await newTabLink.click() | ^ 149 | 150 | allWindows = await browser.getAllWindowHandles() 151 | const newWindow = allWindows.find(win => win !== initialWindow) at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at freshWindow (lib/next-webdriver.js:148:3) at _default (lib/next-webdriver.js:166:5) at Object.<anonymous> (integration/basic/test/hmr.js:28:21)
● Basic Features › Hot Module Reloading › editing a page › should detect the changes and display it
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"p"} (Session info: headless chrome=81.0.4044.129) 62 | try { 63 | browser = await webdriver(context.appPort, '/hmr/about')> 64 | const text = await browser.elementByCss('p').text() | ^ 65 | expect(text).toBe('This is the about page.') 66 | 67 | const aboutPagePath = join( at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/hmr.js:64:24)
● Basic Features › Hot Module Reloading › editing a page › should not reload unrelated pages
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"button"} (Session info: headless chrome=81.0.4044.129) 102 | try { 103 | browser = await webdriver(context.appPort, '/hmr/counter')> 104 | const text = await browser | ^ 105 | .elementByCss('button') 106 | .click() 107 | .elementByCss('button') at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/hmr.js:104:24)
● Basic Features › Hot Module Reloading › editing a page › should update styles correctly
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".hmr-style-page p"} (Session info: headless chrome=81.0.4044.129) 150 | try { 151 | browser = await webdriver(context.appPort, '/hmr/style')> 152 | const pTag = await browser.elementByCss('.hmr-style-page p') | ^ 153 | const initialFontSize = await pTag.getComputedCss('font-size') 154 | 155 | expect(initialFontSize).toBe('100px') at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/hmr.js:152:24)
● Basic Features › Hot Module Reloading › editing a page › should update styles in a stateful component correctly
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".hmr-style-page p"} (Session info: headless chrome=81.0.4044.129) 198 | '/hmr/style-stateful-component' 199 | )> 200 | const pTag = await browser.elementByCss('.hmr-style-page p') | ^ 201 | const initialFontSize = await pTag.getComputedCss('font-size') 202 | 203 | expect(initialFontSize).toBe('100px') at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/hmr.js:200:24)
● Basic Features › Hot Module Reloading › editing a page › should update styles in a dynamic component correctly
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"#dynamic-component"} (Session info: headless chrome=81.0.4044.129) 238 | '/hmr/style-dynamic-component' 239 | )> 240 | const div = await browser.elementByCss('#dynamic-component') | ^ 241 | const initialClientClassName = await div.getAttribute('class') 242 | const initialFontSize = await div.getComputedCss('font-size') 243 | at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/hmr.js:240:23)
● Basic Features › Error Recovery › should recover from 404 after a page has been added
ENOENT: no such file or directory, unlink '/home/runner/work/next.js/next.js/test/integration/basic/pages/hmr/new-page.js' 387 | 388 | delete() {> 389 | unlinkSync(this.path) | ^ 390 | } 391 | 392 | restore() { at File.delete (lib/next-test-utils.js:389:5) at Object.<anonymous> (integration/basic/test/error-recovery.js:42:9) at runMicrotasks (<anonymous>)
● Basic Features › Error Recovery › should detect syntax errors and recover
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:73:11)
● Basic Features › Error Recovery › should show the error on all pages
TIMED OUT: /This is the contact page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:113:11)
● Basic Features › Error Recovery › should detect runtime errors on the module scope
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:135:9)
● Basic Features › Error Recovery › should recover from errors in the render function
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:176:11)
● Basic Features › Error Recovery › should recover after exporting an invalid page
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:221:11)
● Basic Features › Error Recovery › should recover after a bad return from the render function
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:273:11)
● Basic Features › Error Recovery › should recover after undefined exported as default
TIMED OUT: /This is the about page/ 361 | 362 | if (hardError) {> 363 | throw new Error('TIMED OUT: ' + regex + '\n\n' + content) | ^ 364 | } 365 | return false 366 | } at check (lib/next-test-utils.js:363:11) at Object.<anonymous> (integration/basic/test/error-recovery.js:319:11)
● Basic Features › Error Recovery › should recover from errors in getInitialProps in client
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"#error-in-gip-link"} (Session info: headless chrome=81.0.4044.129) 338 | try { 339 | browser = await webdriver(context.appPort, '/hmr')> 340 | await browser.elementByCss('#error-in-gip-link').click() | ^ 341 | 342 | expect(await hasRedbox(browser)).toBe(true) 343 | expect(await getRedboxHeader(browser)).toMatchInlineSnapshot(` at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/error-recovery.js:340:9)
● Basic Features › Error Recovery › should recover after an error reported via SSR
expect(received).toMatchInlineSnapshot(snapshot)Snapshot name: `Basic Features Error Recovery should recover after an error reported via SSR 1`- Snapshot+ Received- 1 of 1 unhandled error- Server Error- - Error: an-expected-error-in-gip- - This error happened while generating the page. Any console logs will be displayed in the terminal window.+ Failed to compile 383 | 384 | expect(await hasRedbox(browser)).toBe(true)> 385 | expect(await getRedboxHeader(browser)).toMatchInlineSnapshot(` | ^ 386 | " 1 of 1 unhandled error 387 | Server Error 388 | at Object.<anonymous> (integration/basic/test/error-recovery.js:385:48)
● Basic Features › process.env › should set process.env.NODE_ENV in development
NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"#node-env"} (Session info: headless chrome=81.0.4044.129) 6 | it('should set process.env.NODE_ENV in development', async () => { 7 | const browser = await webdriver(context.appPort, '/process-env')> 8 | const nodeEnv = await browser.elementByCss('#node-env').text() | ^ 9 | expect(nodeEnv).toBe('development') 10 | await browser.close() 11 | }) at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15) at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13) at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26) at runMicrotasks (<anonymous>) at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17) at Object.<anonymous> (integration/basic/test/process-env.js:8:23)
● Basic Features › With Security Related Issues › should not allow accessing files outside .next/static and .next/server directory
Path /_next/static/../BUILD_ID accessible from the browser 16 | expect(text).toMatch(/This page could not be found/) 17 | } catch (err) {> 18 | throw new Error(`Path ${path} accessible from the browser`) | ^ 19 | } 20 | } 21 | }) at Object.<anonymous> (integration/basic/test/security.js:18:17) at runMicrotasks (<anonymous>)
Uh oh!
There was an error while loading.Please reload this page.
To prevent FOUC, discussed in#10557 i need to store information about css file dependencies for chunk. Right now current implementation just throws away everything but js.
Can there be more than one css file in chunk? If no - code will be simplified.
closes#10557