Machines destroyed by flyd immediately on `fly deploy`

I’m having trouble with a new app I’m working on. I wrote a fly.toml locally, fly launch --no-deploy then fly deploy --ha=false. The last command builds the Docker image successfully with the output ending with the following:

--> Building image done
image: registry.fly.io/gev:deployment-01K0FG7PF703DZ8FMGRTSXFF08
image size: 208 MB

Watch your deployment at https://fly.io/apps/gev/monitoring

This deployment will:
 * create 1 "app" machine

No machines in group app, launching a new machine
Finished launching new machines
-------
 ⠏ Machine 9185994ec20318 [app] was created
-------
Checking DNS configuration for gev.fly.dev

Visit your newly deployed app at https://gev.fly.dev/

However the events for the machine show it is destroyed as soon as it is created by flyd.

Why? What can I do about it?

I found a similar topic Machines are being destroyed by flyd immediately after being created but I’m not doing anything special about cross-app images or other things mentioned in that thread.

here is the internal error from flyd: could not decode secret contents, /tmp/ca.crt: illegal base64 data at input byte 1

it looks like you have a file secret configured. I’m not able to see the value of the secret, but you’ll need to base64-encode the file before setting it as a secret for this to work.

we need to expose this error better, sorry for the trouble

That’s fixed the issue, thank you for looking into this so quickly!