Debugging Amazon KVS with WebRTC error codes
When using Amazon KVS with WebRTC, you may run into some errors that can be hard to debug.
The first step is to check what error your error code maps to. This can be done by checking the amazon-kinesis-video-streams-webrtc-sdk-c repository.
In this case, the errors were:
ERROR iceAgentAddRemoteCandidate(): operation returned status code: 0x5a000005
ERROR iceAgentAddRemoteCandidate(): operation returned status code: 0x5a000003
ERROR handleRemoteCandidate(): operation returned status code: 0x5a000012
ERROR signalingMessageReceived(): operation returned status code: 0x5a000012
ERROR receiveLwsMessageWrapper(): operation returned status code: 0x5a000012
Looking up 0x5a000000 shows that the error will be related to WEBRTC ICE. There are three different error codes. Looking them up specifically, shows they are errors for:
0x5a000005 > STATUS_ICE_CANDIDATE_STRING_IS_TCP
0x5a000003 > STATUS_ICE_CANDIDATE_STRING_MISSING_I
0x5a000012 > STATUS_ICE_CANDIDATE_MISSING_CANDIDATE
This error presented itself when connecting to the viewer in the AWS Console through the KVS with WebRTC signaling channel media playback viewer.
In this case this was an issue that was presenting itself when trying to connect the viewer through a particular Virtual Private Network (VPN) that was blocking access.