How to Fix Excalidraw Collaboration Not Working
In this tutorial, you'll learn about How to Fix Excalidraw Collaboration Not Working. We cover key concepts, practical examples, and best practices.
Excalidraw live collaboration shows "Connecting..." indefinitely or participants cannot see each other's changes. WebSocket connections fail behind restrictive networks.
The Wrong Way
// Creating a new room without checking network
const room = await createRoom();
shareLink(room);
If the WebSocket is blocked, creating a new room does not help — the underlying connection still fails.
The Right Way
Step 1: Verify WebSocket connectivity
// In browser console:
const ws = new WebSocket('wss://excalidraw.com');
ws.onopen = () => console.log('WebSocket connected');
ws.onerror = () => console.log('WebSocket blocked');
If WebSocket fails, your network or browser is blocking WebSocket connections.
Step 2: Check the room URL
# A valid collaboration room URL looks like:
# https://excalidraw.com/#room=abc123-def456,SOME_BASE64_KEY
If the room ID is missing or the key is truncated, other participants cannot join. Re-share the link from the "Live Collaboration" button.
Step 3: Disable VPN and proxies
# VPNs often block WebSocket upgrade requests
# Temporarily disconnect from VPN and test collaboration
Corporate proxies may strip WebSocket headers. Use a direct connection or ask IT to whitelist wss://excalidraw.com.
Step 4: Use room name and password correctly
# When sharing a password-protected room:
# The link includes an encrypted key after the room ID
# Everyone must use the same link — do not modify it
If someone modifies the URL parameters, they join a different room or gain access errors.
Collaboration active: 3 participants drawing simultaneously, cursor positions visible, changes sync in under 200ms.
Prevention
- Test collaboration on the same network before a remote workshop.
- Keep the room link unchanged — any edit breaks the encryption key.
- The WebSocket reliability pattern is used in Doda Browser's sync feature, which falls back to long-polling when WebSockets are blocked.
Common Mistakes with collaboration not working
- Using
foldlinstead offoldl'causing stack overflow on large lists - Forgetting
deriving (Show, Eq)on custom data types needed for debugging - Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
These mistakes appear frequently in real-world EXCALIDRAW code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro