Skip to content

Commit 7cac8bd

Browse files
areinclaude
andauthored
feat(canary): add DNS diagnostics for register.walletconnect.com (#5237)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 132e819 commit 7cac8bd

2 files changed

Lines changed: 181 additions & 0 deletions

File tree

apps/laboratory/dns-check.sh

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
#!/bin/bash
2+
# DNS troubleshooting script for register.walletconnect.com
3+
# This script performs comprehensive DNS diagnostics without failing on errors
4+
5+
DOMAIN="register.walletconnect.com"
6+
URL="https://${DOMAIN}"
7+
OUTPUT_FILE="dns-output.txt"
8+
9+
{
10+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
11+
echo "🔍 DNS Troubleshooting Report for ${DOMAIN}"
12+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
13+
echo "Timestamp: $(date --iso-8601=seconds 2>/dev/null || date)"
14+
echo ""
15+
16+
# 1. Check current DNS resolver configuration
17+
echo "1️⃣ DNS Resolver Configuration"
18+
echo "────────────────────────────────────────────────────────"
19+
if [ -f /etc/resolv.conf ]; then
20+
echo "Contents of /etc/resolv.conf:"
21+
cat /etc/resolv.conf
22+
else
23+
echo "⚠️ /etc/resolv.conf not found"
24+
fi
25+
echo ""
26+
27+
# 2. DNS Resolution using different tools
28+
echo "2️⃣ DNS Resolution Tests"
29+
echo "────────────────────────────────────────────────────────"
30+
31+
# Try dig
32+
echo "Using dig:"
33+
if command -v dig &> /dev/null; then
34+
dig +short ${DOMAIN} || echo "⚠️ dig failed"
35+
echo ""
36+
echo "Full dig output with trace:"
37+
dig ${DOMAIN} +trace || echo "⚠️ dig +trace failed"
38+
else
39+
echo "⚠️ dig command not available"
40+
fi
41+
echo ""
42+
43+
# Try nslookup
44+
echo "Using nslookup:"
45+
if command -v nslookup &> /dev/null; then
46+
nslookup ${DOMAIN} || echo "⚠️ nslookup failed"
47+
else
48+
echo "⚠️ nslookup command not available"
49+
fi
50+
echo ""
51+
52+
# Try host
53+
echo "Using host:"
54+
if command -v host &> /dev/null; then
55+
host ${DOMAIN} || echo "⚠️ host failed"
56+
else
57+
echo "⚠️ host command not available"
58+
fi
59+
echo ""
60+
61+
# 3. Check DNS with public resolvers
62+
echo "3️⃣ Testing with Public DNS Resolvers"
63+
echo "────────────────────────────────────────────────────────"
64+
if command -v dig &> /dev/null; then
65+
echo "Google DNS (8.8.8.8):"
66+
dig @8.8.8.8 ${DOMAIN} +short || echo "⚠️ Failed to resolve via Google DNS"
67+
echo ""
68+
echo "Cloudflare DNS (1.1.1.1):"
69+
dig @1.1.1.1 ${DOMAIN} +short || echo "⚠️ Failed to resolve via Cloudflare DNS"
70+
else
71+
echo "⚠️ dig not available for public DNS tests"
72+
fi
73+
echo ""
74+
75+
# 4. Test network connectivity to resolved IPs
76+
echo "4️⃣ Network Connectivity Tests"
77+
echo "────────────────────────────────────────────────────────"
78+
79+
# Get IP addresses
80+
IPS=$(dig +short ${DOMAIN} 2>/dev/null || echo "")
81+
82+
if [ -n "$IPS" ]; then
83+
echo "Resolved IP addresses:"
84+
echo "$IPS"
85+
echo ""
86+
87+
# Test ping to first IP
88+
FIRST_IP=$(echo "$IPS" | head -n1)
89+
echo "Ping test to ${FIRST_IP}:"
90+
ping -c 3 -W 2 ${FIRST_IP} 2>&1 || echo "⚠️ Ping failed or timed out"
91+
else
92+
echo "⚠️ No IP addresses resolved - cannot perform connectivity tests"
93+
fi
94+
echo ""
95+
96+
# 5. Test HTTPS connectivity
97+
echo "5️⃣ HTTPS Connectivity Test"
98+
echo "────────────────────────────────────────────────────────"
99+
echo "Testing HTTPS connection to ${URL}:"
100+
if command -v curl &> /dev/null; then
101+
curl -v --connect-timeout 10 -I ${URL} 2>&1 || echo "⚠️ HTTPS connection failed"
102+
elif command -v wget &> /dev/null; then
103+
wget --timeout=10 --spider -v ${URL} 2>&1 || echo "⚠️ HTTPS connection failed"
104+
else
105+
echo "⚠️ Neither curl nor wget available for HTTPS test"
106+
fi
107+
echo ""
108+
109+
# 6. Traceroute to destination
110+
echo "6️⃣ Network Path Analysis"
111+
echo "────────────────────────────────────────────────────────"
112+
if [ -n "$IPS" ]; then
113+
FIRST_IP=$(echo "$IPS" | head -n1)
114+
echo "Traceroute to ${FIRST_IP}:"
115+
if command -v traceroute &> /dev/null; then
116+
traceroute -m 15 -w 2 ${FIRST_IP} 2>&1 || echo "⚠️ Traceroute failed"
117+
elif command -v tracepath &> /dev/null; then
118+
tracepath -m 15 ${FIRST_IP} 2>&1 || echo "⚠️ Tracepath failed"
119+
else
120+
echo "⚠️ No traceroute tool available"
121+
fi
122+
else
123+
echo "⚠️ Cannot perform traceroute - no IP resolved"
124+
fi
125+
echo ""
126+
127+
# 7. Check if domain is blocked or filtered
128+
echo "7️⃣ DNS Validation"
129+
echo "────────────────────────────────────────────────────────"
130+
if command -v dig &> /dev/null; then
131+
echo "Checking DNS response codes:"
132+
dig ${DOMAIN} | grep -E "status:|ANSWER:" || echo "⚠️ Could not extract status"
133+
fi
134+
echo ""
135+
136+
# 8. Summary
137+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
138+
echo "📋 Summary"
139+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
140+
141+
if [ -n "$IPS" ]; then
142+
echo "✅ DNS Resolution: SUCCESS"
143+
echo " Resolved IPs: ${IPS}"
144+
else
145+
echo "❌ DNS Resolution: FAILED"
146+
echo " Possible causes:"
147+
echo " - DNS server is unreachable or misconfigured"
148+
echo " - Domain does not exist or is not properly configured"
149+
echo " - Network/firewall blocking DNS queries"
150+
fi
151+
echo ""
152+
153+
# Test basic connectivity
154+
if curl -s --connect-timeout 5 -o /dev/null ${URL} 2>/dev/null; then
155+
echo "✅ HTTPS Connectivity: SUCCESS"
156+
else
157+
echo "❌ HTTPS Connectivity: FAILED"
158+
echo " Possible causes:"
159+
echo " - Firewall/security group blocking outbound HTTPS"
160+
echo " - SSL/TLS certificate issues"
161+
echo " - Server is down or unreachable"
162+
echo " - Network routing problems"
163+
fi
164+
165+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
166+
167+
} > "${OUTPUT_FILE}" 2>&1
168+
169+
echo "DNS troubleshooting complete. Results saved to ${OUTPUT_FILE}"

apps/laboratory/docker-canary.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#!/bin/bash
22
# Not adding `set -e` so that S3 upload happens regardless
33

4+
# Run DNS troubleshooting for register.walletconnect.com
5+
echo ""
6+
echo "🔍 Running DNS Diagnostics"
7+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
8+
bash ./dns-check.sh || true
9+
echo ""
10+
echo "📄 DNS Diagnostics Output"
11+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
12+
cat dns-output.txt || echo "⚠️ dns-output.txt not found"
13+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
14+
echo ""
15+
416
pnpm playwright:test:canary
517
TEST_EXIT_CODE=$?
618

0 commit comments

Comments
 (0)