Error recovery
Appifex includes an AI Fix Agent that automatically resolves deployment errors.
How it works
When a deployment fails:
- Error detection - Build logs analyzed across all platforms
- Classification - Error categorized by type
- AI analysis - Fix Agent determines the solution
- Automatic fix - Code updated to resolve the issue
- 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:
- Error message shown - See what went wrong
- Build logs available - Full details for debugging
- 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:
- Ask AI to fix specific issues
- Make manual corrections
- Report bugs if the fix agent misses something