router
router copied to clipboard
Navigation stops work after chunk load failure
I'm submitting a bug report
- Library Version: 1.5.0
Please tell us about your environment:
-
Operating System: Windows 10
-
Node Version: 8.11.1
- NPM Version: 5.6.0
- JSPM OR Webpack AND Version webpack 4.6.0
-
Browser: Chrome 66
-
Language: ESNext
Precondition and steps to reproduce:
- Use code splitting: PLATFORM.moduleName(moduleId1, chunkName1), PLATFORM.moduleName(moduleId2, chunkName2), PLATFORM.moduleName(moduleId3, chunkName3)
- Configure router to use separate routes to modules (chunks)
- Block chunk2 from loading at Chrome dev-tools
- Navigate to blocked chunk2 route using a.href or Router.navigate
- Navigate to good chunk3 route using a.href or Router.navigate
Current behavior: Any navigation is not working at all after step 3.
Expected/desired behavior: Navigation to good chunks' routes should work
Stack trace for step 3:
__webpack_require__.oe | @ | bootstrap:167
-- | -- | --
| Promise.catch (async) | |
| push.async!system/system-index.module.exports | @ | system-index.js:4
| (anonymous) | @ | aurelia-loader-webpack.js:185
| step | @ | aurelia-loader-webpack.js:36
| (anonymous) | @ | aurelia-loader-webpack.js:17
| (anonymous) | @ | aurelia-loader-webpack.js:11
| ./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js.__awaiter | @ | aurelia-loader-webpack.js:7
| ./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js.WebpackLoader._import | @ | aurelia-loader-webpack.js:152
| (anonymous) | @ | aurelia-loader-webpack.js:252
| step | @ | aurelia-loader-webpack.js:36
| (anonymous) | @ | aurelia-loader-webpack.js:17
| (anonymous) | @ | aurelia-loader-webpack.js:11
| ./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js.__awaiter | @ | aurelia-loader-webpack.js:7
| ./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js.WebpackLoader.loadModule | @ | aurelia-loader-webpack.js:239
| importViewModelResource | @ | aurelia-templating.js:3239
| ensureViewModel | @ | aurelia-templating.js:4558
| loadRoute | @ | route-loader.js:65
| loadComponent | @ | aurelia-router.js:1515
| loadRoute | @ | aurelia-router.js:1488
| (anonymous) | @ | aurelia-router.js:1452
| loadNewRoute | @ | aurelia-router.js:1451
| run | @ | aurelia-router.js:1443
| next | @ | aurelia-router.js:112
| iterate | @ | aurelia-router.js:1221
| processDeactivatable | @ | aurelia-router.js:1224
| run | @ | aurelia-router.js:1155
| next | @ | aurelia-router.js:112
| (anonymous) | @ | aurelia-router.js:584
| Promise.then (async) | |
| run | @ | aurelia-router.js:582
| next | @ | aurelia-router.js:112
| run | @ | aurelia-router.js:125
| (anonymous) | @ | aurelia-router.js:1773
| Promise.then (async) | |
| _dequeueInstruction | @ | aurelia-router.js:1727
| (anonymous) | @ | aurelia-router.js:1718
| _queueInstruction | @ | aurelia-router.js:1715
| (anonymous) | @ | aurelia-router.js:1661
| Promise.then (async) | |
| loadUrl | @ | aurelia-router.js:1660
| _loadUrl | @ | aurelia-history-browser.js:290
| navigate | @ | aurelia-history-browser.js:230
| navigate | @ | aurelia-router.js:822
| onNavClick | @ | core-main.js:254
| evaluate | @ | aurelia-binding.js:1524
| callSource | @ | aurelia-binding.js:5171
| handleEvent | @ | aurelia-binding.js:5180
| handleDelegatedEvent | @ | aurelia-binding.js:3253
onNavClick(route) {
try {
this.Router.navigate(route.relativeHref);
} catch(e) {
log.error(e);
}
}
this.Router.isNavigating
gets stuck in the true
value
Neither router:navigation:complete
nor router:navigation:error
events arised.
Is there an update on this? I have the same problem for v1.7.1.
We are focusing our effort on v2, also this issue is a bit difficult to work on at the moment, as v1 router may need some more tests to cover the regression that may be introduced if we are to add a module loading failure recovery code.