Skip to main content
This guide covers common issues you might encounter when developing React Native applications and their solutions.

Build Errors

Symptoms:
Solutions:
  1. Clear Metro cache:
  2. Check import path:
  3. Clear node_modules and reinstall:
  4. Check file extension:
  5. Watchman issues:
Symptoms:
Solutions:
  1. Update CocoaPods:
  2. Deintegrate and reinstall:
  3. Update pod repo:
  4. Clear CocoaPods cache:
  5. Check Podfile platform version:
Symptoms:
Solutions:
  1. Clean Gradle:
  2. Clear Gradle cache:
  3. Update Gradle version:
  4. Check Android SDK:
    • Open Android Studio
    • SDK Manager → Install required SDK versions
    • Set ANDROID_HOME environment variable
  5. Sync project with Gradle files in Android Studio
Symptoms:
Solutions:
  1. Clean and reinstall:
  2. Clear Xcode derived data:
  3. Clean build folder in Xcode:
    • Product → Clean Build Folder (Cmd + Shift + K)
  4. Check Header Search Paths in Xcode:
    • Build Settings → Header Search Paths
    • Should include $(SRCROOT)/../node_modules/react-native/React

Runtime Errors

Symptoms:
Solutions:
  1. Check component imports:
  2. Verify component exports:
  3. Check for circular dependencies
  4. Ensure component is properly defined:
Symptoms:
Solutions:
  1. Check network connectivity
  2. Allow HTTP on iOS (development only):
  3. Check Android network permissions:
  4. Use correct localhost address:
    • iOS Simulator: http://localhost:3000
    • Android Emulator: http://10.0.2.2:3000
    • Physical device: Use computer’s IP address
  5. Check CORS on backend
  6. Verify API endpoint:
Symptoms:
  • App shows white/blank screen
  • No errors in console
Solutions:
  1. Check Metro bundler is running:
  2. Reload JavaScript:
    • iOS: Cmd + R
    • Android: Press R twice or Cmd/Ctrl + M → Reload
  3. Check App.js/index.js:
  4. Check for JavaScript errors:
    • Open React Native Debugger
    • Check console for errors
  5. Verify root component renders:
Symptoms:
  • App crashes immediately
  • No JavaScript error
Solutions:
  1. Check native logs: iOS:
    Android:
  2. Clean and rebuild:
  3. Check native module compatibility:
    • Verify all native modules support your React Native version
    • Update or remove incompatible modules
  4. Reinstall native dependencies:

Performance Issues

Symptoms:
  • Slow screen transitions
  • Laggy animations
  • Dropped frames
Solutions:
  1. Enable Hermes: iOS (ios/Podfile):
    Android (android/app/build.gradle):
  2. Use React.memo for expensive components:
  3. Optimize FlatList:
  4. Use InteractionManager:
  5. Profile with React DevTools Profiler
Symptoms:
  • App crashes with out of memory
  • Slow performance over time
Solutions:
  1. Optimize images:
  2. Clean up listeners and timers:
  3. Limit list rendering:
    • Use FlatList instead of ScrollView for long lists
    • Implement virtualization
    • Remove items outside viewport
  4. Monitor with Performance Monitor:
    • Shake device → Show Performance Monitor
    • Watch Memory usage

Metro Bundler Issues

Symptoms:
Solutions:
  1. Reset cache:
  2. Clear watchman:
  3. Clear Metro cache:
  4. Increase Node memory:
  5. Check for circular dependencies
Symptoms:
Solutions:
  1. Kill process on port 8081: macOS/Linux:
    Windows:
  2. Use different port:
    Then run app with custom port:

Debugging Tools

Solutions:
  1. Ensure React DevTools is running:
  2. Reload app after opening DevTools
  3. Check firewall settings
  4. Try different port:
Solutions:
  1. Use Hermes debugger instead:
    • Shake device → “Debug with Chrome” becomes “Hermes Debugger”
  2. Disable Chrome extensions
  3. Clear Chrome cache
  4. Use Flipper instead:

Environment Issues

Solutions:
  1. Use npx:
  2. Install globally (not recommended):
  3. Add to PATH:
Solutions:
  1. Check Node version:
  2. Update Node using nvm:
  3. Clear npm cache:

Testing Issues

Solutions:
  1. Configure Jest transform:
  2. Mock native modules:
  3. Clear Jest cache:

Getting Help

When seeking help:
  1. Provide error logs:
    • Full error message
    • Stack trace
    • Metro bundler output
  2. Share environment info:
  3. Create minimal reproduction:
    • Isolate the issue
    • Share code that reproduces the problem
  4. Check existing issues:

Next Steps

Debugging

Learn debugging techniques

Upgrading

Upgrade React Native safely