Troubleshooting
OAuth Errors
”Error 403: access_denied”
Your email isn’t added as a test user. Go to OAuth consent screen > Test users and add your Gmail address.
”Access blocked: This app’s request is invalid”
The Gmail scope isn’t configured. Verify you added gmail.modify scope and that Gmail API is enabled in your Google Cloud project.
”redirect_uri_mismatch”
Wrong application type. Ensure you selected Desktop app when creating OAuth credentials.
General OAuth Issues
- Remove old tokens:
rm ~/.msgvault/tokens/you@gmail.com.json - Re-add account:
msgvault add-account you@gmail.com - Revoke and retry: myaccount.google.com/permissions
Rate Limiting
If you hit Gmail API rate limits during large syncs:
- Reduce
rate_limit_qpsin config (default: 5) - Use
--limitduring initial testing - Wait and retry. Rate limits reset over time
Database Corruption
If the database is corrupted:
- Back up your database:
cp ~/.msgvault/msgvault.db ~/.msgvault/msgvault.db.bak - Delete and re-sync:
Terminal window rm ~/.msgvault/msgvault.dbmsgvault init-dbmsgvault sync-full you@gmail.com
Interrupted Syncs
Run the same sync command again. It resumes from the last checkpoint:
msgvault sync-full you@gmail.com --after 2024-01-01 --before 2024-02-01To force a fresh start:
msgvault sync-full you@gmail.com --noresumeCGO / Build Errors
If you get errors about missing C compiler:
- macOS: Install Xcode Command Line Tools:
xcode-select --install - Linux: Install GCC:
apt install gccordnf install gcc
CGO is required for mattn/go-sqlite3 (FTS5 support).
TUI Not Showing Data
If the TUI launches but shows no data:
- Verify sync completed:
msgvault stats - Rebuild the Parquet cache:
msgvault build-cache --full-rebuild - Check account filter: try
msgvault tuiwithout--account