- NLPs
Retrieve Value in Text Element
Capture Dropdown Elements
Unable to Select Radiobutton
Unable to Click Checkbox
Clearing the Session or Cookies
UI Identifier NLP
Drag & Drop NLP
Uploading Files NLP
Use MySQL Addon in NLPs- setup
Server Docker Deployment Errors
Secured Business Application Support
Troubleshooting Restricted Access to Testsigma
Why mobile device not displayed in Testsigma Mobile Test Recorder?
Unable to Create New Test Session
Agent Startup Failure Due to Used Ports
Tests Permanently Queued in Local Executions
Fix Testsigma Agent Registration Failures
Testsigma Agent Cleanup
Need of Apache Tomcat for Testsigma Agent- web apps
URL not accessible
Test Queued for a Long Time
Issues with UI Identifiers
Missing Elements in Recorder
Collecting HAR File
Errors with Browser Session
Page Loading Issues- mobile apps
Failed to Start Mobile Test Recorder
Troubleshooting “Failed to perform action Mobile Test Recorder” error
Why Test Execution State is Queued for a Long Time?
Why Mobile App Keeps Stopping After Successful Launch?
More pre-requisite settings
Why am I not able to start WDA Process on iPhone?
What are the Most Common causes for Click/Tap NLP Failure?
How to Find App Package & Activity in Android?
Cross-environment Compatible ID Locators (Android)
Why Accessibility IDs Over other Locators?
What are Common Android Issues & Proposed Solutions?
How to Find the App Bundle ID for iOS?
Developer Mode (iOS 16 & Above)
How to Handle iOS App Compatibility Issues?
How to Disable Play Protect for SMS Forwarder Installation?
How to Capture Network Logs in an Android Application?
How to Capture Network Logs in an Android Application?
If your Android application is not capturing network logs or is showing invalid certificate errors, it may be due to missing proxy certificates or security configurations. As per Android’s official documentation, apps do not trust user/admin added CAs by default. Certificates issued by these authorities are rejected, which prevents the app from capturing network traffic and can cause errors when using self-signed certificates. This article discusses steps to enable network logging on Android devices correctly.
Troubleshooting Steps
Step 1: Create a network security configuration XML file
- Create the res/xml directory in your project if it does not exist.
- Create a new XML file named networksecurityconfig.xml.
-
Add the following content:
<network-security-config> <base-config> <trust-anchors> <!-- Trust preinstalled CAs --> <certificates src="system" /> <!-- Trust user-added CAs (needed for proxies) --> <certificates src="user" /> </trust-anchors> </base-config> </network-security-config>
This configuration allows your app to trust user-installed certificates, enabling proxy tools to capture network logs.
Step 2: Update the Application Manifest File
- Open AndroidManifest.xml.
- Locate the
tag. -
Add the android:networkSecurityConfig attribute:
<?xml version="1.0" encoding="utf-8"?> <manifest ... > <application android:networkSecurityConfig="@xml/network_security_config"> ... </application> </manifest>
Now, your app will use the specified network security configuration and allow network logs to be captured.