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

webdriver-chromium not working anymore #1

Closed hwangeug closed 2 years ago

hwangeug commented 2 years ago

Just tried a fresh NPM install and I can't seem to use webdriver-chromium anymore - I get an error from selenium-webdriver every time:

./single-file --back-end=webdriver-chromium https://github.com/gildas-lormeau/single-file-cli                                                                           
/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/index.js:51
    throw new Error('Invalid URL: ' + aUrl)
          ^

Error: Invalid URL: http:/
    at getRequestOptions (/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/index.js:51:11)
    at new HttpClient (/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/index.js:90:21)
    at getStatus (/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/util.js:38:18)
    at checkServerStatus (/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/util.js:76:14)
    at /home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/util.js:74:5
    at new Promise (<anonymous>)
    at Object.waitForServer (/home/eugene/Scratch/sf/node_modules/selenium-webdriver/http/util.js:57:10)
    at /home/eugene/Scratch/sf/node_modules/selenium-webdriver/remote/index.js:251:24
    at new Promise (<anonymous>)
    at /home/eugene/Scratch/sf/node_modules/selenium-webdriver/remote/index.js:246:20

Node.js v18.3.0

Puppeteer still works, this command completed successfully:

./single-file --browser-executable-path=/usr/bin/chromium https://github.com/gildas-lormeau/single-file-cli
gildas-lormeau commented 2 years ago

Thank you, it was a bug in selenium with Node 18. I updated the dependencies and it works fine now.