Repository navigation
Running dev proxy in docker - "An error occurred in a plugin" #1401
Description
Activity
Hey! Thanks for reaching out and sorry to hear you're running into a trouble. Could you please share with us your config file and tell us which version of Dev Proxy you're using so that we can see if we can reproduce it? Alternatively, you could also try to change the log level to
traceto see if you can get more information about what might be wrong.Hi !
In the command I run, it's "ghcr.io/dotnet/dev-proxy:latest" so i'm assume that's lastest available?docker run command i'm using:
docker run --rm -it ` >> -p 8000:8000 -p 8897:8897 ` >> -v "${PWD}\config:/config" ` >> -v "${PWD}\cert:/home/devproxy/.config/dev-proxy/rootCert" ` >> ghcr.io/dotnet/dev-proxy:latest --config-file /config/devproxyrc.jsonattaching "devproxyrc.json" and "mocks.json"
with logging level set to 'trace', the following is captured:
req ╭ GET https://graph.microsoft.com/v1.0/me
time │ 10/01/2025 21:56:16 +00:00
trce │ MockResponsePlugin: BeforeRequestAsync called
trce │ MockResponsePlugin: ReplacePlaceholders called
fail │ An error occurred in a plugin
pass ╰ Passed throughreq ╭ GET https://graph.microsoft.com/v1.0/me
time │ 10/01/2025 22:01:59 +00:00
trce │ MockResponsePlugin: BeforeRequestAsync called
skip │ MockResponsePlugin: No matching mock response found
trce │ MockResponsePlugin: Left BeforeRequestAsync
pass ╰ Passed throughOK, so in your mocks you have
https://graph.microsoft.com/v1.0/me?*(notice the trailing?just before the wildcard). When sending a request tohttps://graph.microsoft.com/v1.0/mewithout the question mark, it won't match your mock and should pass through, just as you're seeing. However, that doesn't explain the error. Let us investigate what's going on. Thanks again for letting us know.Unfortunately, I can't reproduce your issue. After starting the Dev Proxy container using the exact command you shared, and then calling Graph using
curl -ikx http://127.0.0.1:8000 https://graph.microsoft.com/v1.0/meI'm seeing:req ╭ GET https://graph.microsoft.com/v1.0/me time │ 10/02/2025 06:03:12 +00:00 skip │ MockResponsePlugin: No matching mock response found pass ╰ Passed throughCan you try to run
/app/devproxy/devproxy --versionin your container to confirm which version you're running?- locked and limited conversation to collaborators
on Oct 2, 2025
Help please! I followed the steps described here to run dev proxy from docker container - https://learn.microsoft.com/en-us/microsoft-cloud/dev/dev-proxy/how-to/use-dev-proxy-in-docker-container
I wish to use the mocks response feature.
I have a mocks.json and devproxyyrc.json files configured. The mocks.json is a very simple example to start with like this one - https://learn.microsoft.com/en-us/microsoft-cloud/dev/dev-proxy/technical-reference/mockresponseplugin#mocks-file-examples
Attempting to use postman (GET https://graph.microsoft.com/v1.0/me) and have configured postman to use a custom proxy pointing to 127.0.0.1:8000
The request hits the proxy but returns:
req ╭ GET https://graph.microsoft.com/v1.0/me
time │ 09/30/2025 13:47:03 +00:00
fail │ An error occurred in a plugin
pass ╰ Passed through
It may well be a mistake on my part, but any pointers you can help would be great 🙏