AI Project Troubleshooting Guide

Solutions to common problems across all platforms

How to Use This Guide

This comprehensive troubleshooting guide covers common issues you may encounter while building your AI project. Each problem includes:

Pro Tip:

Before diving into platform-specific troubleshooting, always try these universal fixes: (1) Refresh your browser, (2) Clear browser cache, (3) Check your internet connection, (4) Try a different browser.

General Issues Teachable Machine MIT App Inventor Scratch ML Accuracy Problems

General Issues (All Platforms)

⚠️ Webcam or Microphone Not Working

Symptoms: Browser says "Camera blocked" or microphone doesn't capture audio. Black screen instead of webcam feed. Error message about permissions.

Why It Happens: Browser doesn't have permission to access your camera/microphone, device is being used by another application, or hardware drivers need updating.

Solutions

  1. Check Browser Permissions:
    • Click the lock icon or camera icon in your browser's address bar
    • Ensure camera and microphone are set to "Allow"
    • Refresh the page after changing permissions
  2. Close Other Applications: Make sure no other programs (Zoom, Teams, Skype) are using the camera
  3. Restart Your Browser: Close all browser windows completely, then reopen
  4. Try Different Browser: Chrome works best for Teachable Machine; if using Safari, try Chrome or Edge
  5. Check Device Manager (Windows):
    • Open Device Manager
    • Expand "Cameras" or "Audio inputs"
    • Right-click your device and select "Enable" if disabled
    • Update driver if needed
  6. Mac Users: System Preferences → Security & Privacy → Camera/Microphone → Check the box next to your browser
Prevention Tip:

Always allow camera/microphone permissions when prompted the first time. If you accidentally clicked "Block," you'll need to manually enable it in browser settings.

⚠️ Project Won't Save or Load

Symptoms: Your work disappears when you refresh. Changes don't save. Error message when trying to load saved project.

Why It Happens: Browser cookies/storage disabled, insufficient storage space, browser cache issues, or network connection problems.

Solutions

  1. Enable Cookies: Browser Settings → Privacy → Allow cookies from the AI platform site
  2. Clear Browser Cache:
    • Chrome: Settings → Privacy and Security → Clear Browsing Data
    • Select "Cached images and files"
    • Choose "All time" and click "Clear data"
  3. Check Storage Space: Make sure you have at least 500MB free disk space
  4. Download/Export Project: Most platforms have an export feature - use it regularly as backup
  5. Use Signed-In Account: Create and sign into an account rather than working as guest
  6. Stable Internet: Don't work on projects during unstable internet connections
Important:

Always export/download your project periodically during long work sessions. Don't rely solely on auto-save!

⚠️ Platform Running Slowly or Freezing

Symptoms: Website is slow to respond. Training takes forever. Browser becomes unresponsive. Pages freeze or crash.

Why It Happens: Too many browser tabs open, insufficient computer resources, large training datasets, or outdated browser.

Solutions

  1. Close Unnecessary Tabs: Keep only the AI platform tab open while training
  2. Close Other Programs: Shut down video streaming, games, or other resource-intensive applications
  3. Reduce Sample Size Temporarily: Try training with fewer samples (30-40 per class) to test if it works
  4. Update Browser: Make sure you're using the latest version of Chrome, Edge, or Firefox
  5. Increase Computer Resources:
    • Close background applications in Task Manager (Windows) or Activity Monitor (Mac)
    • Restart your computer if it's been running for days
  6. Try Different Device: If your computer is older/slower, try using a different device
  7. Use Incognito/Private Mode: Sometimes browser extensions interfere - try incognito mode
Optimization Tip:

Training AI models is resource-intensive. For best performance: close all other tabs, ensure you have at least 4GB of available RAM, and avoid running other programs during training.

Teachable Machine Specific Issues

⚠️ Model Accuracy is Very Low (Below 60%)

Symptoms: AI makes wrong predictions most of the time. Confidence scores are low. Model confuses similar categories.

Why It Happens: Insufficient training data, categories too similar, poor lighting variety, or background interference.

Solutions

  1. Increase Sample Count: Add more samples - aim for 75-100+ per category
  2. Improve Sample Diversity:
    • Vary lighting conditions (bright, dim, natural, artificial)
    • Change angles and distances from camera
    • Use different backgrounds
    • Include variations in the objects themselves
  3. Check Category Overlap: Make sure your categories are visually distinct. If two categories look similar, combine them or choose different categories
  4. Remove Background Clutter: Train with clean, simple backgrounds. Objects should be clearly visible
  5. Balance Your Data: Ensure all categories have similar number of samples (within 10-20 samples of each other)
  6. Review Training Samples: Look through your samples - delete any that are blurry, incorrectly labeled, or ambiguous
  7. Add "Negative" Examples: Include samples of things that aren't in any category to help the model learn what to ignore

Quick Accuracy Checklist:

  • Do I have at least 60 samples per category?
  • Are my samples diverse in lighting, angle, and background?
  • Are my categories visually distinct from each other?
  • Is each category balanced (similar number of samples)?
  • Have I removed poor quality or ambiguous samples?

⚠️ Training Takes Forever or Fails

Symptoms: Training progress bar stuck at 0%. Training times out after 10+ minutes. Error message "Training failed."

Why It Happens: Too many training samples, browser resources exhausted, or network connection issues.

Solutions

  1. Reduce Sample Count: If you have 150+ samples per class, try reducing to 80-100
  2. Delete Duplicate Samples: Remove very similar samples that don't add variety
  3. Refresh and Retry: Refresh the page and try training again
  4. Clear Browser Cache: Settings → Clear Browsing Data → Cached images and files
  5. Use Chrome: Teachable Machine works best in Chrome browser
  6. Check Internet: Make sure you have stable internet connection during training
  7. Train in Epochs: If possible, adjust training settings to use fewer epochs (advanced settings)
Expected Training Times:

Normal training with 200-300 total samples should take 2-5 minutes. If it takes longer than 10 minutes, something is wrong.

⚠️ Can't Export or Share Model

Symptoms: Export button doesn't work. Can't generate shareable link. Downloaded model won't import elsewhere.

Solutions

  1. Train First: Make sure your model is trained before trying to export
  2. Choose Export Method:
    • "Upload my model" - Hosts on cloud (easiest for sharing)
    • "Download my model" - Saves locally (for offline use)
    • "TensorFlow.js" - For web integration
  3. Allow Pop-ups: Browser may be blocking the export window - check pop-up settings
  4. Wait for Upload: If uploading to cloud, wait for "Upload complete" message
  5. Copy Link Correctly: Use the "Copy" button rather than manually selecting text

MIT App Inventor Specific Issues

⚠️ Can't Connect to AI2 Companion App

Symptoms: QR code won't scan. App says "Connection refused." Companion app can't find project.

Solutions

  1. Same WiFi Network: Computer and mobile device MUST be on same WiFi network
  2. Scan QR Code Correctly:
    • Open AI2 Companion app first
    • Click "scan QR code" in app
    • Point camera at QR code on computer screen
    • Hold steady until it connects
  3. Type Code Manually: If QR code doesn't work, type the 6-letter code manually in the app
  4. Restart Companion App: Close and reopen the AI2 Companion app
  5. Update Companion App: Make sure you have the latest version from Google Play or App Store
  6. Firewall Issues: School/work networks may block connection - try using mobile hotspot
  7. Use USB Connection: Alternative method - connect phone via USB cable and use aiStarter
School Network Tip:

Many school WiFi networks block device-to-device communication. If Companion won't connect, ask IT to whitelist App Inventor, or use your phone's mobile hotspot.

⚠️ AI Classification Extension Not Working

Symptoms: Image classifier returns errors. Model doesn't load. Classification results are always wrong.

Solutions

  1. Correct Extension: Make sure you're using "PersonalImageClassifier" extension
  2. Model Format: Export Teachable Machine model specifically for "TensorFlow Lite" format
  3. Upload Model File: In App Inventor, upload BOTH the .tflite file AND labels.txt file
  4. Initialize Properly: Make sure you call the "Initialize" block before trying to classify
  5. Image Format: Classifier works best with JPG images - convert PNG if needed
  6. Wait for Model Loading: Model needs time to load - add a "when initialized" event handler
  7. Check Error Messages: Look at error output to see specific issue

AI Extension Setup Checklist:

  • PersonalImageClassifier extension added to project
  • Model file (.tflite) uploaded to Media
  • Labels file (labels.txt) uploaded to Media
  • Initialize block called when app starts
  • Classification called only after initialization complete

⚠️ App Crashes on Phone

Symptoms: App closes immediately after opening. "Unfortunately, [App] has stopped" error. App freezes and becomes unresponsive.

Solutions

  1. Check for Errors: Use the "Do It" feature in App Inventor to test blocks before building APK
  2. Remove Recent Changes: Think about what you changed last - undo those blocks
  3. Permissions: Make sure camera/storage permissions are requested in app settings
  4. Model Size: Very large AI models (>50MB) may crash on older phones - simplify model
  5. Phone Storage: Ensure phone has enough free storage (at least 100MB)
  6. Reinstall App: Uninstall and reinstall the app
  7. Test on Different Device: Try app on different phone to see if it's device-specific

Scratch ML Extension Issues

⚠️ ML Extension Not Available

Symptoms: Can't find Machine Learning extension. Extension menu doesn't show ML options.

Solutions

  1. Use Correct Scratch Version: ML extensions work on scratch.mit.edu (not offline editor)
  2. Sign In: You must be signed into Scratch account to access extensions
  3. Add Extension:
    • Click the Extensions button (bottom left)
    • Look for "Video Sensing" or "Machine Learning" extensions
    • Some ML features may be in experimental extensions
  4. Alternative: Use Teachable Machine for Scratch: Export Teachable Machine model as "Upload my model" and use the provided link in Scratch

⚠️ Video Sensing Not Detecting Motion

Symptoms: Video motion blocks always show 0. Camera feed visible but no motion detected.

Solutions

  1. Enable Camera: Click "Enable Video" in the video sensing blocks
  2. Adjust Sensitivity: Motion needs to be significant enough - small movements may not register
  3. Proper Lighting: Video sensing works better in well-lit environments
  4. Check Camera Access: Browser must have permission to use camera
  5. Stage vs Sprite: Video motion can be measured on stage or on specific sprite - make sure you're using correct option

Accuracy & Performance Problems

⚠️ Model Works in Training but Not in Real Use

Symptoms: High accuracy during testing with training samples, but poor performance with new images/sounds. Model doesn't generalize well.

Solutions

  1. Overfitting Problem: Your model memorized training data instead of learning patterns
    • Add MORE diverse training samples
    • Include variations in lighting, angle, background
    • Use different objects of the same category
  2. Match Real Conditions: Train your model in the same conditions where it will be used
    • If using in classroom, collect training data in classroom
    • If using outdoors, include outdoor lighting samples
    • Match the background and environment
  3. Test with Hold-Out Set: Set aside 10-15 samples per category that you DON'T use for training - test with these
  4. Cross-Validation: Train model, test it, retrain with different samples, repeat
Common Mistake:

Training with 50 nearly identical photos from the same angle in the same lighting will give high accuracy in testing but fail in real use. Variety is more important than quantity!

⚠️ Model Confuses Two Specific Categories

Symptoms: AI consistently confuses Category A with Category B. Other categories work fine. Confidence scores are similar between the two categories.

Solutions

  1. Identify Why They're Similar: Look at your training samples - what makes these categories look alike?
  2. Increase Distinction:
    • Add more contrasting examples to each category
    • Focus on features that make them DIFFERENT
    • Use different backgrounds for each category
  3. Add More Samples: Double the training data for these two specific categories
  4. Consider Combining: If categories are too similar, combine them into one broader category
  5. Edge Case Training: Specifically add samples of items that are "borderline" between categories with clear labels

⚠️ Lighting Changes Affect Accuracy Dramatically

Symptoms: Model works great in bright light but fails in dim light. Works indoors but not outdoors. Accuracy drops with different lighting.

Solutions

  1. Train with Lighting Variety:
    • Bright lighting samples
    • Dim lighting samples
    • Natural daylight samples
    • Artificial lighting samples
    • Backlit samples
  2. Lighting Normalization: Try to maintain consistent lighting in use environment
  3. Add Shadows: Include samples with shadows and different shadow angles
  4. Time of Day: If app will be used throughout the day, collect samples at different times

Quick Reference: Common Error Messages

"Quota Exceeded"

You've hit browser storage limit. Clear cache or reduce project size.

"Network Error"

Check internet connection. Try refreshing page or switching networks.

"Training Failed"

Too many samples or browser crashed. Reduce samples and try again.

"Permission Denied"

Browser doesn't have camera/mic access. Check permissions in browser settings.

"Model Not Found"

Exported model file missing or path incorrect. Re-export and check file location.

"Invalid Format"

Wrong file type exported. Check that you're using the correct export option for your platform.

Still Need Help?

Additional Resources:

Remember:

Troubleshooting is a normal part of AI development! Professional AI engineers encounter these same problems. Learning to solve technical issues is a valuable skill that will help you in future projects.