Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC C SDK - Stuck in lwsWssCallbackRoutine(): Client is writable #462

Closed
getash opened this issue May 15, 2020 · 15 comments
Closed

WebRTC C SDK - Stuck in lwsWssCallbackRoutine(): Client is writable #462

getash opened this issue May 15, 2020 · 15 comments

Comments

@getash
Copy link

getash commented May 15, 2020

Hello there,

  1. Installed the webRTC SDK for Embedded devices on my Jetson TX2
  2. Execute make command to compile & build the samples
  3. Exported the appropriate credentials
    4.Ran ./kvsWebrtcClientMasterGstSample testchannel on the Jetson TX2
  4. On the mac, opened the https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html & entered the appropriate info with "testchannel" in the channel name
  5. Opened the "Start Viewer". Provided access to the webcam. The webcam is visible under "Viewer" while the "From Maser" is blank
  6. On Jetson command prompt, it gets stuck in "lwsWssCallbackRoutine(): Client is writable".
  7. Opened up AWS Management Console for AWS Kinesis. Opened the channel & tried to view the Media Playback viewer but it came back with the error - "Answer tried to set recv when offer did not send"

I am not attaching log but please message me directly if you need more information. Thanks!

@MushMal
Copy link
Contributor

MushMal commented May 15, 2020

@getash it's not yet clear whether the master sample is "stuck" or is awaiting for the signal.

It would be very helpful if you could try to run the other master sample with the pre-canned frames on the device (to eliminate the GStreamer) and send us the debug logs. You can either attach the log file to this issue or email them at kinesis-video-support@amazon.com

@getash
Copy link
Author

getash commented May 15, 2020

@MushMal I have attached the log for the GStreamer Master
log.txt

Ran the "./kvsWebrtcClientMaster testchannel" instead of GStreamer with same results. Please find the log attached in that as well.
log_clientmaster.txt

@chehefen
Copy link
Contributor

Hi @getash, can you do a packet capture sudo tcpdump -i any udp -w foo.pcap while running the master and send us the pcap file? thanks

@getash
Copy link
Author

getash commented May 15, 2020

@chehefen I have emailed the PCAP file to kinesis-video-support@amazon.com. Please do the needful.

@mateuszboryn
Copy link
Contributor

Hi, I also had "Answer tried to set recv when offer did not send".
I read elsewhere this might be specific to Firefox browser (@getash , what browser are you using btw?).
What helped in my case was modifying this file: src/source/PeerConnection/PeerConnection.c.
In function addTransceiver() I replaced
RTC_RTP_TRANSCEIVER_DIRECTION direction = RTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV;
with
RTC_RTP_TRANSCEIVER_DIRECTION direction = RTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY;
then I made some progress.
However this is not a permanent solution nor it made my usecase working.

@getash
Copy link
Author

getash commented May 18, 2020

@mateuszboryn Thank you for the information. I am using Firefox. Let me try it in another browser to see whether that fixes the issues. I shall also try the code changes you recommended today & let you know.

@chehefen @MushMal Any updates? Thanks!

@chehefen
Copy link
Contributor

@getash are you also hosting your TURN server? You may not have set it up correctly. There is a lot of 401s in the pcap. Based on your log you should be able to view the stream. Can you try to use chrome?

@getash
Copy link
Author

getash commented May 18, 2020

@chehefen I do not think so but let me try it on Chrome. I have tried Safari with the same results. I also tried @mateuszboryn recommendation of changing the PeerConnection with same results.

@getash
Copy link
Author

getash commented May 18, 2020

@chehefen Chrome works for both AWS Management Console & the testing kvs page. Does this mean that Kinesis WebRTC will not work for any other browser? Thanks!

@chehefen
Copy link
Contributor

Firefox's webrtc has different behaviors for different versions. We are trying to address them but right now chrome is the most stable.

@getash
Copy link
Author

getash commented May 18, 2020

@chehefen Are there any other way to work this around on the viewer end handling those? Any specific media player we can embed? Thanks!

@chehefen
Copy link
Contributor

I dont think you can get around that using media players. You can track this instead: awslabs/amazon-kinesis-video-streams-webrtc-sdk-js#49

@MushMal
Copy link
Contributor

MushMal commented May 21, 2020

@getash seems that the original issue has been answered. Could you please close this issue and if needed open a new one to track any further issues

@getash
Copy link
Author

getash commented May 21, 2020

@MushMal I believe the firefox issue is being tracked in awslabs/amazon-kinesis-video-streams-webrtc-sdk-js#49. If that is the case could you please confirm & provide an approximate timeline on this? Thanks!

@MushMal
Copy link
Contributor

MushMal commented May 21, 2020

Confirming - this is the enhancement. Unfortunately, we can't give precise ETAs.

I am going to resolve this issue in favor of the enhancement that we are tracking

@MushMal MushMal closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants