Unanswered question

Missing certificate error

Issue: Observed "The request has returned a missing certificate error" message while trying to record a mobile application through proxy mode

Platform: Android
Version:9
NeoLoad version:7.4
Neoload machine platform: Windows

Steps followed:
1. Installed the NeoLoad certificate in Android device and added it to trusted certificates
2. Installed the NeoLoad certificate in the Windows machine in which NeoLaod is installed and added it to trusted certificates
3. Connected NeoLoad controller and Android device to the same network
4. Changed the proxy settings in Android device
5. Clicked on start recording

Observation: A yellow triangle appears next to the stop recording button in the recording toolbar. "The request has returned a missing certificate error" message is displayed on hovering over the yellow triangle.

Diwakar D.
Diwakar D.

Diwakar D.

Level
0
56 / 100
points

Answers

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

for later android versions, when testing apps, you need to add the certificate another way

https://www.neotys.com/documents/doc/neoload/latest/en/html/#761.htm#o39044

Diwakar D.
Diwakar D.

Diwakar D.

Level
0
56 / 100
points

@Neil - Hi Neil, We did follow the below method:
To install the root certificate on a device on Android 7.0 and above
Update your "AndroidManifest.xml" application section with "networkSecurityConfig.xml":
<application android:name=”AppName”
android:icon=”@mipmap/ic_launcher”
android:label=”@string/app_name”
android:networkSecurityConfig=”@xml/network_security_config”>
Add the the "res/xml/network_security_config.xml" file in the APK of the Android Application with the following content:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<!-- Trust preinstalled CAs -->
<certificates src="system" />
<!-- Additionally trust user added CAs -->
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Regenerate and sign the APK.
Install this APK.
This allows the NeoLoad Certificate Authority just added to be usable by the APK.

Diwakar D.
Diwakar D.

Diwakar D.

Level
0
56 / 100
points

Hi

Any help on this would be really helpful. We did follow the instructions in https://www.neotys.com/documents/doc/neoload/latest/en/html/#761.htm#o39044 as mentioned by Neil. The application is also a debug application. But we are still facing the same issue. We see the error "The request has returned a missing certificate error"

Thanks in advance.

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Could you confirm that if you use the browser on the mobile and you are trying to record any HTTPS URL while recording with NeoLoad you do not get any SSL warning on the browser and/or any yellow flag on the recording bar?

This test is to rule out any issue with the NeoLoad ROOT certificate. If you do not have such warning then my guess is that your application may have implemented SSL pinning. Could you confirm that with the developers of your mobile application?

We can't record such mobile application if SSL pinning is enabled unless you import in NeoLoad the server certificate used to sign your certificate. This can be done in the NeoLoad preferences under HTTP recorder.

But maybe the easy way would be to disable SSL pining on the apk if it's enabled. This is only needed to allow the recording.

 

Diwakar D.
Diwakar D.

Diwakar D.

Level
0
56 / 100
points

We are able to record the browser on mobile so we can rule out any issues with the NeoLoad root certificate.
Checked with our developers and they confirmed there are no SSL pinnings implemented in the application. But I would also like to know if there is a standard way that we confirm if the SSL pinning is enabled in an application.
Also, can the reason for the error be something else other than the SSL pinning?

Diwakar D.
Diwakar D.

Diwakar D.

Level
0
56 / 100
points

Hi all

Any update on this?

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

If you still have the yellow fag in the recording bar in NeoLoad then it may still be a SSL issue. Could you open the NeoLoad logs folder through the menu "Help-->Open logs folder" right after reproducing your recording issue and check the neoload.log file content if you can see this kind of errors "certificate_unknown" or any other errors?

Also are you able to record other native applications from your mobile?