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
602 stars 63 forks source link

TypeError: window.singlefile is undefined #46

Closed scruel closed 6 months ago

scruel commented 2 years ago

Describe the bug Could not save page and got TypeError.

To Reproduce Following command works fine: single-file https://www.baidu.com 1.html --back-end=webdriver-gecko --browser-headless=false

But not this: single-file https://baidu.com 1.html --back-end=webdriver-gecko --browser-headless=false Will got error:

TypeError: window.singlefile is undefined URL: https://baidu.com
Stack: undefined

Expected behavior A clear and concise description of what you expected to happen.

Environment

gildas-lormeau commented 2 years ago

I was not able to reproduce your issue, same OS, same Firefox version, geckodriver v0.30.0.

scruel commented 2 years ago

I was not able to reproduce your issue, same OS, same Firefox version, geckodriver v0.30.0.

Are there any log files that I can provide to you, so you can debug on it?

gildas-lormeau commented 2 years ago

Note that Selenium is not really suited to SingleFile needs. If you want to use Firefox, you could install playwright with npm (it's not included by default because it's quite large) and use playwright-firefox as backend.

gildas-lormeau commented 6 months ago

This issue is now obsolete.