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

Uncaught LZMA Worker Error #3

Open
barnesew opened this issue Mar 29, 2023 · 0 comments
Open

Uncaught LZMA Worker Error #3

barnesew opened this issue Mar 29, 2023 · 0 comments

Comments

@barnesew
Copy link

First off, thanks for your work on this project! I've been trying for a bit to get LZMA compression running in an Angular application and this is the first project that I've been able to get it to work.

The only "issue" I've been having is that there is an uncaught error in the lzma_worker that pops up on page load but then I never see it again until I refresh the browser. The library works fine in spite of this error but I would love to suppress it or be able to catch it. The following is the error I'm getting in the dev console:

Uncaught error in lzma_worker Error: undefined (undefined:undefined)
    at w.onerror [as __zone_symbol__ON_PROPERTYerror] (index.js:1:37975)
    at Worker.wrapFn (zone.js:815:43)
    at _ZoneDelegate.invokeTask (zone.js:443:35)
    at Zone.runTask (zone.js:214:51)
    at ZoneTask.invokeTask [as invoke] (zone.js:525:38)
    at invokeTask (zone.js:1727:22)
    at globalCallback (zone.js:1758:31)
    at Worker.globalZoneAwareCallback (zone.js:1794:20)

When I debug the application, the error seems to be thrown in the Decoder.mjs file on line 75. Here is what the relevant code looks like:

try {
    // IE11: The spec says it should throw RangeError,
    // IE11: but in IE11 it throws TypeError.
    EMPTY_VIEW.getInt8(0);
}
catch (e) {
    if (!(e instanceof RangeError)) {
        throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access");
    }
}

The specific error is thrown on the EMPTY_VIEW.getInt8(0) line as a RangeError: Offset is outside the bounds of the DataView. The error seems to occur when I declare the instance: this.lzma = new LZMA.

I noticed you are working on a major refactor which will likely fix it, but if you had any insight on how I could avoid getting this error, it would be much appreciated!

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

No branches or pull requests

1 participant