-
Notifications
You must be signed in to change notification settings - Fork 59
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
"Aborted(Module.asm
has been replaced by wasmExports
..." error in WASM bundle example
#128
Comments
I'm assuming the issue is in pdfium-render, as running this:
which swaps in pdfium-lib's example PDF viewer, works. I was able to upload a PDF into that sample app, and view it, as expected. That assumption may be wrong, of course! |
Hi @liammcdermott , thank you for reporting the issue and my apologies for the delay in replying - I've been away. At first glance the problem is likely caused by a packaging change upstream in the WASM build of Pdfium. You may find that using an older version (from, say, a couple of months ago) may work perfectly. Upstream does from time to time change their packaging, e.g. #95. I've set aside some time this week to look at this for you. |
Likely related to upstream emscripten change emscripten-core/emscripten#19816 |
Upstream emscripten change introduced into pdfium-lib as part of paulocoutinhox/pdfium-lib#98 |
Short-term work-around is to use https://github.com/paulocoutinhox/pdfium-lib/releases/tag/6008 instead of https://github.com/paulocoutinhox/pdfium-lib/releases/tag/6183 |
Added fall-backs for You can test the changes by taking |
As there have been no further comments, and I believe the issue is resolved, I am closing the issue. Feel free to re-open if you believe the issue has not been resolved. Confirmed no unexpected regression impact when using |
@ajrcarey Just wanted to drop a note to say thank you very much for fixing this so quickly! I ended up finding a different way to solve my problem, and the way I would test is the same you already did, so I don't think I can add anything useful. Thanks again! |
Using rustc 1.74.0 (79e9716c9 2023-11-13), the latest release of pdfium-lib (6183), and an up-to-date clone of pdfium-render, this error is printed to the browser console (Firefox 120.0.1 and Chrome 120.0.6099.109):
Steps to reproduce
I followed the instructions at Bundling for WASM closely, but I'll recreate what I did here.
From within a clone of the pdfium-render repo:
Then visiting http://localhost:4000 yields this result:
The text was updated successfully, but these errors were encountered: