# Connection Issues
Diagnose and fix network connectivity problems
Can't connect to Vrex? This guide helps you diagnose and resolve common network issues.

## Quick Checks

Before diving deep, verify:

- [ ] Internet connection works (try opening google.com)
- [ ] You're using the correct login credentials
- [ ] Vrex isn't down (check status.vrex.no)
- [ ] Your subscription is active

## Common Error Messages

### "Cannot check access"

**Cause:** Vrex can't reach the API server.

**Solutions:**
1. Check if you're behind a proxy → [Proxy Configuration](/v2/it-networking/proxy/)
2. Verify firewall allows api.vrex.no
3. Run the diagnostic script below

### "Authentication failed"

**Cause:** Login servers unreachable or credentials wrong.

**Solutions:**
1. Verify email/password are correct
2. Check if auth0.com is blocked
3. Try resetting your password
4. For SSO users: verify IdP is accessible

### "Model failed to load"

**Cause:** CDN or storage blocked.

**Solutions:**
1. Allow cloudfront.net in firewall
2. Allow amazonaws.com in firewall
3. Check if SSL inspection is interfering

### "Connection timed out"

**Cause:** Network too slow or blocked.

**Solutions:**
1. Check network speed (need 50+ Mbps for streaming)
2. Switch to wired connection if on Wi-Fi
3. Verify no bandwidth throttling

## Diagnostic Script

Run this PowerShell script to test all endpoints:

```powershell
# Vrex Connectivity Test
Write-Host "=== Vrex Connectivity Diagnostic ===" -ForegroundColor Cyan
Write-Host ""

# Check proxy settings
Write-Host "1. Proxy Configuration:" -ForegroundColor Yellow
netsh winhttp show proxy
Write-Host ""

# Test endpoints
$endpoints = @{
    "API Server" = "https://api.vrex.no"
    "Auth Server" = "https://vrex.eu.auth0.com"
    "CDN" = "https://d1234567890.cloudfront.net"
    "Updates" = "https://vrex-releases.s3.eu-north-1.amazonaws.com"
}

Write-Host "2. Endpoint Tests:" -ForegroundColor Yellow
foreach ($name in $endpoints.Keys) {
    $url = $endpoints[$name]
    try {
        $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
        $response = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 10 -ErrorAction Stop
        $stopwatch.Stop()
        $time = $stopwatch.ElapsedMilliseconds
        Write-Host "   ✓ $name - OK (${time}ms)" -ForegroundColor Green
    } catch {
        Write-Host "   ✗ $name - FAILED" -ForegroundColor Red
        Write-Host "     URL: $url" -ForegroundColor Gray
        Write-Host "     Error: $($_.Exception.Message)" -ForegroundColor Yellow
    }
}

Write-Host ""
Write-Host "3. DNS Resolution:" -ForegroundColor Yellow
$domains = @("api.vrex.no", "vrex.eu.auth0.com")
foreach ($domain in $domains) {
    try {
        $ip = [System.Net.Dns]::GetHostAddresses($domain)[0].IPAddressToString
        Write-Host "   ✓ $domain → $ip" -ForegroundColor Green
    } catch {
        Write-Host "   ✗ $domain - DNS failed" -ForegroundColor Red
    }
}

Write-Host ""
Write-Host "=== End of Diagnostic ===" -ForegroundColor Cyan
```

## Step-by-Step Troubleshooting

### Step 1: Test Basic Connectivity

```powershell
Test-NetConnection -ComputerName api.vrex.no -Port 443
```

**If this fails:**
- Check firewall rules
- Verify DNS resolution
- Contact IT for network access

### Step 2: Check Proxy

```powershell
netsh winhttp show proxy
```

**If "Direct access" but using a proxy:**
- Configure WinHTTP proxy → [Proxy Configuration](/v2/it-networking/proxy/)

**If proxy is set but wrong:**
- Update to correct proxy settings

### Step 3: Test Authentication

1. Open browser to https://vrex.eu.auth0.com
2. Should load without errors
3. If blocked, IT needs to allow auth0.com

### Step 4: Test CDN Access

1. Try loading: https://cdn.vrex.no
2. Should redirect or show a page
3. If blocked, IT needs to allow cloudfront.net

### Step 5: Check SSL/TLS

Look for certificate errors:

```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://api.vrex.no" -UseBasicParsing
```

**If certificate errors:**
- SSL inspection may be interfering
- Proxy root cert may not be trusted
- See [Proxy Configuration](/v2/it-networking/proxy/)

## Network Requirements Summary

| Requirement | Minimum | Recommended |
|-------------|---------|-------------|
| Bandwidth | 50 Mbps | 100+ Mbps |
| Latency | < 100ms | < 50ms |
| Packet loss | < 2% | < 0.5% |

## Still Having Issues?

If diagnostics pass but Vrex still won't connect:

1. [Collect logs](/v2/troubleshooting/logs/)
2. Note the exact error message
3. Record when the issue started
4. Email support@vrex.no with all details

Include:
- Diagnostic script output
- Log files
- Screenshots of errors
- Network configuration details
