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
540 stars 58 forks source link

`Cannot read properties of undefined` when following the docker example #11

Open strogonoff opened 1 year ago

strogonoff commented 1 year ago
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Cannot read properties of undefined (reading 'close') URL: https://www.wikipedia.org
Stack: TypeError: Cannot read properties of undefined (reading 'close')
    at Object.exports.getPageData (/usr/src/app/node_modules/single-file-cli/back-ends/puppeteer.js:54:15)
    at async capturePage (/usr/src/app/node_modules/single-file-cli/single-file-cli-api.js:254:20)
    at async runNextTask (/usr/src/app/node_modules/single-file-cli/single-file-cli-api.js:175:20)
    at async Promise.all (index 0)
    at async capture (/usr/src/app/node_modules/single-file-cli/single-file-cli-api.js:126:2)
    at async run (/usr/src/app/node_modules/single-file-cli/single-file:54:2)

Docker version 20.10.20, build 9fdeb9, macOS

gildas-lormeau commented 1 year ago

I'm not sure the image works on ARM. You're a bit lucky because I own a Mac for about 1 week. I did not install Docker yet though. I'll do some tests.

strogonoff commented 1 year ago

To be honest I am not sure ARM is of consequence, since the image was built using amd64 platform (and it showed up as such in Docker Desktop GUI). Docker Desktop for Mac handles non-ARM architecture transparently using Apple’s compatibility layer. Judging by the error, it could be more likely some dependency became incompatible? That said, I did not dig in yet, will try when I have the time.