CA
passive-yellow
ERR_CERT_AUTHORITY_INVALID Issue with Apify Proxy
Hello, I'm using an Apify Proxy in combination with Playwright and ran into an ERR_CERT_AUTHORITY_INVALID error when trying to visit certain sites.
Playwright code (in node):
The error that I get is:
I'm not the most familiar with Certaificate Authority validation so I'm not sure what could be the issue or what I might be able to configure in order to resolve this. Any help or insight would be appreciated greatly - thank you!
const proxyRouter = ProxyRouter({
proxies: {
DEFAULT: `http://groups-RESIDENTIAL,country-US:${process.env.APIFY_PROXY_PASSWORD}@proxy.apify.com:8000`
}
});
chromium.use(proxyRouter)
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();
// Fails on this step! Is unable to get past this due to throwing
// a `ERR_CERT_AUTHORITY_INVALID` error.
await page.goto('https://apps.ilsos.gov/businessentitysearch/');
const proxyRouter = ProxyRouter({
proxies: {
DEFAULT: `http://groups-RESIDENTIAL,country-US:${process.env.APIFY_PROXY_PASSWORD}@proxy.apify.com:8000`
}
});
chromium.use(proxyRouter)
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();
// Fails on this step! Is unable to get past this due to throwing
// a `ERR_CERT_AUTHORITY_INVALID` error.
await page.goto('https://apps.ilsos.gov/businessentitysearch/');
node test.mjs
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
page.goto: net::ERR_CERT_AUTHORITY_INVALID at https://apps.ilsos.gov/businessentitysearch/
=========================== logs ===========================
navigating to "https://apps.ilsos.gov/businessentitysearch/", waiting until "load"
============================================================
at testIllinois (file:///Users/danielguillen/repos/jsScratchPAper/test.mjs:124:14) {
name: 'Error'
}
Node.js v18.16.0
node test.mjs
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
page.goto: net::ERR_CERT_AUTHORITY_INVALID at https://apps.ilsos.gov/businessentitysearch/
=========================== logs ===========================
navigating to "https://apps.ilsos.gov/businessentitysearch/", waiting until "load"
============================================================
at testIllinois (file:///Users/danielguillen/repos/jsScratchPAper/test.mjs:124:14) {
name: 'Error'
}
Node.js v18.16.0
2 Replies
passive-yellowOP•2y ago
I also tried running a similar code with Curl and got the following response:
curl -v --proxy 'http://groups-RESIDENTIAL,country-US:<PASSWORD>@proxy.apify.com:8000' 'https://apps.ilsos.gov/businessentitysearch/'
* Trying 35.171.134.41:8000...
* Connected to proxy.apify.com (35.171.134.41) port 8000 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to apps.ilsos.gov:443
* Proxy auth using Basic with user 'groups-RESIDENTIAL,country-US'
> CONNECT apps.ilsos.gov:443 HTTP/1.1
> Host: apps.ilsos.gov:443
> Proxy-Authorization: Basic Z3....
> User-Agent: curl/7.88.1
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection Established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
curl -v --proxy 'http://groups-RESIDENTIAL,country-US:<PASSWORD>@proxy.apify.com:8000' 'https://apps.ilsos.gov/businessentitysearch/'
* Trying 35.171.134.41:8000...
* Connected to proxy.apify.com (35.171.134.41) port 8000 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to apps.ilsos.gov:443
* Proxy auth using Basic with user 'groups-RESIDENTIAL,country-US'
> CONNECT apps.ilsos.gov:443 HTTP/1.1
> Host: apps.ilsos.gov:443
> Proxy-Authorization: Basic Z3....
> User-Agent: curl/7.88.1
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection Established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
correct-apricot•2y ago
I think the
.gov
site is not allowed via residential proxy