Application login fails while running JMeter proxy - proxy

my test app is opencart, I am unable to record login scenario for open cart. The scenario is, if i provide a username/password while proxy recording is off, works fine. But when i've started recording and providing the username/password will not work
The response data says
Notice: Undefined index: email in D:\Program
Files\wamp\www\opencart\catalog\controller\account\login.php on
line 201Notice: Undefined index: password in
D:\Program
Files\wamp\www\opencart\catalog\controller\account\login.php on
line 201Notice: Undefined index: email in D:\Program
Files\wamp\www\opencart\catalog\controller\account\login.php on
line 205
another error message displayed is
java.lang.IllegalArgumentException: Unexpected method:
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:252)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:211)
Apart from that other recording is working fine, clicking links navigating to another page all works fine

Provide Http sampler settings type as HttpClient3.1 in proxy

The issue you are facing seems to come from an unexpected HTTP Method used.
It seems to be none of:
POST
PUT
HEAD
TRACE
OPTIONS
DELETE
GET
PATCH
Can you give more details on it ?

Related

Using JMeter 5.4.1 recording .Net application gets either wrong response or Error response Code: 500

Using:
JMeter version 5.4.1
Browsers:
MS Edge 94.0
Google Chrome: 94.0
FireFox: 92.0.1
Using JMeter to record .Net application. 90% of the recording was perfectly fine. no page crashed and received the response correctly. Except, when I made any requests that related to permission.aspx or permission.asp page I got error message have shown below or wrong response content displayed on the page.
I did try to change the record type from httpclient4 to Java but it didn't help.
Also Error log from JMeter log showed: Cause: java.io.IOExeption: Server returned HTTP response code: 500 for URL: https://xxxx.xx.xx.com/
USERID:
ASP.Net EXCEPTION:
StatusCode:
200
Error Message:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
Inner Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Your question provide sufficient level of details so I doubt you will get a comprehensive answer, it looks like JMeter isn't capable of handling some specific setup of your application.
In order to get more information you could:
Increase logging level verbosity for JMeter's HTTP(S) Test Script Recorder by adding the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.proxy" level="debug" />
then inspect jmeter.log file for any suspicious entries
Check your application logs as HTTP 5xx errors are server-side errors so most probably the reason can be found there
You might also want to try out an alternative way of recording a JMeter test: JMeter Chrome Extension which is kind of less "invasive" and "alien" to the browser than JMeter's proxy server.

site - is currently unable to handle this request Http error 500

once i clicked on "Proceed to checkout" button, we are getting below error
The sitename.com is't working
www.sitename.co.nz is currently unable to handle this request
Http Error 500
even in backend when we open some orders, than also same error in order-view page.
we have shared hosting.
It was a problem with magento core file cc.php file , one of our devoloper edited it in wrong way, once i replaced the
original file, it worked fine.

Jmeter Uncaught exception: java.lang.NullPointerException

I am trying to record REST requests with "http(s) test script recorder". It's working properly and record the request until i keep "Capture HTTP Headers" checked. Since I want to keep header common with some variable throughout requests and wanted to put dynamic parameter I don't want http header to be recorded everytime.
To do so, I remove that checkbox "Capture HTTP Headers", now none of my requests are getting recorded. And application is throwing exception
I am using https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf to record the requests.
ERROR - jmeter.JMeter:
Uncaught exception: java.lang.NullPointerException
at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:1275)
at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:567)
at
org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:291)
I logged the bug with jmeter issue tracker.
They have suggested a solution to recompile the source with these 2 file changes.
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
jmeter/trunk/xdocs/changes.xml
Actual Bug https://bz.apache.org/bugzilla/show_bug.cgi?id=58453
Thanks,

How do I avoid the "java.util.zip.ZipException: Not in GZIP format" error while using JMeter 2.12

I'm trying to record my interactions with a SAAS website using JMeter 2.12. I get the following error trace as soon as I try to login:
java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
at java.util.zip.GZIPInputStream.(Unknown Source)
at java.util.zip.GZIPInputStream.(Unknown Source)
at org.apache.http.client.entity.GzipDecompressingEntity.decorate(GzipDecompressingEntity.java:56)
at org.apache.http.client.entity.DecompressingEntity.getDecompressingStream(DecompressingEntity.java:68)
at org.apache.http.client.entity.DecompressingEntity.getContent(DecompressingEntity.java:82)
at org.apache.http.client.entity.GzipDecompressingEntity.getContent(GzipDecompressingEntity.java:41)
at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:89)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:348)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1141)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:236)
Blockquote
I searched for the solution and found one in BugZilla: Bug 51918 where it says to turn off the concurrent download. I tried that by unchecking the "Retrieve All Embedded Resources" option in the 'HTTP Requests Defaults'- but still getting the error and cannot proceed.
Can anyone please help? Thanks a lot!
--Ishti
Ok, I think I got an answer. Thanks to Bhargav in his post where he basically told to change the 'HTTP sampler settings' (in the HTTP test script recorder) to 'Java'. I tried that and it's not giving me the error anymore. I can proceed. Thanks!
I got into this problem in JMETER this week. The solution that worked for me in current version is.
In the header manager add:
Accept-Encoding: gzip;q=0,deflate,sdch
The server will send you a response that JMETER can handle.
I got this error on a Web application (Genexus WebApp) when it sent me an HTTP 403 error code with invalid encoding.
So to troubleshoot the problem I use two approaches:
First, turn on the log level to DEBUG, and enable the Log Viewer:
With this we can see the current payload in the Viewer:
Another alternative is to set the accept-encoding to identity, to receive the payload uncompressed.
So after that, I figured out the problem was my request (invalid params)

Causes for HttpDelete header field 'x-method' missing error

Please help me understand the possible causes of an 'x-method' missing error when using HttpDelete.
There is a Windows 7 user using Chrome 23 but HttpDelete isn't working. This test website http://www.mnot.net/javascript/xmlhttprequest/ reports the following for the "What Methods Are Available?" section:
DELETE: fail (Test execution problem: expected response header field ('x-method') missing.)
The machine also fails to use DELETE when using a custom web application accessing a REST service using jQuery ajax. It reports a 405 exception for any DELETE requests. The application works fine for other machines with the exact same actions.
Information about what could cause the delete verb to fail under these circumstances is appreciated.

Resources