https://www.wiremock.io logo
Join Slack
Powered by
# help
  • s

    surya megham

    09/10/2025, 12:22 PM
    Hello i have trouble in "absent" field. to check if
    exist
    field inside the
    auth
    object but when i pass the below pattern in mapping then it should point to different file but it is not doing - for both true and false it is going to same file, that is because it always maps to the same mapping irrespective i give
    true
    or
    false
    im using gradel deps --> implementation "com.github.tomakehurstwiremock jre8 standalone2.35.1
    Copy code
    "bodyPatterns": [
      {
        "matchesJsonPath": {
          "expression": "$.auth.exist",
            "absent": "false"
        }
      }
    ]
    t
    • 2
    • 3
  • m

    Mina Medic

    09/12/2025, 8:17 AM
    Hi! Is there a way in WireMock to record only the last request/response for the same method and URL - so each new matching request overwrites the previous recording? Right now I either get all duplicates or only the first one; I’d like the opposite: keep only the latest. Many thanks!
    t
    • 2
    • 2
  • a

    Alona Sapiro Haitovich

    09/16/2025, 7:00 AM
    Hi team, there is vulnerability CVE-2018-9116 detected in the mavenorg.wiremockwiremock-standalone:3.13.1. Could you please provide details on a fix or recommended workaround? Thanks!
    l
    • 2
    • 6
  • d

    Dhruvraj Mishra

    09/25/2025, 4:30 PM
    Hello there, getting below error whiling invoking wiremock endpoint(JSON stub deployed on different service) from a spring framework service A- `springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: "h1Bad Message 400/h1prereason: Bad Request/pre".
    Copy code
    Service A utilises  org.springframework.http to call APIs.
    
    It is failing at the line of toEntity()-
    .retrieve()`
    .toEntity(String.class);
    Other services like B uses apache camel(routes), from there when it is invoked it is working. Just wanted to understand is this any mock related issue or it do not support http of spring.
    l
    • 2
    • 2
  • o

    Oumaima

    09/26/2025, 10:18 AM
    Hello everyone! I am very new to WireMock and I have an issue when hitting the endpoint /_admin/requests/reset, a GET returns 400 which makes sense , but a POST returns 404 error. The request journal is enabled and i get a correct response when running GET to /__admin/requests, what am I missing here? Is the endpoint unavailable? Because I've seen that it's deprecated_
    l
    • 2
    • 1
  • т

    Тимур Вольных

    09/30/2025, 3:50 PM
    Hello everybody! That's the question. We use Wiremock JSON to mock in vendor responses in our tests. Often, suppliers may send different responses to the same request. To do this, we use scenarios to get the right response at the right time. Previously, we implemented it in such a way that wiremock was raised for each test. Consequently, the scenarios were not interrupted in any way. Now we plan to raise 1 wiremock for multithreaded tests (20+ units). What will happen to the scenarios? Will they be able to run parallel to each other?
    t
    • 2
    • 2
  • m

    Matt Pascual

    10/03/2025, 10:11 PM
    Hi team! I am working on setting up a wiremock proxy service that my team can use to mock responses from external apis. I am hitting an issue where a proxied response that is being forwarded to the actual service is returning a 403 error. When hitting the external api directly I can connect. Is there something specific I need to do in the proxy mapping to have the authorization headers from the original request forwarded through to the real service? Currently I just have the proxy mapping for any request that hits a specific urlPath.
    t
    • 2
    • 11
  • u

    Ugo El Koubi

    10/07/2025, 9:04 PM
    Hello ! there is vulnerability CVE-2018-9116 detected by sonatype nexus iq Version is 4.0.0-beta.15 could you please help ? thanks
    l
    • 2
    • 1
  • m

    Marcel Scheck

    10/08/2025, 6:54 AM
    Hi everyone, I’m working on a WireMock Mapping and would be super grateful for some help. The WireMock receives a Request with a JWT as query parameter
    code
    . I use
    serveEventListeners
    to trigger a call. This call needs to extract the
    sub
    claim from the JWT and include it as
    user_id
    to body. I tried it with the jwt plugin like this
    {{jwt path='sub' token=originalRequest.query.code}}
    but it generated a new jwt, what is not really what I need. Is there any way to only extract that claim from the token?
    t
    • 2
    • 3
  • r

    Rajesh Singh

    10/22/2025, 9:51 PM
    Hi everyone, I am running wiremock in playback mode where I use the data ( mappings and __files ) which I recorded by running wiremock in recording mode. When my wiremock instance is running in playback mode with recorded data I am noticing that after sometime my wiremock instance ( pod ) throws Java OOM exception. I tried increasing the memory but it only delays the outcome but doesn't stop it. Here are some settings ( image: wiremock/wiremock:3.3.1, JAVA_TOOL_OPTIONS: "-XX:+UseContainerSupport -Xms1g -Xmx8g", WIREMOCK_DISABLE_REQUEST_JOURNAL: "true" etc etc. ). Any idea what I may be missing or how to fix this issue of Java OOM?
    l
    • 2
    • 7
  • d

    David Micheau

    11/10/2025, 10:20 AM
    Hello everyone, I'm posting a request with header
    Content-Type: multipart/form-data
    to wiremock, as it's the only accepted content-type accepted by my real third-party. Using only basic JSON stub, is it possible to extract the body from the request and pass it to a webhook body ? When I post my request with content-type
    application/json
    , the following stub works very well and I receive the transcript_id from the original request. But as soon as I send the original request with
    multipart/form-data
    , it doesn't work anymore :
    Copy code
    {
      "request": ...,
      "response": ...,
      "serveEventListeners": [
        {
          "name": "webhook",
          "parameters": {
            ...
            "body": "{\"transcript_id\":\"{{jsonPath originalRequest.body '$.transcript_id'}}\"}"
          }
        }
      ]
    }
    t
    • 2
    • 1
  • g

    Gary Gregory

    11/13/2025, 11:35 AM
    Is there a way to get WM to work with Jetty 12.1 and EE11? java.lang.NoSuchMethodError: 'org.eclipse.jetty.util.component.Environment org.eclipse.jetty.util.component.Environment.ensure(java.lang.String)' at org.eclipse.jetty.ee10.servlet.ServletContextHandler.clinit(ServletContextHandler.java:135) at com.github.tomakehurst.wiremock.jetty12.Jetty12HttpServer.addAdminContext(Jetty12HttpServer.java:256) at com.github.tomakehurst.wiremock.jetty12.Jetty12HttpServer.createHandler(Jetty12HttpServer.java:195) at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.init(JettyHttpServer.java:101) at com.github.tomakehurst.wiremock.jetty12.Jetty12HttpServer.init(Jetty12HttpServer.java:74) at com.github.tomakehurst.wiremock.jetty12.Jetty12HttpServerFactory.buildHttpServer(Jetty12HttpServerFactory.java:33) at com.github.tomakehurst.wiremock.WireMockServer.init(WireMockServer.java:75) at com.github.tomakehurst.wiremock.junit.WireMockRule.init(WireMockRule.java:36) Jetty doesn't keep binary compatibility from 12 to 12.1 😞
    t
    • 2
    • 8
  • v

    Vlad M

    11/16/2025, 10:38 AM
    Hi Everyone, is there a dedicated channel for the Graphql extension ? I'm working on an app with fairly complex queries and for the life of me I can't get it to match anything.
    l
    • 2
    • 7
  • v

    Vikram Harindran

    12/02/2025, 4:41 PM
    I am getting this error while running wiremock login
  • v

    Vikram Harindran

    12/02/2025, 4:41 PM
    There was an error initiating login: initiating login: The server at login.wiremock.cloud is presenting an untrusted TLS certificate. This may be because it is self-signed, or signed by a root certificate which is not trusted.
    t
    • 2
    • 1
  • v

    Vikram Harindran

    12/02/2025, 4:42 PM
    how to fix this
  • d

    Damien

    12/10/2025, 8:33 PM
    Hello, I am looking for some help getting upgraded to 3.13.2, specifically my transformers (when I get it to actually use them) cause wiremock to crash. The only thing in the logs is below. How can I contact someone to provide more details as to what I am doing (wrong). Thanks!
    Copy code
    Exception in thread "main"
    Exception: java.util.MissingResourceException thrown from the UncaughtExceptionHandler in thread "main"
    l
    • 2
    • 1
  • b

    Benoit LEFEVRE -CAMPUS-

    12/26/2025, 2:15 PM
    Hello 👋 Just wondering if there is a way to go back to light mode on the Admin API Reference page of the documentation ? :
    l
    • 2
    • 3
  • l

    Louis Sayer

    01/14/2026, 5:15 PM
    Hello, is there a way to configure WireMock in Spring so I can use it as a Spring Bean? Currently our tests extend from a MainContext class which uses @EnableWireMock and @InjectWireMock to inject a WireMock Server. However for files which do not extend from this (e.g a Mock file) there is not an easy way to pass the WireMock Server as it is not a Spring Bean. We have to set the server from another test file. Which is awkward. I know we can do it manually with a ContextInitialiser or with WireMockConfiguration but we were trying to move away with this with the @InjectWireMock. Any help appreciated!
    b
    • 2
    • 2
  • b

    basuradeluis basuradeluis

    01/14/2026, 7:28 PM
    Hello. I've got a wiremock server runing via java spring aplication in intellij. With some Transformers, and many (dozens) stubmappings in src/files/stub as .json files. Everything runs ok, but I would like, if posible, the log of runing wiremock returns some info about the file that originated the response to each request. Using a class that extends ResponseDefinitionTransformerV2 I am able to log the request, response, and even the uuid of the stub; but I would like to log the file.json that contains that stubmapping. I saw that JsonFileMappingsSource in loadMappingsInto method it loads all json files, asign each stubmap an uuid , and even store the file and uuid of the stub in a "StubMappingFileMetadata" I would like to access that StubMappingFileMetadata in a Transformer (or something like that, or in a EventListener). Or access the JsonFileMappingsSource in Transformer, via autowired maybe. Any idea would be apreciated. Sorry if question is silly or confusing. Thanks in advance
    t
    • 2
    • 2
  • s

    Sandeep

    01/22/2026, 1:14 PM
    Hello, I have a question, can we create hmac 256 algorithm signature in wiremock? without using java! The creation should be using an id (which is created randomly), timestamp (always current time) and webhook secret Thank you
    l
    • 2
    • 11
  • c

    Cezar B

    02/02/2026, 3:31 PM
    👋 Hello, team! nvm, I eventually found what i was looking for.
    🙌 1
  • b

    Bryan

    02/05/2026, 8:39 PM
    Hello all, I'm trying to get WireMock for .NET Standalone working within docker. Is this possible? I'm following the example from Option 3 here: https://wiremock.org/dotnet/wiremock-as-a-standalone-process/#option-3--coding-yourself If I use that example as written, then it gets stuck in a crash loop due to Console.ReadKey(). If I remove Console.ReadKey() or replace with Console.Read() then the program just runs once, then restarts, never being reachable. If I try adding in the following:
    Copy code
    var builder = WebApplication.CreateBuilder(args);
    var app = builder.Build();
    await app.RunAsync();
    Then it does stay up, but Wiremock isn't reachable. If I try hitting it, it just returns a 404. Any advice would be appreciated.
    m
    • 2
    • 9
  • z

    Zach

    02/06/2026, 4:06 PM
    Hi all, We are trying to setup a Wiremock server for testing against a gRPC service. While trying to set up the stubs for requests, we’re having issues trying to use body matching because the protobuf request body isn’t being decoded correctly. It always comes back as
    "body":{"/n"}
    Is there support for protobuf->json decoded for pattern matching gRPC requests? I noticed it is marked as “TODO” here: https://wiremock.org/dotnet/request-matching-protobuf/#multiple-proto-definition-files
  • w

    Wayne Liang

    02/08/2026, 11:01 PM
    Hi everyone 👋 I'm making use of the containerised version of Wiremock (version 3.13.1) running on GCP cloudrun, with a bucket mounted as a volume to store the Wiremock stub mapping files. My workflow involves making use of the admin API to create new stub mappings (POST
    /__admin/mappings
    ) with the
    persistent
    flag set to true. I've read from the Wiremock documentation that when there are "overlapping" stubs, Wiremock will default to using the most recently added matching stub. One thing I've noticed however is that that only seems to hold true until the next time Wiremock is restarted (or the stubs are reloaded). Just to get a better understanding of the underlying behaviour, I had a look at the relevant classes I could find (
    JsonFileMappingsSource
    ,
    AbstractStubMappings
    ,
    InMemoryMappingStore
    , and
    SortedConcurrentPrioritisableSet
    ) and it appears that although the
    insertionIndex
    is persisted in the stub mapping JSON file. it effectively gets overwritten during the stub loading process. I couldn't seem to find much about this specific situation in the documentation or other discussion forum, so I wanted to ask: is this intended behaviour? I am a beginner when it comes to looking at Wiremocks codebase, however I'm absolutely happy to share/discuss what I've found/observed if it's any help at all. Thank you!
  • t

    Tanja Maier

    02/16/2026, 9:03 AM
    Hi all, I'm using wiremock only as standalone service via docker. Can I find somewhere docker images for the latest
    4.0.0-beta
    versions? I really want to try out the new websocket support. Thanks
    t
    • 2
    • 2
  • c

    Cristian Toma

    04/02/2026, 2:31 PM
    Hi everyone, Is a new version of wiremock-spring-boot planned for spring-boot-4 and for the new WireMock 4 release? Because of the Jetty 12.1 breaking changes, I’m using WireMock 3.13.2 (via wiremock-spring-boot 4.2.1*)*, but without setting the root directory for
    __files
    . Thanks.
  • a

    Ana T.

    04/14/2026, 5:30 PM
    👋 Hello, team!
    👋 1
    l
    • 2
    • 1
  • k

    Krzysztof

    04/23/2026, 12:08 PM
    Hi all, this was supposed to be simple but it is not I'm using the
    wiremock/wiremock:3.13.2
    docker image with the
    wiremock-state-extension:0.10.1
    . I'm getting an
    Unrecognized field
    error for
    serveEventListeners
    Is 0.10.1 extension fully compatible with the WireMock 3.x core, or do I need a specific startup flag to allow legacy field mapping? In case, content of extensions dir as follows
    Copy code
    [       4096]  ./extensions/
    ├── [      30245]  accessors-smart-2.6.0.jar
    ├── [    1020615]  caffeine-3.2.3.jar
    ├── [    3046899]  datafaker-2.5.4.jar
    ├── [     287913]  json-path-3.0.0.jar
    ├── [     340068]  snakeyaml-2.6.jar
    ├── [       1982]  wiremock-faker-extension-0.2.0.jar
    └── [      60089]  wiremock-state-extension-0.10.1.jar
    docker run command
    Copy code
    docker run -it --rm \
      -p 8443:8443 \
      -v $(pwd)/mappings:/home/wiremock/mappings \
      -v $(pwd)/extensions:/var/wiremock/extensions \
      wiremock/wiremock:latest \
      --https-port 8443 \
      --verbose \
      --global-response-templating
    mapping file loading which fails
    Copy code
    {
      "request": {
        "method": "POST",
        "url": "/state/enable"
      },
      "response": {
        "body": "User logged in",
        "serveEventListeners": [
          {
            "name": "state",
            "parameters": {
              "context": "auth",
              "state": {
                "loggedIn": "true"
              }
            }
          }
        ],
        "status": 200
      }
    }
    Error log
    Copy code
    2026-04-23 12:04:09.816 Verbose logging enabled
    Exception in thread "main" com.github.tomakehurst.wiremock.standalone.MappingFileException: Error loading file /home/wiremock/./mappings/state-set.json:
    Unrecognized field "serveEventListeners" (class com.github.tomakehurst.wiremock.http.ResponseDefinition), not marked as ignorable
    	at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:126)
    	at com.github.tomakehurst.wiremock.core.WireMockApp.loadMappingsUsing(WireMockApp.java:288)
    	at com.github.tomakehurst.wiremock.core.WireMockApp.loadDefaultMappings(WireMockApp.java:282)
    	at com.github.tomakehurst.wiremock.core.WireMockApp.<init>(WireMockApp.java:143)
    	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:68)
    	at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:71)
    	at wiremock.Run.main(Run.java:23)
    r
    • 2
    • 1
  • r

    renatas

    07/10/2026, 1:37 AM
    Question: Can WireMock select different mTLS client certificates per proxy stub? Hi everyone, I'm working on a shared WireMock setup running on OpenShift, and I have a question about proxy + mTLS. We're trying to build a shared WireMock platform shared by multiple projects. To avoid collisions, each project uses its own URL prefix, like: /project-a/... /project-b/... Each project also has its own proxy mapping, something like: { "request": { "method": "ANY", "urlPathPattern": "/project-a/service/.*" }, "response": { "proxyBaseUrl": "backend-a.example.com", "proxyUrlPrefixToRemove": "/project-a" } } This part works well. The challenge is that some backend APIs require different mTLS client certificates, and each project has its own certificate. Since WireMock already knows which proxy stub matched before it sends the proxied request, I was wondering if there's any way to choose a different client certificate (or keystore alias/SSLContext) based on that matched stub. I couldn't find anything in the documentation about this. Is this supported somehow? If not, is there an extension point for customizing the HTTP client used by the proxy, or is the recommended approach to run one WireMock instance per client certificate? Has anyone dealt with a similar setup? Thanks!
    l
    • 2
    • 1