If you encounter Connection failed due to certificate issues error while recording tests, follow these steps to resolve it.
1. Modify Configuration to Ignore SSL Warnings
If SSL inspection is enabled, update the config.json file to bypass SSL warnings.
File Locations:
- On Windows: C:\Users\<username>\.lca\config.json
- On macOS: /Users/<username>/.lca/config.json
Replace <username> with your system username.
Steps to update the configuration to bypass SSL warnings:
- Open the config.json file from the above location.
- Add the following configuration to the config.json file:
{ "loggingLevel": "info", "proxy": { "ignoreSSLWarning": true } }
- Save the file.
- Restart the application for changes to take effect.
2. Add the BrowserStack Certificate to the Certificate Store
If the issue persists, manually trust the BrowserStack certificate by exporting and importing it.
2.A. Export the BrowserStack Certificate
- Open https://www.browserstack.com/ URL in Chrome (or another browser).
- Click the padlock icon in the address bar to view site information.
- Select Connection is secure (or similar, depending on your browser).
- Click Certificate (Valid) to open the certificate details.
- In the certificate window, go to the Details tab.
- Click Copy to File... (Windows) or Export (macOS) and follow the prompts to save the certificate in .crt or .pem format.
2.B. Import the Certificate into the Certificate Store
On Windows:
- Open the Manage Computer Certificateswindow:
- Press Win + R, type certmgr.msc, and press Enter.
- Or search for certmgr.msc in the Windows Start menu.
- Choose the certificate store:
- Current User (trusts for the current user only)
- Local Machine (trusts for all users, requires admin rights)
- Import the certificate:
- Right-click Trusted Root Certification Authorities > All Tasks > Import.
- Browse to the .crt or .pem file and complete the import process.
- Verify that the certificate appears under Trusted Root Certification Authorities.
On macOS:
- Open Keychain Access (Cmd + Space, search for Keychain Access).
- Select System or Login under Keychains.
- Drag and drop the .crt or .pem file into the list.
- Double-click the certificate and expand Trust.
- Set "When using this certificate" to Always Trust.
- Close the window and enter your password to save changes.
3. Disable SSL Inspection for the BrowserStack Network
If SSL inspection continues to interfere, you may need to disable it for BrowserStack by following these steps:
- Contact your IT/network administrator and request an exclusion for BrowserStack domains from SSL inspection. Domains that need to be excluded are :
- *.browserstack.com
- *.percy.io
- Adjust security settings in your firewall or proxy to allow direct access to BrowserStack.
- Restart your application and check if the issue is resolved.
If you have tried the above solutions and are still unable to resolve the issue, please contact our Support team for further assistance.