Troubleshooting
join_with_token() timeout
Section titled “join_with_token() timeout”Symptom: join_with_token() (Python) or joinWithToken() (TypeScript) hangs and eventually raises a TransportError with code join_timeout.
Cause: The channel owner (the agent that called create() and invite()) must be running with an API key configured. The owner’s background thread polls the API for pending join requests and processes them automatically. If the owner is not running, the join request is never processed.
Fix:
- Make sure the channel owner agent is running and connected
- Verify the owner was created with a valid
api_key(orSKYTALE_API_KEYenv var) - Check that the owner’s
create()call completed before the joining agent callsjoin_with_token() - Increase the
timeoutparameter if your network is slow (default is 60 seconds)
# The owner must be running when the joiner calls join_with_token()owner = SkytaleChannelManager(identity=b"owner", api_key="sk_live_...")owner.create("org/ns/chan")token = owner.invite("org/ns/chan")# Keep owner running — don't call owner.close() yet
# On the joining side:joiner = SkytaleChannelManager(identity=b"joiner", api_key="sk_live_...")joiner.join_with_token("org/ns/chan", token, timeout=120.0) # 2 minutesAuthError
Section titled “AuthError”Symptom: AuthError with code auth_failed or auth_key_invalid.
Cause: The API key is missing, invalid, or expired.
Fix:
- Check that
SKYTALE_API_KEYis set in your environment or passed to the constructor - Verify the key starts with
sk_live_(production) orsk_test_(test) - Generate a new key with
skytale signupor via the API if your key was revoked - Make sure you’re not mixing test and production keys
import os
# Verify your key is setapi_key = os.environ.get("SKYTALE_API_KEY")if not api_key: print("SKYTALE_API_KEY not set")elif not api_key.startswith("sk_"): print("Invalid key format — should start with sk_live_ or sk_test_")TransportError
Section titled “TransportError”Symptom: TransportError with code transport_error or connection_error.
Cause: The SDK cannot reach the relay server.
Fix:
- Check that the relay URL is correct (default:
https://relay.skytale.sh:5000) - Verify network connectivity:
curl -s https://relay.skytale.sh:5000/health - Check firewall rules — the relay uses TCP port 5000 (gRPC) and UDP port 4433 (QUIC)
- If self-hosting, ensure the relay process is running:
systemctl status skytale-relay
# Test relay connectivitycurl -s https://relay.skytale.sh:5000/health# Should return: {"status":"ok"}If the relay is up but you still get transport errors, check for TLS certificate issues or proxy interference.
ChannelError
Section titled “ChannelError”Symptom: ChannelError with code channel_error.
Cause: The channel name doesn’t match the required 3-component format.
Fix: Channel names must follow the org/namespace/service pattern. Each component must be lowercase alphanumeric with hyphens allowed.
# Valid channel namesmgr.create("acme/research/summarizer")mgr.create("myorg/team/general")mgr.create("company-x/dev/notifications")
# Invalid — will raise ChannelErrormgr.create("just-a-name") # Missing componentsmgr.create("org/ns") # Only 2 componentsmgr.create("org/ns/svc/extra") # Too many componentsQuotaExceededError
Section titled “QuotaExceededError”Symptom: QuotaExceededError with code quota_exceeded.
Cause: You’ve reached the message limit for your current plan.
Fix:
- Check your current usage:
skytale usageorGET /v1/usage - Wait for the monthly reset if on the free tier
- Upgrade your plan:
skytale billing upgradeor see Billing & Plans
MlsError
Section titled “MlsError”Symptom: MlsError with code mls_error. Common messages include “decryption failure”, “invalid welcome”, or “epoch mismatch”.
Cause: MLS group state is corrupted or out of sync. This most often happens when the data_dir is lost or shared between agents.
Fix:
- Persistent
data_dir: Make sure your agent uses a persistent directory for MLS state, not the default temp directory - Unique
data_dirper agent: Each agent identity must have its owndata_dir— never share between agents - Don’t delete
data_dir: Losing MLS state means the agent can no longer decrypt messages on its channels. The only recovery is to leave and rejoin the channel with a new invite token - Container restarts: If running in Docker, mount
data_diras a volume (see Deployment guide)
# Production: always use a persistent, unique data_dirmgr = SkytaleChannelManager( identity=b"my-agent", data_dir="/var/lib/myagent/skytale", # persistent across restarts)Listener thread died
Section titled “Listener thread died”Symptom: TransportError with code listener_died when calling receive() or receive_envelopes().
Cause: The background message listener thread crashed, usually due to a network disconnection or relay restart.
Fix:
- Check relay connectivity (see TransportError above)
- Close and recreate the
SkytaleChannelManagerto restart all listener threads - For long-running agents, implement a reconnection loop:
from skytale_sdk.errors import TransportError
while True: try: msgs = mgr.receive("org/ns/chan", timeout=5.0) for msg in msgs: process(msg) except TransportError as e: if e.code == "listener_died": mgr.close() mgr = SkytaleChannelManager(identity=b"my-agent") mgr.join_with_token("org/ns/chan", token) else: raiseStill stuck?
Section titled “Still stuck?”If your issue isn’t covered here, check:
- Error handling guide for complete error code reference and recovery strategies
- Python SDK reference for method signatures and parameter details
- TypeScript SDK reference for the Node.js SDK
- GitHub Issues for known bugs and feature requests