Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Navigation stops work after chunk load failure #598

Open
iiiyx opened this issue May 14, 2018 · 3 comments
Open

Navigation stops work after chunk load failure #598

iiiyx opened this issue May 14, 2018 · 3 comments
Labels

Comments

@iiiyx
Copy link

iiiyx commented May 14, 2018

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:

  1. Use code splitting: PLATFORM.moduleName(moduleId1, chunkName1), PLATFORM.moduleName(moduleId2, chunkName2), PLATFORM.moduleName(moduleId3, chunkName3)
  2. Configure router to use separate routes to modules (chunks)
  3. Block chunk2 from loading at Chrome dev-tools
  4. Navigate to blocked chunk2 route using a.href or Router.navigate
  5. 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);
    }
  }
@iiiyx
Copy link
Author

iiiyx commented May 14, 2018

this.Router.isNavigating gets stuck in the true value
Neither router:navigation:complete nor router:navigation:error events arised.

@davismj davismj added the bug label May 27, 2018
@Ischca
Copy link

Ischca commented Jan 5, 2021

Is there an update on this?
I have the same problem for v1.7.1.

@bigopon
Copy link
Member

bigopon commented Jan 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants