Skip to main content

VerityNgn Troubleshooting Guide

Solutions to common issues and debugging strategies.

Quick Diagnostics

Run Diagnostic Script

This checks:
  • ✅ Google Cloud project configuration
  • ✅ Vertex AI authentication
  • ✅ Service account setup
  • ✅ API key configuration

Authentication Issues

Error: “Could not automatically determine credentials”

Symptoms:
Causes:
  1. No service account JSON file
  2. GOOGLE_APPLICATION_CREDENTIALS not set
  3. No application default credentials
Solutions: Option 1: Use Service Account
Option 2: Use Application Default Credentials
Option 3: Check .env File

Error: “Reauthentication is needed”

Symptoms:
Cause: OAuth2 credentials expired Solution 1: Switch to Service Account
Solution 2: Re-authenticate
Solution 3: Remove old credentials

Error: “Permission denied for Vertex AI”

Symptoms:
Cause: Service account lacks Vertex AI permissions Solution:

Processing Issues

Issue: “Process seems hung / no progress”

Symptoms:
  • No log output for 10+ minutes
  • Last message: “Processing segment…”
  • Terminal appears frozen
Is it really hung? ✅ NORMAL BEHAVIOR:
  • 8-12 minutes of no output during segment processing
  • Multimodal analysis is compute-intensive
  • No progress bars during LLM processing
🔍 How to check:
  1. Check timestamp - Has it been < 15 minutes?
    • If YES: Wait - this is normal!
    • If NO: May be hung, proceed to debugging
  2. Look for last log message:
    • If you see this: Wait 12 minutes before worrying
  3. Check expected time:
    • 33-minute video: ~10 minutes processing time
    • 60-minute video: ~20 minutes processing time
❌ ACTUALLY HUNG (after 15+ minutes): Debug steps:
Workaround: Force shorter segments

Issue: “Empty response from segmented Vertex YouTube analysis”

Symptoms:
Causes:
  1. Segment too large for context window
  2. Network timeout
  3. API rate limiting
  4. Invalid video URL
Solutions: 1. Reduce segment size:
2. Check network:
3. Verify video URL:
4. Check API quotas:

Issue: Slow processing (> 30 minutes for 33-minute video)

Expected times (v2.0):
  • 10-minute video: 8-12 minutes
  • 33-minute video: 8-12 minutes
  • 60-minute video: 16-24 minutes
If slower: Check segmentation:
Force intelligent segmentation:

Dependency Issues

Error: “ModuleNotFoundError: No module named ‘psutil’”

Solution:
Or use conda environment:

Error: “ModuleNotFoundError: No module named ‘isodate’”

Solution:

Error: “ModuleNotFoundError: No module named ‘dotenv’”

Solution:

Error: “ModuleNotFoundError: No module named ‘verityngn…’”

Cause: Missing internal modules or incorrect Python path Solution:

Video Download Issues

Error: yt-dlp cache permission error

Symptoms:
Solution:

Error: Video unavailable

Symptoms:
Causes:
  1. Private video
  2. Age-restricted video
  3. Region-locked video
  4. Invalid URL
Solutions:

API Key Issues

Warning: “Google Search API key or CSE ID not configured”

Impact: Limited evidence verification capabilities Severity: ⚠️ Low (optional feature) Solution (optional):
Or accept reduced functionality - system works without it.

Warning: “YouTube API key not configured”

Impact: Uses yt-dlp fallback (slower) Severity: ⚠️ Low (automatic fallback) Solution (optional):
Or accept fallback - yt-dlp works fine, just slower.

Debugging Strategies

Enable Verbose Logging

Use VS Code Debugger

  1. Open .vscode/launch.json (already configured)
  2. Set breakpoints in code
  3. Run debugger:
    • Press F5
    • Select “Debug: Test TL Video”
    • Step through execution
  4. Inspect variables:
    • Check video_duration_seconds
    • Check SEGMENT_DURATION_SECONDS
    • Check API responses

Test Components Individually

Test segmentation only:
Test claims extraction only:
Test credentials only:
Test video download only:

Check Environment

Expected output:

Performance Optimization

Reduce API Costs

Use intelligent segmentation (automatic):
Results:
  • 33-minute video: 1 API call instead of 7 (86% reduction)
  • 60-minute video: 2 API calls instead of 12 (83% reduction)

Speed Up Processing

1. Use Gemini 2.5 Flash (default):
2. Disable thinking budget:
3. Optimize segment FPS:

Common Error Messages

”json_lib is not defined”

Status: ✅ Fixed in current version If you see this: Update to latest version

”cannot access local variable ‘json_lib’”

Status: ✅ Fixed in current version If you see this: Update to latest version

”404 Not Found” from Vertex AI

Cause: Model name incorrect or not available in region Solution:

Getting Help

Check Documentation

  1. Setup Guide - Authentication and installation
  2. Quick Start - First-time usage
  3. Architecture - Technical details
  4. Testing Guide - Testing and validation

Collect Debug Information

Before reporting issues, collect:

Report Issues

When reporting issues, include:
  • Error message (full traceback)
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment information (from above)
  • Video URL (if applicable and public)

Last Updated: October 28, 2025
Version: 2.0