0

I get an error when recording a mobile application.

  1. I deleted ApacheJmeterTemporaryRootCA.crt in the Jmeter bin folder.
  2. I started
  3. A new ApacheJmeterTemporaryRootCA.crt certificate has been created in the Jmeter bin folder.
  4. I downloaded the certificate to the phone
  5. I also changed the proxy settings in the phone's wifi settings
  6. I also start Jmeter and open the mobile application

But now there is an error as shown in the picture

It was working a few months ago Now such an error occurs

It's ok when I want to record a mobile browser on my phone. But this error occurs when I want to record a mobile application from the phone

Please help me

2022-03-18 15:22:23,777 WARN o.a.j.p.h.p.Proxy: [] Problem with SSL certificate for url for 'firebase-settings.crashlytics.com'? Ensure browser is set to accept the JMeter proxy cert: Received fatal alert: certificate_unknown 2022-03-18 15:22:26,046 INFO o.a.j.p.h.p.Proxy: [] KeyStore for SSL loaded OK and put host 'mobile.test.az' in map with key (mobile.test.az) 2022-03-18 15:22:26,319 WARN o.a.j.p.h.p.Proxy: [] Problem with SSL certificate for url for 'mobile.test.az'? Ensure browser is set to accept the JMeter proxy cert: Received fatal alert: certificate_unknown

Jmeter mobile application record error

Robert
  • 39,162
  • 17
  • 99
  • 152
  • Installing an additional root AC certificate requires changes to the app or root permissions: https://stackoverflow.com/questions/62730978/some-androids-apps-wont-connect-through-fiddler/62731432#62731432 – Robert Mar 21 '22 at 14:44
  • Does this answer your question? [Some androids apps won't connect through fiddler](https://stackoverflow.com/questions/62730978/some-androids-apps-wont-connect-through-fiddler) It is a different proxy, but the problem is the same, as it is caused by Android. – Robert Mar 21 '22 at 14:46

1 Answers1

0
  1. You need to take some extra steps in order to be able to record HTTPS traffic on android nougat or higher to wit:

    • add the next line to the application section of your app manifest

      android:networkSecurityConfig="@xml/network_security_config"
      
    • create network_security_config.xml file under your app resources folder with the following content

        <?xml version=“1.0” encoding="utf-8"?>
        <network-security-config>
          <debug-overrides>
            <trust-anchors>
              <!-- Trust user added CAs while debuggable only -->
              <certificates src="user" />
            </trust-anchors>
          </debug-overrides>
        </network-security-config>
      
    • build your app in debug mode

    • replace the app in the device with the debug .apk from the previous step

    More information: Configure Android Devices for Proxy Recording

  2. I don't think you should be recording requests to crashlytics.com (unless you're testing crashlytics itself) as well as any other 3rd-party services, all external domains should be excluded from the recording scope via "Requests Filtering" tab of the HTTP(S) Test Script Recorder:

    enter image description here

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • If this application does not have a source code, but only an apk file, then how do I do it? – Ehtimad Ismayilov Mar 21 '22 at 17:50
  • There are tools like [Apktool](https://ibotpeaches.github.io/Apktool/) which allow editing .apk files. Another option is rooting your Android device and installing JMeter's MITM certificate as system-wide – Dmitri T Mar 21 '22 at 18:20
  • I recorded the same phone, the same computer, and the same application a few months ago. Why is this happening now? – Ehtimad Ismayilov Mar 22 '22 at 14:00
  • `add the next line to the application section of your app manifest android:networkSecurityConfig="@xml/network_security_config" create network_security_config.xml file under your app resources folder with the following content ` – Ehtimad Ismayilov Mar 28 '22 at 13:34
  • I did this But the same problem I watch this video and did it [How to Install/Use ApkTool](https://www.youtube.com/watch?v=4fSZabapXjg&ab_channel=RockKoder) – Ehtimad Ismayilov Mar 28 '22 at 13:37
  • I did this But the same problem I watch this video and did it – Ehtimad Ismayilov Mar 28 '22 at 13:39