Skip to content

nil pointer dereference on fly secrets set #4190

@abs3ntdev

Description

@abs3ntdev

Please only report specific issues with flyctl behavior. Anything like a support request for your application should go to https://community.fly.io. More people watch that space and can help you faster!

Describe the bug
Trying to run fly secrets set TRADE_VERSION="v0.3.268" results in a nil pointer dereference

  • Arch Linux
  • flyctl v2025.1.24-master.1737740723 linux/amd64 Commit: ea8f86b6082503bc175f3021559e19a737d5897b-dirty BuildDate: 2025-01-24T17:45:23Z BranchName: master

** Paste your fly.toml

app = "oku-stack"
primary_region = "ord"

kill_signal = "SIGTERM"
kill_timeout = 15

[build]
Dockerfile = 'Dockerfile'

[deploy]
  strategy = "bluegreen"

[http_service]
internal_port = 3838
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 3
[http_service.concurrency]
type = "requests"
soft_limit = 1000
hard_limit = 2000

[[http_service.checks]]
  grace_period = "5s"
  interval = "15s"
  method = "GET"
  timeout = "3s"
  path = "/"


[[metrics]]
  port = 2019
  path = '/metrics'

[[vm]]
#  size = "shared-cpu-1x"
 # cpu_kind = "performance"
  cpus = 1
  memory = "1gb"
  processes = ["app"]

** Command output: **

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x64da5656536b]

goroutine 1 [running]:
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).setMachineReleaseData(0xc000b38600, 0x0)
        github.com/superfly/flyctl/internal/command/deploy/machines_launchinput.go:197 +0x26b
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).launchInputForRestart(0xc000b38600?, 0xc00053e8c0)
        github.com/superfly/flyctl/internal/command/deploy/machines_launchinput.go:17 +0x65
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).restartMachinesApp.func1({0x64da578c7f58, 0xc000ebd680}, 0x0?)
        github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:226 +0x3b
github.com/samber/lo.Map[...]({0xc000302500?, 0x7, 0x64da566b694e}, 0xc000b9f2b8?)
        github.com/samber/lo@v1.47.0/slice.go:30 +0x6f
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).restartMachinesApp(0xc000b38600, {0x64da578ad3e8, 0xc001015530})
        github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:225 +0x117
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).DeployMachinesApp(0xc000b38600, {0x64da578ad3e8, 0xc000bc1410})
        github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:85 +0x46b
github.com/superfly/flyctl/internal/command/secrets.DeploySecrets({0x64da578ad3e8, 0xc0005b5980}, 0xc0004be3f8, 0x0, 0x0)
        github.com/superfly/flyctl/internal/command/secrets/secrets.go:98 +0x2d5
github.com/superfly/flyctl/internal/command/secrets.SetSecretsAndDeploy({0x64da578ad3e8, 0xc0005b5980}, 0xc0004be3f8, 0xc000a08b70, 0x0, 0x0)
        github.com/superfly/flyctl/internal/command/secrets/set.go:75 +0xb4
github.com/superfly/flyctl/internal/command/secrets.runSet({0x64da578ad3e8, 0xc0005b5980})
        github.com/superfly/flyctl/internal/command/secrets/set.go:66 +0x445
github.com/superfly/flyctl/internal/command/secrets.newSet.New.newRunE.func2(0xc00087a608, {0xc000160cd0?, 0x4?, 0x64da56666501?})
        github.com/superfly/flyctl/internal/command/command.go:140 +0x1dc
github.com/spf13/cobra.(*Command).execute(0xc00087a608, {0xc000160ca0, 0x1, 0x1})
        github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc000265808)
        github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
        github.com/spf13/cobra@v1.8.1/command.go:1050
github.com/superfly/flyctl/internal/cli.Run({0x64da578ad570?, 0xc00075fa00?}, 0xc000b1c000, {0xc000050110, 0x3, 0x3})
        github.com/superfly/flyctl/internal/cli/cli.go:94 +0x690
main.run()
        github.com/superfly/flyctl/main.go:47 +0x165
main.main()
        github.com/superfly/flyctl/main.go:26 +0x18

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions