Overview
This page covers common issues you may encounter when setting up or running Platzi Viewer, along with their solutions.Cache Loading Issues
courses_cache.json not found
courses_cache.json not found
Error Message:Cause: The application requires a pre-built cache file that maps course structures to Google Drive file IDs.Solution:
- Run the cache builder:
- Wait 15-30 minutes for the initial scan to complete
- The script will create
courses_cache.json(~20MB)
drive_scan_progress.json.Invalid cache file (schema error)
Invalid cache file (schema error)
Error Message:Cause: The cache file is corrupted or was modified incorrectly.Solution:
- Delete the corrupted
courses_cache.jsonfile - Rebuild the cache:
- Do not manually edit the cache file
Cache not updating after rebuild
Cache not updating after rebuild
Symptom: Changes to Drive content don’t appear in the app.Solution:
- Access the refresh endpoint (only works from localhost):
- The server will reload the cache in the background
- Refresh your browser page
Large cache file causing memory issues
Large cache file causing memory issues
Symptom: Server crashes or runs out of memory.Cause: The ~20MB
courses_cache.json file is loaded entirely into RAM.Solution:- Ensure your system has at least 512MB of available RAM
- Close other memory-intensive applications
- For systems with limited resources, consider reducing the number of courses in
PlatziRoutes.mdbefore rebuilding the cache
Port and Network Issues
Port 8080 already in use
Port 8080 already in use
Error Message:orCause: Another application is using port 8080.Solution 1 - Use a different port:Solution 2 - Find and stop the conflicting process:
Cannot access server from browser
Cannot access server from browser
Symptom: Connection refused or timeout when accessing
http://localhost:8080.Check list:- Verify the server is running (you should see “Servidor listo” message)
- Check the correct port is being used
- Ensure no firewall is blocking the connection
- Try accessing via
http://127.0.0.1:8080instead
Python Dependencies
ModuleNotFoundError for Google packages
ModuleNotFoundError for Google packages
Error Message:Cause: Required Python packages are not installed.Solution:Key dependencies:
google-api-python-client- Drive API clientgoogle-auth- Authenticationgoogle-auth-httplib2- HTTP transport
Python version compatibility
Python version compatibility
Requirement: Python 3.7 or higherCheck your version:If you have an older version:
- Download Python 3.7+ from python.org
- Update your system Python using your package manager
- Use
python3instead ofpythonon some systems
Progress Data Issues
Progress not saving
Progress not saving
Symptom: Course progress resets after closing the browser.Causes and solutions:
-
Browser storage disabled:
- Enable cookies and local storage in browser settings
- Don’t use private/incognito mode
-
progress.json write error:
- Check server console for permission errors
- Ensure the server has write access to the data directory
- Verify
DATA_PATHenvironment variable if set
-
Payload too large:
- Default limit: 2MB
- Error:
{"error": "payload_too_large"} - Increase limit:
MAX_PROGRESS_BYTES=4194304 python server.py
Corrupted progress.json
Corrupted progress.json
Symptom: Server returns empty progress or errors when loading.Solution:
- Stop the server
- Backup the file:
- Try to fix JSON syntax errors manually, or delete the file:
- Restart the server
localStorage (browser) and progress.json (server backup).Desktop App Issues
.exe file won't run (Windows)
.exe file won't run (Windows)
Symptom: Nothing happens when double-clicking
PlatziViewer.exe or PlatziViewerDesktop.exe.Solutions:-
Missing files:
- Ensure
courses_cache.jsonis in the same folder as the .exe - Ensure
service_account.jsonis present (if not using env variables)
- Ensure
-
Antivirus blocking:
- Add the .exe to your antivirus exclusions
- Some antivirus software blocks unsigned executables
-
Run from Command Prompt to see errors:
Rebuilding the portable .exe
Rebuilding the portable .exe
Requirements:Output: Output:
- PyInstaller installed:
pip install pyinstaller - All dependencies installed:
pip install -r requirements.txt
dist/PlatziViewer/PlatziViewer.exeDesktop version (standalone window):dist/PlatziViewerDesktop.exeBefore distributing:- Copy
courses_cache.jsontodist/PlatziViewer/ - Optionally copy
service_account.json(or use environment variables)
Health Check Endpoint
Use the health endpoint to diagnose server issues:drive.available: false- See Drive Authentication Errorsffmpeg.available: false- Compatibility mode won’t work (see Video Sync Issues)compatStream.failedStreams > 0- ChecklastErrorfor FFmpeg issues
Docker Issues
Drive service not available in Docker
Drive service not available in Docker
Error:
"drive": {"available": false}Check /api/health response for details.Common causes:-
Service account file not mounted:
-
Environment variable not set:
or
-
Wrong file path in container:
- Check that the mounted path matches
GOOGLE_SERVICE_ACCOUNT_FILE - Use absolute paths in environment variables
- Check that the mounted path matches
Cache not persisting in Docker
Cache not persisting in Docker
Symptom: Cache resets when container restarts.Solution: Mount a volume for persistent data:
See Also
- Video Synchronization Issues - A/V sync problems and compatibility mode
- Google Drive Errors - API errors, rate limiting, and authentication
- Installation Guide - All environment variables