Facing issue while recording data from Android mobile device to JMeter
sifaat amol <[email protected]> Thu, 19 Sep 2024 19:33:17 +0530
| Newsgroups | gmane.comp.apache.logging |
|---|---|
| Message-ID | <CAGZBn6ygRYjpzyXP12ELhXZk9M_aFA7DcFL8_9BddEKCBwJTVQ@mail.gmail.com> |
--0000000000001394020622796310 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Team, Hope you all are doing great. I have been facing an issue with JMeter and am meaning to get some help. The respective issue is explained below. *Objective: *To record the app data/ traffic of an android app from an android phone in JMeter in laptop smoothly *Components used: * =C2=B7 apache-jmeter-5.6.3 =C2=B7 jdk 1.8 =C2=B7 android debug build *Standard method followed:* 1. Download JMeter Temporary Certificate into the android device and install it. 2. Set up a proxy on the android device and the laptop. Once the mobile device and laptop are using the same Wi-Fi network, use the laptop's IPv4 address as the proxy server and a 4-digit port number same as that in JMeter. 3. Start performing the required flows in the mobile app and the data/ network traffic gets recorded by JMeter in the laptop. *Issue:* The requirement involves logging into the application after launching it. Until the month of June, we were able to record the said flow easily by following the above mentioned steps. Since the last two months we have been facing issues while recording the login flow. Whenever we set up the proxy and then launch the application, it records normally. But when we enter credentials to login, it shows an error has occurred, with a code no. *400106*. The 400106 error is propagated by the Android SDK network service when the service does not recognize network connection. We tried the same flow on different debug builds on different devices using the same JMeter version in our laptops, but it did not help. We reached out to the SAP team as well, but they told us that they cannot help as no log/ failure log is available for them to check. Also, our client=E2=80=99s team could not help as it is not in there is no error in t= heir CDC logs. We tried to record the flow using Android Studio Emulator as well in the laptop which has JMeter in it. A project was created as an emulated device. JMeter root certificate was downloaded and installed into it, proxy was set up as mentioned in the standard method above, same port number set up in the emulator and JMeter and the same debug build was used for the recording. We got the same error as we were getting in the real device while login but also got the logs of the same. The logs had the statement: *javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.* Followed by this, our developers tried to make a change to the debug build to accept any certificate that we add to the mobile device but that also did not help. Looking for help in anticipation Thanks Sifaat --0000000000001394020622796310 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-he= ight:13.91px"><span style=3D"line-height:13.91px"><font face=3D"arial, sans= -serif">Hi Team,</font></span></p><p class=3D"MsoNormal" style=3D"margin:0i= n 0in 8pt;line-height:13.91px"><span style=3D"line-height:13.91px"><font fa= ce=3D"arial, sans-serif"><br></font></span></p><p class=3D"MsoNormal" style= =3D"margin:0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:13.9= 1px"><font face=3D"arial, sans-serif">Hope you all are doing great. I have = been facing an issue with JMeter and am meaning to get some help. The respe= ctive issue is explained below.</font></span></p><p class=3D"MsoNormal" sty= le=3D"margin:0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:13= .91px"><font face=3D"arial, sans-serif">=C2=A0</font></span></p><p class=3D= "MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.91px"><font face=3D"= arial, sans-serif"><b><u><span style=3D"line-height:13.91px">Objective:=C2= =A0</span></u></b><span style=3D"line-height:13.91px">To record the=C2=A0ap= p data/ traffic of an android app from an android phone in JMeter in laptop= smoothly</span></font></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8= pt;line-height:13.91px"><span style=3D"line-height:13.91px"><font face=3D"a= rial, sans-serif">=C2=A0</font></span></p><p class=3D"MsoNormal" style=3D"m= argin:0in 0in 8pt;line-height:13.91px"><b><u><span style=3D"line-height:13.= 91px"><font face=3D"arial, sans-serif">Components=C2=A0used:=C2=A0</font></= span></u></b></p><p style=3D"margin:0in 0in 0in 0.5in;line-height:13.91px">= <font face=3D"arial, sans-serif"><span style=3D"line-height:13.91px">=C2=B7= <span style=3D"font-variant-numeric:normal;font-variant-east-asian:normal;f= ont-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-= feature-settings:normal;font-stretch:normal;line-height:normal">=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0</span></span><span style=3D"line-height:13.91px= ">apache-jmeter-5.6.3</span></font></p><p style=3D"margin:0in 0in 0in 0.5in= ;line-height:13.91px"><font face=3D"arial, sans-serif"><span style=3D"line-= height:13.91px">=C2=B7<span style=3D"font-variant-numeric:normal;font-varia= nt-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;f= ont-kerning:auto;font-feature-settings:normal;font-stretch:normal;line-heig= ht:normal">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span></span><span style=3D= "line-height:13.91px">jdk 1.8</span></font></p><p style=3D"margin:0in 0in 8= pt 0.5in;line-height:13.91px"><font face=3D"arial, sans-serif"><span style= =3D"line-height:13.91px">=C2=B7<span style=3D"font-variant-numeric:normal;f= ont-variant-east-asian:normal;font-variant-alternates:normal;font-size-adju= st:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;= line-height:normal">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span></span><span= style=3D"line-height:13.91px">android debug build</span></font></p><p clas= s=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.91px"><span styl= e=3D"line-height:13.91px"><font face=3D"arial, sans-serif">=C2=A0</font></s= pan></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.9= 1px"><font face=3D"arial, sans-serif"><b><u><span style=3D"line-height:13.9= 1px">Standard method followed:</span></u></b><span style=3D"line-height:13.= 91px"></span></font></p><p style=3D"margin:0in 0in 0in 0.5in;line-height:13= .91px"><font face=3D"arial, sans-serif"><span style=3D"line-height:13.91px"= >1.<span style=3D"font-variant-numeric:normal;font-variant-east-asian:norma= l;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;fo= nt-feature-settings:normal;font-stretch:normal;line-height:normal">=C2=A0= =C2=A0=C2=A0=C2=A0</span></span><span style=3D"line-height:13.91px">Downloa= d JMeter Temporary Certificate into the android device and install it.=C2= =A0</span></font></p><p style=3D"margin:0in 0in 0in 0.5in;line-height:13.91= px"><font face=3D"arial, sans-serif"><span style=3D"line-height:13.91px">2.= <span style=3D"font-variant-numeric:normal;font-variant-east-asian:normal;f= ont-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-= feature-settings:normal;font-stretch:normal;line-height:normal">=C2=A0=C2= =A0=C2=A0=C2=A0</span></span><span style=3D"line-height:13.91px">Set up a p= roxy on the android device=C2=A0and the laptop. Once the mobile device and = laptop are using the same Wi-Fi network, use the laptop's IPv4 address = as the proxy server and a 4-digit port number same as that in JMeter.</span= ></font></p><p style=3D"margin:0in 0in 8pt 0.5in;line-height:13.91px"><font= face=3D"arial, sans-serif"><span style=3D"line-height:13.91px">3.<span sty= le=3D"font-variant-numeric:normal;font-variant-east-asian:normal;font-varia= nt-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-s= ettings:normal;font-stretch:normal;line-height:normal">=C2=A0=C2=A0=C2=A0= =C2=A0</span></span><span style=3D"line-height:13.91px">Start performing th= e required flows in the mobile app and the data/ network traffic gets recor= ded=C2=A0by JMeter in the laptop.</span></font></p><p class=3D"MsoNormal" s= tyle=3D"margin:0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:= 13.91px"><font face=3D"arial, sans-serif">=C2=A0</font></span></p><p class= =3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.91px"><b><u><span= style=3D"line-height:13.91px"><font face=3D"arial, sans-serif">Issue:</fon= t></span></u></b></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;lin= e-height:13.91px"><span style=3D"line-height:13.91px"><font face=3D"arial, = sans-serif">The requirement involves logging into the application after lau= nching it. Until the month of June, we were able to record the said flow ea= sily by following the above mentioned steps. Since the last two months we h= ave been facing issues while recording the login flow. Whenever we set up t= he proxy and then launch the application, it records normally. But when we = enter credentials to login, it shows an error has occurred, with a code no.= =C2=A0<i>400106</i>. The 400106 error is propagated by the Android SDK netw= ork service when the service does not recognize network connection.</font><= /span></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13= .91px"><span style=3D"line-height:13.91px"><font face=3D"arial, sans-serif"= >=C2=A0</font></span></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt= ;line-height:13.91px"><span style=3D"line-height:13.91px"><font face=3D"ari= al, sans-serif">We tried the same flow on different debug builds on differe= nt devices using the same JMeter version in our laptops, but it did not hel= p.</font></span></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line= -height:13.91px"><span style=3D"line-height:13.91px"><font face=3D"arial, s= ans-serif">We reached out to the SAP team as well, but they told us that th= ey cannot help as no log/ failure log is available for them to check. Also,= our client=E2=80=99s team could not help as it is not in there is no error= in their CDC logs.</font></span></p><p class=3D"MsoNormal" style=3D"margin= :0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:13.91px"><font= face=3D"arial, sans-serif">We tried to record the flow using Android Studi= o Emulator as well in the laptop which has JMeter in it. A project was crea= ted as an emulated device. JMeter root certificate was downloaded and insta= lled into it, proxy was set up as mentioned in the standard method above, s= ame port number set up in the emulator and JMeter and the same debug build = was used for the recording. We got the same error as we were getting in the= real device while login but also got the logs of the same. The logs had th= e statement:=C2=A0<i>j<span style=3D"background-color:rgb(255,242,204)">ava= x.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorExcept= ion: Trust anchor for certification path not found.</span></i></font></span= ></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.91px= "><span style=3D"line-height:13.91px"><font face=3D"arial, sans-serif">Foll= owed by this, our developers tried to make a change to the debug build to a= ccept any certificate that we add to the mobile device but that also did no= t help.</font></span></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt= ;line-height:13.91px"><span style=3D"line-height:13.91px"><font face=3D"ari= al, sans-serif">=C2=A0</font></span></p><p class=3D"MsoNormal" style=3D"mar= gin:0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:13.91px"><f= ont face=3D"arial, sans-serif">Looking for help in anticipation</font></spa= n></p><p class=3D"MsoNormal" style=3D"margin:0in 0in 8pt;line-height:13.91p= x"><span style=3D"line-height:13.91px"><font face=3D"arial, sans-serif">Tha= nks</font></span></p><font color=3D"#888888"><p class=3D"MsoNormal" style= =3D"margin:0in 0in 8pt;line-height:13.91px"><span style=3D"line-height:13.9= 1px"><font face=3D"arial, sans-serif">Sifaat</font></span></p></font></div> --0000000000001394020622796310--