Skip to content

WireMock Setting 'SaveMappingToFile' raising cast object to type error #30

@jmontalto01

Description

@jmontalto01

Describe the bug
I am using wiremock docker compose example with ProxyAndRecordSettings (command "--ProxyURL" ) and setting "--SaveMappingToFile", "true". It raises the following error when browsing to http://localhost:9091/__admin/mappings

{"Status":"Unable to cast object of type 'WireMock.ResponseProviders.DynamicResponseProvider' to type 'WireMock.ResponseBuilders.Response'."}

Expected behavior:
Load mapping files

Test to reproduce
Docker Compose file:

version: "3.8"

services:
wiremock:
image: sheyenrath/wiremock.net
ports:

  • "9091:80"
    volumes:
  • ./wiremock/mappings:/app/__admin/mappings
    command: ["dotnet", "wiremock-net.dll", "--Urls", "http://*:80", "--ReadStaticMappings", "true", "--AllowPartialMapping", "true", "--WireMockLogger", "WireMockConsoleLogger", "--ProxyURL", "https://api.hub24.com.au/epi/epiportfolio.asmx", "--SaveMapping", "true", "--SaveMappingToFile", "true"]

Other related info
I have raised the same issue to WireMock.Net for reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions