0.7.0 upgrade - nullPointerException when performing request with missing or invalid basic auth credentials
See original GitHub issueThe following scenario passes on 0.6.2 but fails on 0.7.0
Scenario: Basic Auth Credentials must be supplied for POST
Given path '/apath'
And request
"""
{
"foo": "bar"
}
"""
When method PUT
Then status 401
And match response.errors[0].code == "unauthorized"
And match response.errors[0].message == "Not authorized"
I get the response
15:56:05.225 [main] DEBUG com.intuit.karate -
1 > PUT SOMEENDPOINT
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Content-Length: 128
1 > Content-Type: application/json; charset=UTF-81 > Host: SOMEHOST
1 > User-Agent: Apache-HttpClient/4.5.4 (Java/1.8.0_112)
{"foo":"bar"}
15:56:05.391 [main] ERROR com.intuit.karate - java.lang.NullPointerException, http call failed after 167 milliseconds for URL: SOMEENDPOINT
15:56:05.391 [main] ERROR com.intuit.karate - http request failed:
java.lang.NullPointerException
com.intuit.karate.exception.KarateException:
java.lang.NullPointerException
at com.intuit.karate.StepDefs.method(StepDefs.java:364)
at ✽.When method PUT(.feature:209)
If I revert back to 0.6.2 it works again!
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
0.7.0 upgrade - nullPointerException when performing request ...
The following scenario passes on 0.6.2 but fails on 0.7.0 Scenario: Basic Auth Credentials must be supplied for POST Given path '/apath' And ......
Read more >Why am I getting NullPointerException after second rest call ...
I am using Basic Auth. Might it be that after first call I shouldn't send my user credentials at all or is it...
Read more >Producer Failed to Send Data and Threw ... - 华为云
An MRS cluster has ZooKeeper and Kafka installed.When the Producer client sends data to Kafka, it fails and throws "NullPointerException".
Read more >Receive Error 500: java.lang.NullPointerException when ... - IBM
NullPointerException A parameter was invalid or missing, the server could not connect to the target deployment server, or an internal server ...
Read more >RHSA-2022:5498 - Security Advisory - Red Hat Customer Portal
BZ - 2031154 - After upgrading to Satellite 6.10, Repository sync randomly fails if a ReservedResource exists in core_taskreservedresource table ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@YOU54F no we can keep this open until the 0.7.1 release. thanks !
this is a bug in Apache ! https://issues.apache.org/jira/browse/HTTPCLIENT-1888
fixed in dev.
for those who need a workaround but don’t want to use
karate-jersey
this is a possible workaround in thepom.xml
.