question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use custom CA with WebView on Android simulator

See original GitHub issue

Bug description: In our testing environment we use certs we sign with our own CA certificate. I was able to successfully install our CA cert on iOS and visit pages in the react native WebView without issue. On the Android Emulator I still get an error even after installing the customer CA. I know it is working and installed, because Chrome uses the CA and honors it, but when attempting to visit the page through the WebView I get the following:

Error loading page
Domain: undefined
Error Code: 3
Description: SSL error: The certificate authority is not trusted

To Reproduce: Setup a simple app with a WebView, open the app and point the WebView at a page with a ssl cert signed with the custom CA cert.

Expected behavior: The custom CA should be used and the error should not appear.

Environment:

  • OS: macOS
  • OS version: 11.5.2
  • react-native version: 17.0.2
  • react-native-webview version: 11.13.0
  • Android emulator info: sdk_gphone_x86-userdebug 10 QSR1.210802.001 7603624 dev-keys

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

2reactions
cyberphonecommented, Nov 27, 2021
2reactions
mav2287commented, Nov 15, 2021

That’s would allow for testing, but if does address the fact that if a CA has been added there shouldn’t be an error thrown when accessing urls signed with that CA.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does the Web View on Android support SSL? - Stack Overflow
I should find a way to add the site certificate in root keystore of the phone, so it can be trusted. But on...
Read more >
Security with network protocols - Android Developers
A CA signs a server certificate using its private key. The client can then check that the server has a platform-known CA certificate....
Read more >
Android Device & Emulator - Proxyman Documentation
How to install Proxyman CA on Android Devices.
Read more >
How to Fix SSL Connection Errors on Android Phones
This is the nuclear option, but if all of the other aforementioned suggestions have failed to solve the SSL Certificate error, you may...
Read more >
Desired Capabilities - Appium
deviceName, The kind of mobile device or emulator to use, iPhone Simulator ... CA format (country name abbreviation) for Android, e.g. fr_CA ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found