question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chunkLoadTimeout has to be cleared, if a request for a chunk fails

See original GitHub issue

Feature request

I’m not sure, is it a bug or a feature request. We have an option chunkLoadTimeout in output. Here is a link to the docs. chunkLoadTimeout is the Number of milliseconds before chunk request expires. But there is a problem, when a request fails.

Let’s imagine, that we have a retry for a dynamic import. If the request for a chunk failed with a 500 code (for example), webpack will wait 12000 ms by default before the retry will be executed, cause import-Promise won’t be resolved/rejected during chunkLoadTimeout.

What is the expected behavior?

timeout should be cleared

What is motivation or use case for adding/changing the behavior?

Retry is not working properly

How should this be implemented in your opinion?

Just clear timeout on an error event.

Are you willing to work on this yourself?

Yeap, if it is ok for the core team)

So, there is an idea to clearTimeout, if the request failed. What do you think?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
artem-malkocommented, Feb 11, 2022
1reaction
artem-malkocommented, Jan 4, 2022

@sokra up) We need your opinion)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve the Chunk Load Error in JavaScript - Rollbar
If you are encountering this error as a user of an application, the most simple way to resolve it is to clear your...
Read more >
Output - webpack
chunkLoadTimeout. number = 120000. The Number of milliseconds before chunk request expires. This option is supported since webpack 2.6.0. webpack.config.js
Read more >
ChunkLoadError: Loading chunk register failed - Stack Overflow
I've had the problem for a couple of weeks now. All other posts and suggestions to clear browser cache or set the public...
Read more >
Output - webpack 3 documentation
output.chunkLoadTimeout. integer. Number of milliseconds before chunk request expires, defaults to 120 000. This option is supported since webpack 2.6.0.
Read more >
Loading chunk error when importing conditional JS files to ...
I haven't made any changes to the config, so not sure if I need to update anything as I just ran a clean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found