giggio / node-chromedriver

An installer and wrapper for Chromedriver.
Apache License 2.0
477 stars 182 forks source link

Creates the intermediate tmp folder before attempting to copy CHROMEDRIVER_FILEPATH to it. #434

Closed anastasios-captureone closed 1 year ago

anastasios-captureone commented 1 year ago

Copying the binary no longer worked, unless the destination tmp folder already existed.

Steps to reproduce:

Failed with:

ChromeDriver installation failed Error: ENOENT: no such file or directory, copyfile '/tmp/chromedriver' -> '/tmp/117.0.5938.92/chromedriver/chromedriver-linux64/chromedriver'
    at Object.copyFileSync (node:fs:2894:3)
    at extractDownload (/home/anastasios/Sources/cloud/web/node_modules/chromedriver/install.js:364:8)
    at install (/home/anastasios/Sources/cloud/web/node_modules/chromedriver/install.js:70:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '/tmp/chromedriver',
  dest: '/tmp/117.0.5938.92/chromedriver/chromedriver-linux64/chromedriver'
}

After this change it succeeds.

giggio commented 1 year ago

Thanks for catching that! I'll release it soon as .3.

github-actions[bot] commented 1 year ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.