cannot unmarshal string into Go struct field HTTPService.http_service.auto_stop_machines of type bool

What does this error from flyctl status mean?

WARN WARNING the config file at ‘D:\personal\tnext\fly.toml’ is not valid: json: cannot unmarshal string into Go struct field HTTPService.http_service.auto_stop_machines of type bool

fly.toml:

app = 'trilium-rmi9xw'
primary_region = 'sea'

[build]
  dockerfile = 'Dockerfile.alpine'

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1

Hi… It looks like you might be running an old version of flyctl.

(Perhaps installed via one of the optional Windows package managers, :thought_balloon:.)

That field was changed from bool (which it’s asking for) to string (which you have) some time ago, in order to accomodate the new suspend feature.

It would be best to upgrade at this point—but if that’s not actually feasible then you could try changing 'stop' to true.

Hope this helps!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.