Platform Bridge - Troubleshooting Guide¶
Solutions to common problems when usin' the platform bridge.
Platform Detection Issues¶
Problem: "Could not detect platform from git remotes"¶
Symptoms:
Cause: Repository has no remotes, or remote URLs don't match GitHub/Azure DevOps patterns.
Solutions:
- Check if ye have remotes:
If empty, add a remote:
git remote add origin https://github.com/owner/repo.git
# OR
git remote add origin https://dev.azure.com/org/project/_git/repo
- Verify remote URL format:
- GitHub: Must contain
github.com - Azure DevOps: Must contain
dev.azure.comorvisualstudio.com
# GitHub format (correct)
https://github.com/owner/repo.git
git@github.com:owner/repo.git
# Azure DevOps format (correct)
https://dev.azure.com/org/project/_git/repo
https://org.visualstudio.com/project/_git/repo
- Check if origin exists:
If origin doesn't exist but other remotes do:
Problem: "Wrong platform detected"¶
Symptoms: Bridge detects GitHub when ye have an Azure DevOps repo, or vice versa.
Cause: Multiple remotes configured, and bridge picks the wrong one.
Solution:
- Check all remotes:
Output might show:
origin https://github.com/mirror/repo.git (fetch)
upstream https://dev.azure.com/real/repo/_git/main (fetch)
-
Fix the origin remote:
-
Verify detection:
CLI Tool Issues¶
Problem: "GitHub CLI not found"¶
Symptoms:
Cause: GitHub CLI (gh) not be installed.
Solutions by Platform:
-
macOS:
-
Ubuntu/Debian:
-
Windows:
-
Verify installation:
Problem: "Azure CLI not found"¶
Symptoms:
CLIToolMissingError: Azure CLI not found. Install with: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Cause: Azure CLI (az) not be installed.
Solutions by Platform:
-
macOS:
-
Ubuntu/Debian:
-
Windows:
-
Verify installation:
Authentication Issues¶
Problem: "GitHub CLI not authenticated"¶
Symptoms:
Cause: GitHub CLI not authenticated with GitHub account.
Solution:
-
Run authentication:
-
Choose authentication method:
- Select "GitHub.com"
- Choose "HTTPS" protocol
- Choose "Login with a web browser"
-
Follow browser prompts
-
Verify authentication:
Should show:
Problem: "Azure CLI not authenticated"¶
Symptoms:
Cause: Azure CLI not authenticated with Azure account.
Solution:
-
Run authentication:
-
Follow browser prompts:
- Browser opens automatically
- Sign in with Azure/Microsoft account
-
Grant permissions
-
Verify authentication:
Should show account details:
Problem: "Token expired"¶
Symptoms:
orCause: Authentication tokens expired (GitHub OAuth tokens last ~30 days, Azure tokens last ~90 days).
Solution:
-
Refresh GitHub token:
-
Refresh Azure token:
If still expired:
Operation Failures¶
Problem: "Branch not found"¶
Symptoms:
Cause: Tryin' to create PR from branch that doesn't exist on remote.
Solution:
-
Check local branches:
-
Push branch to remote:
-
Then create PR:
Problem: "PR not found"¶
Symptoms:
Cause: PR number doesn't exist in the repository.
Solution:
-
List all PRs:
-
Use correct PR number:
Problem: "Permission denied"¶
Symptoms:
orCause: Authenticated user doesn't have permission fer the operation.
Solutions:
- Check repository access:
- GitHub: Need write access to create issues/PRs
-
Azure DevOps: Need "Contribute" permission
-
Verify permissions:
-
Request access:
- Contact repository owner
- Request "Write" access (GitHub) or "Contribute" (Azure DevOps)
Performance Issues¶
Problem: "CI status check takes too long"¶
Symptoms: check_ci_status() hangs or times out.
Cause: Large number of CI checks, or CI system be slow.
Solution:
-
Increase timeout (if needed):
-
Poll instead of block:
import time def wait_for_ci(bridge, pr_number, max_wait=600): """Poll CI status every 30 seconds""" start_time = time.time() while time.time() - start_time < max_wait: status = bridge.check_ci_status(pr_number=pr_number) if status['pending'] == 0: return status # All checks complete print(f"Waitin' on {status['pending']} checks...") time.sleep(30) raise TimeoutError("CI checks didn't complete in time")
Problem: "Operation times out"¶
Symptoms:
Cause: Network slow, or operation takes longer than expected.
Solution:
This be controlled internally by the bridge, but if ye frequently see timeouts:
-
Check network connection:
-
Check CLI tool directly:
-
If consistently slow:
- Check VPN/proxy settings
- Try different network
- Contact platform support (GitHub/Azure)
Edge Cases¶
Problem: "Multiple remotes, unclear which to use"¶
Symptoms: Have both GitHub and Azure DevOps remotes, bridge picks wrong one.
Solution:
Bridge prioritizes origin, so:
# Set correct remote as origin
git remote remove origin # Remove current origin
git remote add origin <correct-url> # Add correct one
# Keep other remote with different name
git remote add mirror <other-url>
Problem: "Working in monorepo with multiple projects"¶
Symptoms: Monorepo has both GitHub and Azure DevOps projects.
Solution:
Create separate bridge instances fer each project:
# Project A: GitHub
bridge_a = PlatformBridge("/path/to/monorepo/project-a")
# Project B: Azure DevOps
bridge_b = PlatformBridge("/path/to/monorepo/project-b")
# Each project can have different git config
Problem: "Using SSH URLs instead of HTTPS"¶
Symptoms: Git remote uses SSH format like git@github.com:owner/repo.git
This works! Bridge handles both SSH and HTTPS URLs:
# Both formats work
git remote add origin git@github.com:owner/repo.git # SSH
git remote add origin https://github.com/owner/repo.git # HTTPS
Debugging¶
Enable Debug Output¶
Set environment variable fer more detailed output:
Then run yer code:
from claude.tools.platform_bridge import PlatformBridge
bridge = PlatformBridge() # Will print debug info
Debug output shows: - Detected platform - Git commands executed - CLI commands run - Subprocess output
Check CLI Tool Logs¶
GitHub CLI logs:
Azure CLI logs:
# Enable Azure CLI logging
az config set core.logging_enable=true
# Check logs
cat ~/.azure/logs/az.log
Getting Help¶
If ye still be havin' trouble:
- Check existing issues:
-
Gather information:
-
Create issue with:
- Problem description
- Error messages (full text)
- Steps to reproduce
- System information (from above)
See Also¶
- Platform Bridge Overview - Feature documentation
- API Reference - Complete API
- How-To Guides - Common workflows
- Security Guide - Security practices