giggio / node-chromedriver

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

Chromedriver install breaks after 121 #457

Closed kailin0512 closed 8 months ago

kailin0512 commented 8 months ago

Using yarn 1.22.19 Node: 18.13.0

with chromedriver 121 it works fine, but 122 it is throwing this error:

error /Users/kailin/Desktop/work/myapp/node_modules/chromedriver: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/kailin/Desktop/work/myapp/node_modules/chromedriver
Output:
Saving to file: /var/folders/rp/cgjp3yb90gzg6w25w8h6mdrw0000gq/T/122.0.6261.128/chromedriver/chromedriver-mac-arm64.zip
Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
ChromeDriver installation failed TypeError: ProxyAgent is not a constructor
    at Installer.getRequestOptions (/Users/kailin/Desktop/work/myapp/node_modules/chromedriver/install.js:245:28)
    at Installer.getDownloadUrl (/Users/kailin/Desktop/work/myapp/node_modules/chromedriver/install.js:312:33)
    at Installer.downloadFile (/Users/kailin/Desktop/work/myapp/node_modules/chromedriver/install.js:125:20)
giggio commented 8 months ago

Duplicate of #448.

kailin0512 commented 8 months ago

@giggio This is a separate issue, The #448 I've resolved but this seems to be introduced only after V122

kailin0512 commented 8 months ago

I think it is highly possible it is introduced by this: https://github.com/giggio/node-chromedriver/commit/2cfb625a9124a929f2e2f0485241727aca6211e6

giggio commented 8 months ago

@kailin0512 I can't repro it. I just checked ProxyAgent source, and it has a constructor. Maybe your node_modules has a corrupt installation? If not, please send repro steps so I can verify it.

github-actions[bot] commented 7 months ago

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