Common Issues & Solutions

Quick solutions for the most frequently encountered problems in Remind Tools development.

Development Issues

Melos Bootstrap Failures

Build Failures

Common iOS Issues

CocoaPods Issues
cd ios
pod cache clean --all
rm -rf Pods Podfile.lock
pod install --repo-update
Signing Issues
# Open in Xcode
open ios/Runner.xcworkspace
# Fix in: Signing & Capabilities
Build Clean
flutter clean
cd ios
xcodebuild clean
cd ..
flutter build ios

Runtime Issues

State Management

Always dispose of controllers and subscriptions to prevent memory leaks.
// BLoC disposal
@override
void dispose() {
  _bloc.close();
  super.dispose();
}

// Riverpod disposal
ref.onDispose(() {
  controller.dispose();
});

Performance Issues

ProblemSolution
Janky scrollingUse ListView.builder instead of ListView
Slow navigationPreload routes with precacheImage
Memory leaksCheck for disposed controllers
Large imagesUse cached_network_image package

API Issues

Supabase Connection

// Check connection
if (!supabase.auth.currentSession) {
  // Re-authenticate
  await supabase.auth.refreshSession();
}

// Handle errors
try {
  final data = await supabase.from('table').select();
} on PostgrestException catch (e) {
  print('Database error: ${e.message}');
} catch (e) {
  print('Network error: $e');
}

Rate Limiting

class RateLimitHandler {
  static Future<T> withRetry<T>(
    Future<T> Function() operation,
  ) async {
    int retries = 0;
    while (retries < 3) {
      try {
        return await operation();
      } on RateLimitException {
        await Future.delayed(
          Duration(seconds: math.pow(2, retries).toInt()),
        );
        retries++;
      }
    }
    throw Exception('Max retries exceeded');
  }
}

Testing Issues

Test Failures

Quick Fixes

Reset Everything

#!/bin/bash
# Complete reset script

echo "Cleaning Flutter..."
flutter clean

echo "Cleaning Melos..."
melos clean

echo "Clearing caches..."
flutter pub cache clean

echo "Removing lock files..."
find . -name "pubspec.lock" -delete
find . -name ".packages" -delete
find . -name ".dart_tool" -type d -exec rm -rf {} +

echo "Re-installing dependencies..."
melos bootstrap

echo "Running code generation..."
melos run generate

echo "Reset complete!"

Emergency Contacts