Viewers: ChunkLoadError on Viewer Load Not Being Handled With a Retry

Created on 17 Oct 2020  路  6Comments  路  Source: OHIF/Viewers

Bug Report

Describe the Bug

Per the attached screen shot, we saw a black screen on load due to the error message:

"ChunkLoadError: loading chunk 0 failed"

as the Viewer loads. As this issue appears to result from a random network error, it has been impossible to reproduce. However, online review of similar errors suggest that such errors in the webpack module loading are not caught and retried (see e.g. https://dev.to/goenning/how-to-retry-when-react-lazy-fails-mb5). Absent a reproducible error, it would hopefully be possible to harden the code to handle this.

ViewerBlackScreen

What steps can we follow to reproduce the bug?

Difficult. Launch the Viewer, but a network request to load a module would need to fail to reproduce. Inspection of code to find module load failures that are not handled seems the most likely way to address this.

Awaiting Reproduction Community priority Triage

Most helpful comment

I would think we can catch any error that is being thrown, but I don't know the details of this one. Yes, even a "Oh snap, something went wrong, please try reloading" would be good.

All 6 comments

@swederik @JamesAPetts @pieper is there any way with these catastrophic errors to give some message to the user what is next (e.g., clear cache and hard reload, ask about this URL in the forum)? Or there is really no way around those black screens?

I would think we can catch any error that is being thrown, but I don't know the details of this one. Yes, even a "Oh snap, something went wrong, please try reloading" would be good.

These errors happens when a dynamic import fails, i have tracked the ones we use in OHIF and created a boundary to handle these errors: https://github.com/OHIF/Viewers/pull/2145

@wlongabaugh do you want to test this?

I am seeing 404 and spinner for RTSTRUCT list for this study: https://testing-viewer.canceridc.dev/viewer/1.3.6.1.4.1.32722.99.99.247726286795860121686796574974227334270

image

Is this the same issue?

@wlongabaugh do you want to test this?

Not something that can really be checked... it arises due to random network error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pieper picture pieper  路  3Comments

TZubiri picture TZubiri  路  3Comments

rlaxodnjs199 picture rlaxodnjs199  路  3Comments

christianvargasforero picture christianvargasforero  路  4Comments

Diegovictorbr picture Diegovictorbr  路  4Comments