home / skills / base44 / skills / base44-troubleshooter

base44-troubleshooter skill

/skills/base44-troubleshooter

This skill helps you diagnose production issues in Base44 apps by fetching and analyzing backend function logs.

npx playbooks add skill base44/skills --skill base44-troubleshooter

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.4 KB
---
name: base44-troubleshooter
description: Troubleshoot production issues using backend function logs. Use when investigating app errors, debugging function calls, or diagnosing production problems in Base44 apps.
---

# Troubleshoot Production Issues

## Prerequisites

Verify authentication before fetching logs:

```bash
npx base44 whoami
```

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

Must be run from the project directory (where `base44/.app.jsonc` exists):

```bash
cat base44/.app.jsonc
```

## Available Commands

| Command | Description | Reference |
|---------|-------------|-----------|
| `base44 logs` | Fetch function logs for this app | [project-logs.md](references/project-logs.md) |

## Troubleshooting Flow

### 1. Check Recent Errors

Start by pulling the latest errors across all functions:

```bash
npx base44 logs --level error
```

### 2. Drill Into a Specific Function

If you know which function is failing:

```bash
npx base44 logs --function <function_name> --level error
```

### 3. Inspect a Time Range

Correlate with user-reported issue timestamps:

```bash
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

Overview

This skill helps troubleshoot production issues in Base44 apps by guiding you to fetch and analyze backend function logs. It explains the quick checks to perform, required authentication and project context, and the key base44 CLI commands to narrow down errors. Use it to rapidly surface stack traces, correlate timestamps, and isolate failing functions.

How this skill works

The skill verifies you are authenticated with Base44 and that you are running from the project directory containing base44/.app.jsonc. It instructs how to run npx base44 logs with flags to filter by level, function, time range, and entry limit. The output focuses on error-level entries, stack traces, and timestamps so you can identify root causes and reproduce issues.

When to use it

  • Investigating app crashes or user-reported errors in production
  • Debugging failing function calls or unexpected exceptions
  • Correlating user session timestamps with backend errors
  • Expanding log searches when default entries aren’t sufficient
  • Validating fixes after redeploys by checking recent logs

Best practices

  • Confirm authentication with npx base44 whoami and run npx base44 login if needed
  • Run commands from the project directory where base44/.app.jsonc is present
  • Start broad with npx base44 logs --level error, then narrow by --function
  • Use --since and --until to match user-reported timestamps for correlation
  • Increase --limit if the default 50 entries misses relevant traces

Example use cases

  • Pull all recent error-level logs to get a quick view of production failures
  • Fetch logs for a specific function that a user reports as failing: npx base44 logs --function <name> --level error
  • Investigate an incident window by using --since <start_time> --until <end_time>
  • Get more historical context when a bug appears intermittently by increasing --limit

FAQ

What if npx base44 whoami shows no user?

Run npx base44 login to authenticate, then re-run the log commands.

Where should I run these commands?

Run them from your project directory that contains base44/.app.jsonc so the CLI knows which app to query.

How do I get more than the default 50 log entries?

Add --limit <number> to the npx base44 logs command to fetch more entries.