superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.44k stars 243 forks source link

fly deploy - Error: stat .: no such file or directory #4097

Open mattpatterson94 opened 2 days ago

mattpatterson94 commented 2 days ago

Describe the bug

While running fly deploy the image builds correctly and I get Watch your deployment at https://fly.io/apps/oppyfinder/monitoring but straight after I get

Error: stat .: no such file or directory

I get no logs other than that, even when I set --debug. The releases never seem to finish too. I have a release going for 11 hours now and it still hasn't finished.

** Paste your fly.toml

app = 'oppyfinder'
primary_region = 'syd'
console_command = 'console'

[build]

[deploy]
  release_command = 'migrate_db'

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app', 'cron']

[checks]
  [checks.status]
    port = 3000
    type = 'http'
    interval = '10s'
    timeout = '2s'
    grace_period = '5s'
    method = 'GET'
    path = '/up'
    protocol = 'http'
    tls_skip_verify = false

    [checks.status.headers]
      X-Forwarded-Proto = 'https'

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

[[statics]]
  guest_path = '$APP_HOME/public'
  url_prefix = '/'

[processes]
  cron = "cron"
  app = "web"

Command output:

--> Build Summary:
--> Building image done
image: registry.fly.io/oppyfinder:deployment-01JE2E2E8RVCXQ7DCPBDR11F49
image size: 997 MB

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

Error: stat .: no such file or directory
Stacktrace:
goroutine 1 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:26 +0x64
github.com/superfly/flyctl/internal/cli.printError(0x140004d5a40, 0x14000f39c06, 0x140004f4008, {0x106d27c48, 0x1400252db30})
    github.com/superfly/flyctl/internal/cli/cli.go:184 +0x450
github.com/superfly/flyctl/internal/cli.Run({0x106d4e910?, 0x140004e2600?}, 0x140004d5a40, {0x1400004c250, 0x5, 0x5})
    github.com/superfly/flyctl/internal/cli/cli.go:117 +0x870
main.run()
    github.com/superfly/flyctl/main.go:47 +0x174
main.main()
    github.com/superfly/flyctl/main.go:26 +0x20
dangra commented 1 day ago

Error: stat .: no such file or directory

hmm, it is failing to stat current working directory, that is odd. Is there any chance the directory is gone (removed) by the time fly deploy finishes?