Skip to main content

Error recovery

Appifex includes an AI Fix Agent that automatically resolves deployment errors.

How it works

When a deployment fails:

  1. Error detection - Build logs analyzed across all platforms
  2. Classification - Error categorized by type
  3. AI analysis - Fix Agent determines the solution
  4. Automatic fix - Code updated to resolve the issue
  5. Retry - Deployment attempted again

This process repeats up to 3 times.

Error types handled

TypeScript errors

Property 'user' does not exist on type 'Session'

Fix: Adding missing interfaces, fixing type mismatches

Dependency conflicts

npm ERR! ERESOLVE unable to resolve dependency tree

Fix: Resolving version conflicts, updating package.json

Import errors

Module not found: Can't resolve './components/Button'

Fix: Correcting import paths, adding missing exports

Build configuration

Error: Invalid next.config.js options detected

Fix: Updating configuration files

Platform-specific issues

'window' is not defined (in React Native)

Fix: Platform-appropriate API usage

What you'll see

During error recovery:

Attempt 1: ❌ TypeScript error in UserProfile.tsx
🤖 AI Fix Agent: Adding missing User interface...

Attempt 2: ❌ npm dependency conflict
🤖 AI Fix Agent: Updating react-native version...

Attempt 3: ✅ Success! All platforms deployed

When auto-fix fails

If the Fix Agent can't resolve an error after 3 attempts:

  1. Error message shown - See what went wrong
  2. Build logs available - Full details for debugging
  3. Manual fix needed - Use the code editor or chat

Common manual fixes

Complex logic errors:

"The calculation in calculateTotal() is wrong -
it should multiply price by quantity, not add them"

Design issues:

"The button should be blue, not red"

Missing context:

"Add the stripe API key to environment variables"

Preventing errors

Write clear prompts

Specific prompts generate better code:

"Create a user profile page showing:
- Avatar (circular, 80px)
- Name and email
- Edit button that opens a modal"

Test incrementally

Add features one at a time. If something breaks, it's easier to identify.

Review generated code

Catch issues before deployment by reviewing in the editor.

Advanced: Reading build logs

Build logs show exactly what failed:

> Building web...
✓ Compiled successfully

> Building mobile...
✗ TypeScript error in app/index.tsx:15:23
Property 'navigation' does not exist on type '{}'

Use this information to:

  1. Ask AI to fix specific issues
  2. Make manual corrections
  3. Report bugs if the fix agent misses something