CLN Onion Message Errors - Fix BOLT12 and Onion Routing Issues

CLN Onion Message Errors - Fix BOLT12 and Onion Routing Issues


What Are CLN Onion Messages?

Onion messages allow nodes to send encrypted messages over Lightning without creating a payment channel. Used by BOLT12 offers and other protocols.

Common Errors

  • onion_message: no route to peer
  • msg_connect_failed: peer does not support onion messages
  • onion_message_forward: blinding key mismatch
  • offer: failed to get reply via onion message

Check Onion Message Support

# Check if CLN has onion messages enabled
lightning-cli getinfo | python3 -c "
import json,sys
d=json.load(sys.stdin)
feats=d.get('our_features',{})
print('node_features:', feats.get('node','')[:40])
"

# Enable in config if disabled
# lightningd.conf:
experimental-onion-messages

Debug Onion Message Routing

# Check peer connectivity
lightning-cli listpeers | python3 -c "
import json,sys
for p in json.load(sys.stdin)['peers']:
  print(p['id'][:20], 'connected:', p['connected'])
"

# Try manual message send
lightning-cli sendcustommsg <peer_id> <hex_message>

BOLT12 Offer Fetch Failing?

# Test fetching an offer
lightning-cli fetchinvoice <bolt12_offer> 10000

# If it fails with onion message error:
# 1. Check both nodes have experimental-onion-messages
# 2. Ensure direct or indirect path exists between nodes
# 3. Try with --timeout flag
lightning-cli fetchinvoice <offer> 10000 --timeout=60

BOLT12 or onion message issues? DM on Nostr.

Report Page