> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Production Issues

> Verify authentication before fetching logs:

<Warning>
  This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the [developer documentation](/developers).
</Warning>

# Troubleshoot Production Issues

## Prerequisites

Verify authentication before fetching logs:

```bash theme={null}
npx base44 whoami
```

If not authenticated or token expired, instruct user to run `npx base44 login`.

Resolve app context in one of these ways:

```bash theme={null}
# From a linked local project
cat base44/.app.jsonc

# Or explicitly
npx base44 logs --app-id app_123
```

## Available Commands

| Command       | Description                      | Reference                                                                                                     |
| ------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `base44 logs` | Fetch function logs for this app | [project-logs.md](https://docs.base44.com/developers/skills/base44-troubleshooter/references/project-logs.md) |

## Troubleshooting Flow

### 1. Check Recent Errors

Start by pulling the latest errors across all functions:

```bash theme={null}
npx base44 logs --level error
```

### 2. Drill Into a Specific Function

If you know which function is failing:

```bash theme={null}
npx base44 logs --function <function_name> --level error
```

If you are outside the project directory, pass the app explicitly:

```bash theme={null}
npx base44 logs --app-id app_123 --function <function_name> --level error
```

### 3. Inspect a Time Range

Correlate with user-reported issue timestamps:

```bash theme={null}
npx base44 logs --function <function_name> --since <start_time> --until <end_time>
```

### 4. Analyze the Logs

* Look for stack traces and error messages in the output
* Check timestamps to correlate with user-reported issues
* Use `--limit` to fetch more entries if the default 50 isn't enough
