question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wiremock.client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500

See original GitHub issue

Issue guidelines

My espresso tests are all failing with the above, after introducing coreLibraryDesugaringEnabled true (Java 8 API support on lower Android API levels) that comes with the Android Google Plugin 4.0

Bug reports

  • Which version of WireMock you’re using - androidTestImplementation "com.github.tomakehurst:wiremock-standalone:2.26.3"
  • How you’re starting and configuring WireMock, including configuration or CLI the command line
    @Rule
    @JvmField
    val wireMockRule = WireMockRule(wireMockConfig().port(6789), false)
wireMockRule.start()
        WireMock.stubFor(WireMock.any(WireMock.urlMatching("/$endPoint"))
                .willReturn(responseManager.getResponse(mockResponseKey)))
  • Stacktrace
com.github.tomakehurst.wiremock.client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500
at com.github.tomakehurst.wiremock.client.HttpAdminClient.safelyExecuteRequest(HttpAdminClient.java:476)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.executeRequest(HttpAdminClient.java:454)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.addStubMapping(HttpAdminClient.java:131)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:298)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:293)
at com.github.tomakehurst.wiremock.client.WireMock.givenThat(WireMock.java:104)
at com.github.tomakehurst.wiremock.client.WireMock.stubFor(WireMock.java:108)
  • A failing test case that demonstrates the problem
  • Profiler data if the issue is performance related

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
tomakehurstcommented, Jun 3, 2020

OK, thanks for letting me know. I’m not an Android dev, so this is useful knowledge.

I’ll keep this issue open for the time being, but I’m going to wait and see what the Jackson folks say about the issue you’ve opened with them.

0reactions
tomakehurstcommented, Apr 29, 2021

Closing, as I don’t think there’s anything more we can do here until the desugaring issue is resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wiremock.client.VerificationException: Expected status 2xx for ...
client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500 #1323.
Read more >
com.github.tomakehurst.wiremock.client.VerificationException
For this example, I suppose the wiremock was started externally,right? So you should add the configure for with the host and the port:...
Read more >
WireMock stub creation fails: expects 201 but gets 200
VerificationException : Expected status 201 for http://localhost:9089/__admin/mappings/new but was 200 at com.github.tomakehurst.wiremock.client.
Read more >
Verifying whether specific HTTP requests were made | WireMock
Verifying and querying requests relies on the request journal, which is an in-memory log of received requests. This can be disabled for load...
Read more >
WireMock Tutorial: Introduction to Stubbing - Petri Kainulainen
import static com.github.tomakehurst.wiremock.client. ... to ensure that our WireMock server returns the HTTP status code 500 and the status ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found