Troubleshoot your app

Ask Athena why an app deployed from your own repository is failing, and let it fix the configuration or push a fix to your code.

When a web service deploys your own GitHub repository, Athena troubleshoots it rather than building. Describe what's wrong, or ask why the app is down, and Athena finds the cause. It fixes settings itself, and pushes a fix to your code once you allow it.

Use it when a deploy fails, the app crashes or stops answering, or something works locally but not on Appentic.

Ask

  1. Open the project and choose Athena in the sidebar.

  2. Say what you see, in your own words, and send. For example:

    The app crashed after this morning's deploy.

In a project that deploys your own repository, Athena only troubleshoots. It never replaces your code, starts a machine or adds services.

What Athena looks at

WhatWhy
The project's services and their statusWhich part is failing. A crashed service shows its last error.
The app's logsThe error is nearly always there, so it reads them first.
The last deploy's outputThe commit that's running, the build output and the exact version of every package the build installed.
Your code, at the deployed commitThe files the error names and your dependency file, such as requirements.txt or package.json. It reads them from GitHub.
Your environment variablesWhich names are set, when, and whether the app has run with each yet. It never sees the values.
The live appWhether it answers, and how a page looks.

Athena checks a suggested change against your code and the package versions your build installed, not from memory. When it isn't sure of something, it says so and tells you how to check.

What it can fix without changing your code

  • A missing or wrong variable. Athena sets it. A running app restarts with it within a few seconds, without a rebuild.
  • A secret only you have, such as an API key. Athena asks for it in a secure form. See Secrets.
  • A stuck app. Athena starts it again as it is, without a rebuild. An app whose first deploy failed is deployed again.

After each change, Athena waits for the app to settle and reads the logs again, since fixing one error often reveals the next. Before it finishes, Athena checks the app is back up. If it isn't, it keeps going or tells you why.

Secrets

When the app needs a key or password, Athena opens a form titled with the variable's name, such as Athena needs STRIPE_SECRET_KEY, with a line on why.

  1. Paste the value.
  2. Click Save.

The value goes straight into the project's environment, encrypted, and appears on the Environment page like any other variable. Athena learns only that it was saved and never sees the value. Never paste a secret into a message.

Closing the form stops the request.

Pushing a fix to your code

When the fix needs a change to your code, Athena can push it as a normal commit to the branch the web service deploys. That push deploys it, and Athena follows the deploy until the app comes back. You can see and revert the commit on GitHub like any other. If the branch is protected and takes no direct pushes, the fix arrives as a pull request instead, and deploys when you merge it.

Two things must be in place first:

  1. Code fixes is on for the web service. It's off by default.
  2. Appentic's GitHub App may change code. You approve this once on GitHub, for every repository the App can reach. Appentic still only pushes to repositories where Code fixes is on.

Only the workspace owner can allow pushes, because fixes go through the owner's GitHub connection. Other members can ask Athena for help, and Athena tells them what to change instead.

Allow it when Athena asks

If either step is missing when Athena has a fix ready, it shows a card: Athena wants to push a fix to your repository.

  1. Click Allow pushes to your repository's name. This turns on Code fixes for that service.
  2. If the GitHub App's permission isn't approved yet, the card moves on to One more step on GitHub. Click Approve on GitHub, and accept the new permissions on the page GitHub opens.
  3. Athena notices the approval within a few seconds and pushes the fix. Click I've approved it to make it check straight away.

Click Not now to push nothing. Athena then explains exactly what to change, in which file and line, and why. Appentic deploys again when you push the change yourself.

In Manual mode, Athena also shows the exact lines it removes and adds, and asks before it pushes. See Modes.

Set it up in advance

  • Code fixes: open the web service's Settings and turn on Code fixes. Turn it off there at any time.
  • GitHub approval: go to User settings → Connected accounts. Under Repository access, Code fixes lists the repositories that accept fixes, and shows Approve on GitHub while the approval is missing.

Coding agents connected to your account can push fixes on the same terms.

When it finishes

Athena's last message says what was wrong, what it did and whether the app works now. If it couldn't fix it, the message says what to do next.

Troubleshooting is billed like any other request. See Costs.