gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
539 stars 57 forks source link

TypeError: Cannot read properties of undefined (reading 'content') at capturePage #77

Closed sissbruecker closed 3 months ago

sissbruecker commented 3 months ago

Trying to save a copy of https://www.hightidestoredtla.shop/products/bullet-ballpoint-pen-light?variant=38087018184895 results in the following error:

Cannot read properties of undefined (reading 'content') URL: https://www.hightidestoredtla.shop/products/bullet-ballpoint-pen-light?variant=38087018184895
Stack: TypeError: Cannot read properties of undefined (reading 'content')
    at capturePage (file:///Users/gildas/Desktop/Dev/project-single-file/single-file-cli/single-file-cli-api.js:261:17)
    at eventLoopTick (ext:core/01_core.js:168:7)
    at async runNextTask (file:///Users/gildas/Desktop/Dev/project-single-file/single-file-cli/single-file-cli-api.js:164:20)
    at async Promise.all (index 0)
    at async capture (file:///Users/gildas/Desktop/Dev/project-single-file/single-file-cli/single-file-cli-api.js:115:2)
    at async run (file:///Users/gildas/Desktop/Dev/project-single-file/single-file-cli/single-file-launcher.js:82:3)
    at async file:///Users/gildas/Desktop/Dev/project-single-file/single-file-cli/single-file:5:1

Reproduction using Node v20.9.0:

npm i -g single-file-cli
single-file "https://www.hightidestoredtla.shop/products/bullet-ballpoint-pen-light?variant=38087018184895" test.html

Or the Deno standalone build:

./single-file-aarch64-apple-darwin "https://www.hightidestoredtla.shop/products/bullet-ballpoint-pen-light?variant=38087018184895" test.html
gildas-lormeau commented 3 months ago

Thank you, I was able to reproduce and fix the issue. The next version will include the fix.

sissbruecker commented 3 months ago

Great, thanks!

gildas-lormeau commented 3 months ago

You're welcome, the new version is available for download.