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

Uncaught Error Error: ENAMETOOLONG: name too long, open 'xxxx' at (program) (internal/process/promises:246:10) #62

Closed textworld closed 6 months ago

textworld commented 6 months ago

platform: macos Monterey 12.5.1 node: v16.10.0 chrome: 120.0.6099.109

params: node ./single-file --back-end webdriver-chromium --browser-debug=true "https://www.wikipedia.org" Uncaught Error Error: ENAMETOOLONG: name too long, open 'UEsDBBQAAAAIA.....' at (program) (internal/process/promises:246:10)

chromeOptions.addExtensions receive file object, not the base64 of file content. The call of encode should be removed. https://github.com/textworld/single-file-cli/blob/02054641deed19d86e7327aff3401c6ff1c6bf5e/back-ends/webdriver-chromium.js#L82C2-L82C2

gildas-lormeau commented 6 months ago

Thank you, I merged your code.