Fly launch error: Could not find App

Hi,

I thought it was relevant to the deployment issues, but now that they are resolved and I still have mine, I’m not so sure about it.
Yesterday I tried to launch a new app on Fly.io and still can’t do it. The error is persistent.

I’m trying to deploy a simple Phoenix 1.6.15 app with fly v0.0.424 darwin/arm64 Commit: d78c6f3c BuildDate: 2022-10-27T20:12:34Z, and getting the Error Could not find App after creating a release. On the dashboard, DB seems healthy, and the app has a yellow icon. The app’s status is “pending” (I tried to leave it as is for a few hours yesterday - it didn’t help).

Here is the log with the relevant steps. Let me know if you need any specific data.


mix phx.new myapp

...

cd myapp

fly launch

...

Detected a Phoenix app

? Create .dockerignore from 2 .gitignore files? Yes

...

? Choose an app name (leave blank to generate one):

? Select Organization: Roman Chvanikov (personal)

? Choose a region for deployment: Frankfurt, Germany (fra)

...

? Would you like to set up a Postgresql database now? Yes

? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk

...

==> Monitoring health checks

...

? Would you like to deploy now? Yes

==> Building image

...

==> Creating build context

--> Creating build context done

==> Building image with Docker

--> docker host: 20.10.12 linux x86_64

...

==> Pushing image to fly

...

--> Pushing image done

...

==> Creating release

Error Could not find App

I tried different regions and app names (manual and auto-generated), but it didn’t help either.

1 Like

Facing same issue. on phoenix 1.6

Just learned about the LOG_LEVEL env var, and here is the debug output for the last operation:

==> Creating release
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "mutation($input: DeployImageInput!) { deployImage(input: $input) { release { id version reason description deploymentStrategy user { id email name } evaluationId createdAt } releaseCommand { id command evaluationId } } }",
  "variables": {
    "input": {
      "appId": "",
      "image": "registry.fly.io/loado:deployment-01GGJBNNFQTG296C5SH20WBVR1",
      "services": null,
      "definition": {
        "deploy": {
          "release_command": "/app/bin/migrate"
        },
        "env": {
          "PHX_HOST": "loado.fly.dev",
          "PORT": "8080"
        },
        "experimental": {
          "allowed_public_ports": [],
          "auto_rollback": true
        },
        "kill_signal": "SIGTERM",
        "kill_timeout": 5,
        "processes": [],
        "services": [
          {
            "concurrency": {
              "hard_limit": 25,
              "soft_limit": 20,
              "type": "connections"
            },
            "http_checks": [],
            "internal_port": 8080,
            "ports": [
              {
                "force_https": true,
                "handlers": [
                  "http"
                ],
                "port": 80
              },
              {
                "handlers": [
                  "tls",
                  "http"
                ],
                "port": 443
              }
            ],
            "processes": [
              "app"
            ],
            "protocol": "tcp",
            "script_checks": [],
            "tcp_checks": [
              {
                "grace_period": "1s",
                "interval": "15s",
                "restart_limit": 0,
                "timeout": "2s"
              }
            ]
          }
        ]
      },
      "strategy": null
    }
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (722.73ms)

{
  "data": {
    "deployImage": null
  },
  "errors": [
    {
      "message": "Could not find App",
      "locations": [
        {
          "line": 1,
          "column": 39
        }
      ],
      "path": [
        "deployImage"
      ],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ]
}
Error Could not find App
1 Like

Hi! Looks like you found a bug in the latest flyctl, where the app name isn’t sent properly on deploy during fly launch.

We’re* testing a fix, but in the meantime, you can get around this by saying N to deploying during launch, and run fly deploy manually.

*the collective “we”; actually it’s @rugwiro

1 Like

Oh wow, it works this way! I probably should’ve posted about the issue earlier…

Thank you!

1 Like

This should be fixed in the latest release, 0.0.425. Thanks for raising this issue.

1 Like

Hmm, I’m still getting this error with 0.0.425: Cart icon in header, closes LBC-173, closes #325 · commonknowledge/leftbookclub@12e2418 · GitHub

Running the same deploy commands locally does work, however. Is this a Github Actions-specific issue?

Can you try adding LOG_LEVEL=debug to the pipeline?

Re-ran the build with debug logging: Allow third parties to call the Shopify sync webhook endpoint · commonknowledge/leftbookclub@3b730be · GitHub

Is the deploy token used here have access to the production app? This error can happen if using a token without access.

1 Like

Oh snap. I guess I changed the Fly token a while back and forgot!? Thanks for the help @jsierles, checking fly auth token and updating the Github secret fixed it.

It’d be helpful if the Fly error message was a bit more explicit about what went wrong :slight_smile: — the auth token was invalid!

Indeed, it took me a little while to figure it out as well!