Using proxy_proto breaks dashboard and flyctl

Whenever I try and use the proxy_proto handler Fly totally breaks.

Trying to click on the app in the dashboard gives a “An unknown error occured.”
Screenshot.2110_05-19-2022.chrome

Visiting the app’s dashboard page directly gives a http 500 error:
Screenshot.2111_05-19-2022.chrome

Using flyctl gives the following error on any command:

# fly ssh console
Error get app: An unknown error occured.

It seems like the app still runs. The only thing that fixes it is removing proxy_proto from the fly.toml and redeploying with flyctl deploy.

My fly.toml config file:

app = "proxy"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  image = "itzg/bungeecord:latest"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[mounts]
  destination = "/config"
  source = "config"

[[services]]
  http_checks = []
  internal_port = 25577
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

  [[services.ports]]
    handler = ["proxy_proto"]
    port = 25565

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

[[services]]
 internal_port = 25576
 processes = ["app"]
 protocol = "tcp"

 [[services.ports]]
   port = 25576

Thanks.

Hey! The issue here is that handler should be handlers. We should definitely make this clearer.

Thanks, that fixed it. Minor oversight on my part.
I ran fly config validate and figured it would be fine since it said ✓ Configuration is valid.
An invalid config probably shouldn’t take down the whole app’s dashboard though.