My device works but someone else gets error with s...
# ask-ai
h
My device works but someone else gets error with same token and same WSS url
t
Thanks for reaching out, Akshat. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm sorry to hear that one of your devices is having trouble connecting while the other works fine with the same token and WSS URL. This kind of issue often happens because of differences in network settings, device capabilities, or browser/platform configurations. But don't worry, we're here to work through this together! Here are some friendly steps you can try to troubleshoot: • Run the Connection Test Utility on the device that’s having trouble. This will help us check for any WebSocket, WebRTC, or TURN connectivity issues. • Make sure your network allows traffic on the necessary ports, like TCP 443 and UDP 7882. • Double-check that your device supports WebRTC and that no browser extensions (like ad blockers) might be interfering. • Also, verify that your system time is accurate and synchronized, as this can sometimes cause token expiration problems. If you try these steps and still run into issues, please don’t hesitate to reach out. We can dig deeper with more diagnostics or server-side checks to get this sorted out for you. Sources: Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki | Running LiveKit on AWS | Diagnosing Connection Errors with Connection Test Utility | livekit-api/src/signal_client/mod.rs | lib/src/core/signal_client.dart
h
It used to work before and the connection test is what is failing for some devices
t
I'm sorry to hear that the connection test is failing on some devices after it was working before. This can sometimes happen due to changes in network conditions, device settings, or updates. Let’s look at a few possible reasons and some steps you can take to investigate: • Network Changes: Sometimes switching from Wi-Fi to cellular, or changes in firewall or VPN settings, can block certain ports or protocols (like UDP, TURN, or TLS) that are needed. • Device-Specific Issues: There might be conflicts with background services or plugins on the device that could affect LiveKit’s connectivity. • App or SDK Updates: If there have been recent updates to the app or its dependencies, they might have introduced some compatibility issues or misconfigurations. Here are a few troubleshooting steps you might find helpful: • Try running the connection test on different networks (like switching from Wi-Fi to mobile data) to see if it’s related to a specific network. • Check that the necessary ports (such as TCP 443 and UDP 7882) are open and not blocked by firewalls or VPNs. • Make sure the app and SDK are updated and configured properly. If you’re still having trouble after trying these, please don’t hesitate to reach out. I’m here to help and we can look into more detailed diagnostics or server-side checks together. Sources: Connecting to LiveKit | LiveKit docs | Diagnosing Connection Errors with Connection Test Utility | [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss... | src/api/SignalClient.test.ts
h
Copy code
2025-11-03 13:08:34.448Z 2025-11-03T13:08:34.448Z       INFO    livekit service/roommanager.go:945      created TURN password   {"username": "T5mdZZVYEdFdENXafKIo4zpx0jOc0yoqoSOywao1EjGxm6tYOzsYgBGny7ocEiKiA", "password": "iBQ3pOaGlQClyRffL5evMV9hZbwfXiniSw7TbY1M9BxB"}
2025-11-03 13:08:49.657Z 2025-11-03T13:08:49.656Z       INFO    livekit rtc/participant.go:1097 participant closing     {"room": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "roomID": "RM_h3UCmSJyc9RU", "participant": "Utkarsh Srivastava  [Candidate]", "pID": "PA_isDtWDaVYvnS", "remote": false, "sendLeave": false, "reason": "SIGNAL_SOURCE_CLOSE", "isExpectedToResume": false}
2025-11-03 13:08:49.657Z 2025-11-03T13:08:49.657Z       INFO    livekit rtc/room.go:717 removing participant without connection {"room": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "roomID": "RM_h3UCmSJyc9RU", "participant": "Utkarsh Srivastava  [Candidate]", "pID": "PA_isDtWDaVYvnS", "remote": false, "subscriberCandidates": ["[local][trickle] udp4 host 98.70.56.178:52290 (resolved: 98.70.56.178:52290)", "[local][trickle] tcp4 host 98.70.56.178:7881 (resolved: 98.70.56.178:7881)"], "connectionType": "unknown", "reason": "SIGNAL_SOURCE_CLOSE", "clientInfo": {"sdk": "JS", "version": "2.15.12", "protocol": 16, "os": "Linux", "deviceModel": "Other", "browser": "Chrome", "browserVersion": "134.0.0"}}
2025-11-03 13:08:49.978Z 2025-11-03T13:08:49.976Z       INFO    livekit service/roommanager.go:394      starting RTC session    {"room": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "roomID": "RM_h3UCmSJyc9RU", "participant": "Utkarsh Srivastava  [Candidate]", "pID": "PA_wvCmf5G5JFeb", "remote": false, "room": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "nodeID": "ND_7apTixUc8ZMw", "numParticipants": 2, "participantInit": {"Identity": "Utkarsh Srivastava  [Candidate]", "Reconnect": false, "ReconnectReason": "RR_UNKNOWN", "AutoSubscribe": true, "Client": {"sdk": "JS", "version": "2.15.12", "protocol": 16, "os": "Linux", "deviceModel": "Other", "browser": "Chrome", "browserVersion": "134.0.0"}, "Grants": {"Identity": "", "Kind": "", "Video": {"RoomCreate": true, "RoomList": false, "RoomRecord": false, "RoomAdmin": false, "RoomJoin": true, "Room": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "CanPublish": true, "CanSubscribe": true, "CanPublishData": true, "CanPublishSources": [], "CanUpdateOwnMetadata": "not-set", "IngressAdmin": false, "Hidden": false, "Recorder": false, "Agent": false, "CanSubscribeMetrics": "not-set", "DestinationRoom": ""}, "SIP": {}, "RoomConfig": {"departureTimeout": 900}, "RoomPreset": ""}, "Region": "southindia", "AdaptiveStream": false, "ID": "", "SubscriberAllowPause": "not-set", "DisableICELite": false, "CreateRoom": {"name": "stginterview_477015cf-35a4-4a04-b4f3-c2f52b851035", "departureTimeout": 900}}}
t
It looks like the log entry with
SIGNAL_SOURCE_CLOSE
is telling us that the signaling connection was closed. This can happen for a few different reasons, such as: • Network hiccups, like WebSocket errors or timeouts. • Server-side closures, which might be due to room events or if a participant was removed. • Authentication issues, like an expired or invalid token. • Device or browser-specific quirks affecting WebRTC or WebSocket connections. To help you troubleshoot this, here are some steps you might try: • Take a closer look at the logs for more details, like close codes, reasons, or any error messages that came before this. • Turn on debug logging in the SDK to get more detailed info about why the connection closed. • Double-check that your network supports WebSocket traffic and that all necessary ports are open. • Make sure your token is still valid and hasn’t expired. If you’re able to share more details about the close event, like any error codes or specific reasons, I’d be happy to help you dig deeper and find the root cause. Sources: Connecting to LiveKit | LiveKit docs | Events and error handling | LiveKit docs | livekit/src/rtc_engine/rtc_session.rs | .github/ISSUE_TEMPLATE/bug_report.yaml | livekit-android-sdk/src/main/java/io/livekit/android/room/SignalClient.kt
h
Bro it used to work before
t
It’s great that the connection was working before! That tells us the issue might be related to some recent changes in your network environment, device settings, or updates to the app or SDK. Let’s try a few steps together to get to the bottom of this: • Could you check if there have been any new changes in your network, like firewalls, VPNs, or blocked ports? • Make sure the app and SDK are updated and set up properly. • Try running the connection test on different networks—for example, switching from Wi-Fi to mobile data—to see if the problem is tied to a specific network. • Turning on debug logging in the SDK can help us gather detailed info about the connection and any errors that pop up. If you’re still experiencing issues after these steps, please don’t hesitate to reach out. I’m here to help, and we can dive deeper with more diagnostics or server-side checks to find what’s causing the trouble.
h
Copy code
5-11-03 13:11:59.473Z github.com/pion/webrtc/v4.(*PeerConnection).undeclaredRTPMediaProcessor.func1
2025-11-03 13:11:59.473Z        /go/pkg/mod/github.com/pion/webrtc/v4@v4.1.1/peerconnection.go:1914
2025-11-03 13:12:03.514Z 2025-11-03T13:12:03.513Z       INFO    livekit.api     service/twirp.go:128    API RoomService.ListParticipants      {"service": "RoomService", "method": "ListParticipants", "room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "duration": "20.626219ms", "status": "200"}
2025-11-03 13:12:03.622Z 2025-11-03T13:12:03.621Z       INFO    livekit service/roommanager.go:743      removing participant    {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT", "participant": "EG_X5DzGekixDtu", "pID": "PA_oN3tfWirdJap", "remote": false}
2025-11-03 13:12:03.622Z 2025-11-03T13:12:03.621Z       INFO    livekit rtc/participant.go:1097 participant closing     {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT", "participant": "EG_X5DzGekixDtu", "pID": "PA_oN3tfWirdJap", "remote": false, "sendLeave": true, "reason": "SERVICE_REQUEST_REMOVE_PARTICIPANT", "isExpectedToResume": false}
2025-11-03 13:12:03.661Z 2025-11-03T13:12:03.661Z       INFO    livekit.api     service/twirp.go:128    API RoomService.RemoveParticipant     {"service": "RoomService", "method": "RemoveParticipant", "room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "participant": "EG_X5DzGekixDtu", "duration": "145.747691ms", "status": "200"}
2025-11-03 13:12:03.876Z 2025-11-03T13:12:03.876Z       INFO    livekit.room    service/roommanager.go:814      deleting room   {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT"}
2025-11-03 13:12:03.876Z 2025-11-03T13:12:03.876Z       INFO    livekit.room    rtc/room.go:937 closing room    {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT"}
2025-11-03 13:12:03.876Z 2025-11-03T13:12:03.876Z       INFO    livekit rtc/participant.go:1097 participant closing     {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT", "participant": "agent-AJ_C29MsTJBVRuE", "pID": "PA_s8zhSUXvTs6J", "remote": false, "sendLeave": true, "reason": "SERVICE_REQUEST_DELETE_ROOM", "isExpectedToResume": false}
2025-11-03 13:12:03.926Z 2025-11-03T13:12:03.926Z       INFO    livekit service/roommanager.go:175      deleting room state     {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77"}
2025-11-03 13:12:03.974Z 2025-11-03T13:12:03.974Z       INFO    livekit.room    service/roommanager.go:624      room closed     {"room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "roomID": "RM_6C6X9VLY4aXT"}
2025-11-03 13:12:03.978Z 2025-11-03T13:12:03.978Z       INFO    livekit.agents  agent/worker.go:514     job ended       {"workerID": "AW_XAdoqrRmKEyY", "agentName": "", "jobType": "JT_ROOM", "jobID": "AJ_C29MsTJBVRuE", "status": "JS_FAILED", "error": "agent worker left the room"}
2025-11-03 13:12:04.023Z 2025-11-03T13:12:04.023Z       INFO    livekit.api     service/twirp.go:128    API RoomService.DeleteRoom   {"service": "RoomService", "method": "DeleteRoom", "room": "stginterview_a0d0cfe7-3bba-46de-ba82-61d26bb32f77", "duration": "359.827962ms", "status": "200"}
2025-11-03 13:12:04.328Z 2025-11-03T13:12:04.328Z       INFO    livekit service/ioservice.go:159        received egress metrics {"egressID": "EG_X5DzGekixDtu", "avgCpu": 0.649876, "maxCpu": 0.84528303}
t
It looks like the log entries show that participants were removed and the room was deleted because of some administrative actions: • SERVICE_REQUEST_REMOVE_PARTICIPANT: This means someone was removed from the room using the
RemoveParticipant
API. • SERVICE_REQUEST_DELETE_ROOM: This means the whole room was deleted using the
DeleteRoom
API, which disconnected everyone. If these actions weren’t expected, it might be helpful to check any automated processes or API calls that could be causing these requests. Please feel free to reach out if you’d like me to help you look into this further—I’m here to support you! Sources: pkg/service/roomservice.go | Managing rooms | LiveKit docs