Skip to content

bug: Google API Connection Timeout Error During PRD Decomposition #802

@jason-create-cmd

Description

@jason-create-cmd

Description

When attempting to perform PRD decomposition using Google Gemini models, TaskMaster AI consistently fails with connection timeout errors. The application attempts to connect to multiple Google API endpoints but times out after 10 seconds, despite configuration settings for longer timeouts (120 seconds). This issue prevents the core functionality of PRD parsing and task generation from working with Google Gemini models.

Steps to Reproduce

  1. Install TaskMaster AI globally: npm install -g task-master
  2. Initialize a new project: task-master init
  3. Configure Google Gemini models:
    task-master models --set-main gemini-2.5-pro-preview-05-06
    task-master models --set-fallback gemini-2.5-pro-preview-03-25
  4. Set up Google API key in .env file:
    GOOGLE_API_KEY="your_google_api_key_here"
    
  5. Create a PRD file in .taskmaster/docs/prd.txt
  6. Attempt PRD decomposition: task-master parse-prd --num-tasks 15
  7. Observe connection timeout errors after approximately 10 seconds

Expected Behavior

  • TaskMaster AI should successfully connect to Google Gemini API endpoints
  • The application should respect the configured timeout settings (120 seconds in config.json)
  • PRD decomposition should complete successfully and generate the requested number of tasks
  • If the primary model fails, it should gracefully fall back to the secondary Gemini model

Actual Behavior

  • Connection attempts fail consistently with timeout errors
  • Multiple Google API endpoints are attempted but all fail:
    • 142.250.217.74:443
    • 142.250.69.170:443
    • 142.251.33.74:443
    • 142.251.215.234:443
    • 142.250.217.106:443
  • Timeout occurs at 10 seconds despite configuration setting of 120 seconds
  • Both main and fallback Gemini models fail with the same error
  • The retry mechanism (3 attempts) executes but all attempts fail

Screenshots or Logs

[ERROR] Google object generation failed: Failed after 3 attempts. Last error: Cannot connect to API: Connect Timeout Error (attempted addresses: 142.250.217.106:443, 142.251.215.234:443, 142.250.217.74:443, 142.251.33.74:443, timeout: 10000ms)

[WARN] Attempt 3 failed for role fallback (generateObject / google): Google API error during object generation: Failed after 3 attempts. Last error: Cannot connect to API: Connect Timeout Error (attempted addresses: 142.250.217.74:443, 142.250.69.170:443, 142.251.33.74:443, 142.251.215.234:443, 142.250.217.106:443, timeout: 10000ms)

[ERROR] All roles in the sequence [main, fallback, research] failed.

Configuration file (.taskmaster/config.json):

{
  "models": {
    "main": {
      "provider": "google",
      "modelId": "gemini-2.5-pro-preview-05-06",
      "maxTokens": 120000,
      "temperature": 0.2,
      "timeout": 120000
    },
    "fallback": {
      "provider": "google",
      "modelId": "gemini-2.5-pro-preview-03-25",
      "maxTokens": 8192,
      "temperature": 0.1,
      "timeout": 120000
    }
  },
  "global": {
    "logLevel": "info",
    "debug": false,
    "defaultSubtasks": 5,
    "defaultPriority": "medium",
    "timeout": 120000
  }
}

Environment

  • Task Master version: 0.17.0
  • Node.js version: v22.14.0
  • Operating system: Windows 11
  • IDE: VS Code augment
  • Network: Corporate/Regional network with potential Google API access restrictions

Additional Context

Attempted Solutions:

  • Modified timeout settings in config.json to 120 seconds (no effect)
  • Tried setting environment variables for timeout configuration
  • Verified API key is valid and properly formatted
  • Tested with both primary and fallback Gemini models

This issue significantly impacts the usability of TaskMaster AI in environments with Google API access restrictions, which may be common in corporate or certain geographic regions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions