-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Aborted(Module.asm
has been replaced by wasmExports
(the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name))
#134
Comments
Hi @samsieber , thank you for reporting the issue. I cannot reproduce the problem using Please confirm the version of |
As there have been no further comments and I am unable to reproduce the problem, I will shortly close the issue. Please provide additional comments to keep the issue open. |
As there have been no further comments and I am unable to reproduce the problem, I am closing the issue. Please provide the steps required to reproduce the problem before re-opening the issue. |
Sorry for the long delay getting back to you; I was out last week. I've set up a minimal reproduction here: https://github.com/samsieber/pdfium-render-128-repro . It uses pdfium-render 0.8.17 and pdfium-lib release 6183 downloaded from https://github.com/paulocoutinhox/pdfium-lib/releases/tag/6183, though I did modify it a bit to work with ESM loading (probably the root of the problem). If you have yarn and wasm-pack installed globally, you should be able to clone it, go in and run I'm using a bundler, so manually tweaked the pdfium.js file to work with ESM loading, and renamed the wasm file from pdfium.wasm to pdfium_bg.wasm. See this change: samsieber/pdfium-render-128-repro@ff5ed61#diff-97547cdd138a3638f89f726f3a7609dbeca961cf9ac13255a1392f56a0b21fd9 for the exact changes I made. It basically just changed how I imported it, how I fed it the url of the wasm asset, and the name of the wasm asset (to work with my particular wasm loader). That said, I'd been fine working around it with this nice line |
I've added the reproduction, let me know if you have questions. I'm not sure if you'll see this since it's closed, and I'm not sure how to reopen it, so I'll ping you here @ajrcarey. Also, thanks for maintaining this. |
Thank you for the reproduction steps and repo @samsieber , that's very useful. I agree with you that the problem is likely due to the packaging mechanism; I'm not a web developer so I'm reluctant to get too deep into that. I am keen, however, to support all reasonable packaging systems and I'm aware that the build system used in the examples is far from state-of-the-art. I have made a small change which (I think) addresses the issue in your sample repo, and I have confirmed it doesn't break anything when following the build instructions at https://github.com/ajrcarey/pdfium-render/blob/master/examples/README.md. You can test it by taking |
As there have been no further comments, and I believe the issue is resolved, I will shortly close the issue. Allowing another three days for feedback from @samsieber . |
This does address the issue. Thanks for your help! |
Updated README. Ready to release as part of version 0.8.18. |
This is much like #128; it appears the wasmTable lookup was missed.
I hacked up the pdfium-lib wasm's js file to be able to load as an ESM module (kinda - I got it working with Vite through some manual modification), and I'm running it a webworker, so I can't even manually patch the window object (since in a web worker the window object doesn't exist).
I have a commit here: samsieber@0846f61; I'd be happy to submit it as a PR if you'd like. I've just noticed you have what seems to be a pretty set pattern of issue, then commit referencing issue.
The text was updated successfully, but these errors were encountered: