DevFlow - James Montemagno https://montemagno.com/tag/devflow/ https://montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png DevFlow - James Montemagno https://montemagno.com/tag/devflow/ Hugo -- gohugo.io Tue, 24 Nov 2026 18:25:00 GMT 60 Fixing “No agents connected” in the .NET MAUI DevFlow Inspector https://montemagno.com/troubleshooting-dotnet-maui-devflow-no-agents-connected/ https://montemagno.com/troubleshooting-dotnet-maui-devflow-no-agents-connected/ Tue, 24 Nov 2026 17:13:34 GMT

DevFlow is a set of developer tools for connecting to and inspecting a running .NET MAUI app through the CLI and browser-based Inspector. I love it because it gives agents a way to run, navigate, interact with, and validate the app while it is running, making it much easier to debug and understand what is happening on an emulator or device.

I hit a really confusing one with the .NET MAUI DevFlow Inspector: the page says No agents connected, but maui devflow agent status happily talks to my app. Both can't be true, right? Turns out they can, because they are two different connections. Here is the quick fix, then why it works.

On my Mac (zsh, Android emulator, .NET 10 MAUI app), restarting the broker with IPv6 disabled brought everything back:

maui devflow broker stop
DOTNET_SYSTEM_NET_DISABLEIPV6=1 maui devflow broker start --foreground

Leave that terminal open, and in another one run:

maui devflow wait --timeout 30
maui devflow list

The app showed up right away, and I didn't even have to restart it. Keep in mind this is a workaround that worked for me, not an official fix. I filed it as dotnet/maui-labs#851, and I haven't confirmed that every Mac hits it.

The agent is fine, the broker never heard about it

DevFlow has two pieces that are easy to blur together:

  • The agent lives inside your app and runs its own HTTP server.
  • The broker is a small background daemon that keeps a registry of running agents so the CLI and Inspector can find them.

The DevFlow docs and broker docs cover the architecture. The part that matters here is that the CLI can talk to an agent directly, without the broker, if you tell it where to look:

maui devflow agent status --agent-host localhost --agent-port 9223

That worked for me, but it only proves the CLI can reach the agent. It says nothing about whether the app registered with the broker. Meanwhile maui devflow list returned [], which means the registry was empty.

One note on ports: 9223 was my agent's port (it comes from the .mauidevflow file in my project). The broker normally hands out ports from a pool, so yours can be different. Use the port your agent is actually on.

Check your Android tunnels, but don't stop there

An Android emulator lives on its own network, so two tunnels are involved, and they go in opposite directions:

adb -s emulator-5554 reverse tcp:19223 tcp:19223   # app -> broker on your Mac
adb -s emulator-5554 forward tcp:9223 tcp:9223     # CLI on your Mac -> agent in the app

The Android setup page shows adb reverse for both ports. forward for the agent is what worked for me. The one mistake to avoid is mapping the broker port the wrong way, because that can block the broker from starting.

I set both tunnels up, restarted the app, and recreated the tunnels. Still []. ADB wasn't the problem, so it was time to poke at the broker itself.

The curl trick

The broker listens on port 19223. I asked it for its agent list three different ways:

curl -4 -H 'Host: localhost:19223' http://127.0.0.1:19223/api/agents
curl -6 -H 'Host: localhost:19223' 'http://[::1]:19223/api/agents'
curl -4 http://127.0.0.1:19223/api/agents
Connection Host header Result
IPv4 localhost:19223 404
IPv6 localhost:19223 200
IPv4 127.0.0.1:19223 200

Same broker, same request, different answer depending on the address family and the Host header. My read (and it is only a read, I haven't pinned down the root cause) is that the agent registers through localhost:19223, so a broker that answers that with a 404 never learns the app exists.

Starting the broker with the official .NET DOTNET_SYSTEM_NET_DISABLEIPV6 switch made the IPv4 localhost request work, and the app registered on its own.

Make it stick

Typing the variable every time gets old fast. Instead of turning IPv6 off for every .NET app, I scope it to the maui command.

zsh

Add this to ~/.zshrc:

maui() {
    DOTNET_SYSTEM_NET_DISABLEIPV6=1 command maui "$@"
}

Run source ~/.zshrc or open a new terminal, then run maui devflow broker stop once. The next broker that maui starts should pick up the variable. This does not start the broker, emulator, or app for you.

PowerShell

Same idea in a PowerShell profile (New-Item -ItemType File -Force -Path $PROFILE then code $PROFILE):

function maui {
    $env:DOTNET_SYSTEM_NET_DISABLEIPV6 = "1"
    try { & (Get-Command maui -CommandType Application).Source @args }
    finally { Remove-Item Env:DOTNET_SYSTEM_NET_DISABLEIPV6 -ErrorAction SilentlyContinue }
}

Reload with . $PROFILE. I only tried this in PowerShell 7 on my Mac, and I haven't seen this problem on Windows, so don't assume you need it there.

Startup checklist

  1. The app calls AddMauiDevFlowAgent() in a Debug build.
  2. The emulator is running (adb devices shows it, for example emulator-5554).
  3. adb reverse tcp:19223 tcp:19223 is set for the broker.
  4. adb forward tcp:<your agent port> tcp:<your agent port> is set (mine was 9223).
  5. The broker is running, with IPv6 disabled if you are hitting this.
  6. Run maui devflow wait --timeout 30, then maui devflow list.
  7. Still stuck? Try maui devflow diagnose --device emulator-5554.

There you go! If you are seeing the same thing, add your details to dotnet/maui-labs#851. The more repros the better.

]]>