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

How to continue after error? #53

Open
sarimabbas opened this issue Mar 12, 2020 · 0 comments
Open

How to continue after error? #53

sarimabbas opened this issue Mar 12, 2020 · 0 comments

Comments

@sarimabbas
Copy link

sarimabbas commented Mar 12, 2020

I am running the inliner on a JS-rendered HTML page saved with Chrome, which uses data-src attributes on some img tags to lazy-load images. For some reason the inliner seems to follow these attributes, and since it cannot find them, it throws an error. The text of the error is:

Uncaught (in promise) Error: Could not call remote method 'html'. Check that the method signature is correct. Underlying error: The file /Users/sarimabbas/Developer/.../previews/intrepid.png was not found!
Underlying stack: Error: The file /Users/sarimabbas/Developer/.../intrepid.png was not found!
    at DataURI.encodeSync (/Users/sarimabbas/Developer/.../src/frontend/node_modules/datauri/api.js:77:11)
    at new DataURI (/Users/sarimabbas/Developer/.../src/frontend/node_modules/datauri/index.js:13:34)
    at Object.util.getFileReplacement (/Users/sarimabbas/Developer/.../src/frontend/node_modules/web-resource-inliner/src/util.js:190:24)

For reference, here is the problematic HTML. The src asset is available, but the data-src asset was never made available by Chrome:

<img data-v-36a5c8b0="" class="image" data-src="/previews/intrepid.png" src="./page_files/intrepid.png" lazy="loaded">

Is there a way to continue silently, or otherwise skip all data attributes? Thank you!

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