aws / amazon-chime-sdk-component-library-react

Amazon Chime React Component Library with integrations with the Amazon Chime SDK.
Apache License 2.0
268 stars 160 forks source link

Content share not working from a ReactJS app to a NextJs app #824

Closed DiegoOno closed 2 years ago

DiegoOno commented 2 years ago

Hello,

We have two projects that can make a call, one implemented with ReactJs (app1) and one with NextJs(app2).

In one call, when both sides have their cameras on, and app1 starts a content sharing, app2 gets a blinking screen, because the value of sharingAttendeeId switches between the correct id and null cyclically. In the same situation, when app2 starts sharing, everything works as expected. Another situation is that when both cameras are turned off, the screen sharing works correctly.

The following gif is a demonstration, where on the left half is the ReactJs application (app1) and the right half is the application with NextJs (app2).

bug

We used the VideoTileGrid component in both applications.

xuesichao commented 2 years ago

@DiegoOno could you share the browser log and the meeting id? The meeting Id is the one from the call response of AWS.ChimeSDKMeetings.createMeeting API.

DiegoOno commented 2 years ago

Meeting Id: 1cda54c6-c365-4c47-8628-922ffe2f0706

Browser log: localhost-1658864568785.log

xuesichao commented 2 years ago

From our log I see the ContentShare of React JS attendee keeps dropping and rejoining.

@DiegoOno

  1. I can't find anything special in the browser log you provided. Could you enable the INFO level logging, remove any filter and share the browser log again?
  2. What is the rate for you to reproduce the issue? is it 100%?

Another situation is that when both cameras are turned off, the screen sharing works correctly.

  1. Is above statement always reproducible?
  2. Are you using any uplinkBandwidthPolicy or downlinkBandiwidthPolicy?

Meanwhile I will investigate why content share drops frequently on our side.

xuesichao commented 2 years ago

Also what happens if you join a meeting using React JS + React JS or Next.js + Next.js. Does issue still exist?

xuesichao commented 2 years ago

The issue seems to be related to WebSocket Connection and VP8 codec, tagging video team for help.

DiegoOno commented 2 years ago

What is the rate for you to reproduce the issue? is it 100%? If the cameras are on in both applications, the issue happens with 100%. I also tested it in when only one camera turned on. And in both situations (turned on in the React JS app or turned on in the Next JS app) the issues happens occur as well.

Another situation is that when both cameras are turned off, the screen sharing works correctly. Is above statement always reproducible? Yes, just in this case.

Also what happens if you join a meeting using React JS + React JS or Next.js + Next.js. Does issue still exist? We have never tested these cases, because there is only the call between the React Js application and the Next Js application.

DiegoOno commented 2 years ago

I got a log from the React JS application

reactjs.log

xuesichao commented 2 years ago

Got following messages from the reactjs.log. The logs are WARN level, not INFO level.

2022-07-27T11:42:22.823Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/CreateSDPTask error: Failed to execute 'createOffer' on 'RTCPeerConnection': Session error code: ERROR_CONTENT. Session error description: Failed to set local video description recv parameters for m-section with mid='1'..
2022-07-27T11:42:24.074Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/SetLocalDescriptionTask error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='1'.
2022-07-27T11:42:24.186Z [ERROR] SDK - failed to connect
2022-07-27T11:42:24.187Z [WARN] SDK - stopped pinging (WebSocketFailed)
2022-07-27T11:42:24.187Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling/OpenSignalingConnectionTask error: WebSocket connection failed
2022-07-27T11:42:25.551Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/SetLocalDescriptionTask error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='1'.
2022-07-27T11:42:25.634Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/CreateSDPTask error: Failed to execute 'createOffer' on 'RTCPeerConnection': Session error code: ERROR_CONTENT. Session error description: Failed to set local video description recv parameters for m-section with mid='1'..
2022-07-27T11:42:27.206Z [ERROR] SDK - failed to connect
2022-07-27T11:42:27.207Z [WARN] SDK - stopped pinging (WebSocketFailed)
2022-07-27T11:42:27.207Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling/OpenSignalingConnectionTask error: WebSocket connection failed
2022-07-27T11:42:27.412Z [ERROR] SDK - failed to connect
2022-07-27T11:42:27.412Z [WARN] SDK - stopped pinging (WebSocketFailed)
2022-07-27T11:42:27.413Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling/OpenSignalingConnectionTask error: WebSocket connection failed
2022-07-27T11:42:29.099Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/SetLocalDescriptionTask error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='1'.
2022-07-27T11:42:32.165Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/CreateSDPTask error: Failed to execute 'createOffer' on 'RTCPeerConnection': Session error code: ERROR_CONTENT. Session error description: Failed to set local video description recv parameters for m-section with mid='1'..
2022-07-27T11:42:33.294Z [WARN] SDK - stopped pinging (WebSocketFailed)
2022-07-27T11:42:33.295Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling/OpenSignalingConnectionTask error: WebSocket connection failed
2022-07-27T11:42:33.917Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession was canceled due to subtask AudioVideoUpdate/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/UpdateSession/SetLocalDescriptionTask error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='1'.
2022-07-27T11:42:34.086Z [WARN] SDK - stopped pinging (WebSocketFailed)
2022-07-27T11:42:34.087Z [WARN] SDK - will retry due to status code TaskFailed and error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling error: serial group task AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling was canceled due to subtask AudioVideoReconnect/c9b1a93a-b834-4ea6-94a4-2942930e0706/f824e503-c8d5-9bb3-b8c3-7c735f88037e#content/Timeout15000ms/Media/Signaling/OpenSignalingConnectionTask error: WebSocket connection failed
2022-07-27T11:42:36.247Z [WARN] SDK - release media stream called
2022-07-27T11:42:36.248Z [WARN] SDK - release media stream called

Errors from above log:

error: Failed to execute 'createOffer' on 'RTCPeerConnection': Session error code: ERROR_CONTENT. Session error description: Failed to set local video description recv parameters for m-section with mid='1'.
error: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Failed to set local video description recv parameters for m-section with mid='1'.
failed to connect
stopped pinging (WebSocketFailed)
error: WebSocket connection failed
xuesichao commented 2 years ago

@DiegoOno Can you provide us your browser version, platform version and OS version?

DiegoOno commented 2 years ago

My OS is Ubuntu 22.04LTS and my browser is Google Chrome on Version 103.0.5060.134 (Official Build) (64-bit).

DiegoOno commented 2 years ago
DiegoOno commented 2 years ago

Hello @xuesichao, have you had any feedback from the video team?

xuesichao commented 2 years ago

Hi @DiegoOno , sorry for the late reply. The logs you provided doesn't seem to be complete. It just has few lines and indicates the meeting has started correctly. It doesn't have any log regarding content share, attendee join, enable camera, etc. The log is supposed to be hundreds lines. This seems like an issue specific to ubuntu. We need logs to help us debug further. Could you please try to see if you could provide us the full log? The log should cover from before joining the meeting till end of the meeting, including the steps you need to reproduce the issue.

Could you also try to reproduce the same issue using our meeting demo the same way as your gif shows and let us know the result?

DiegoOno commented 2 years ago

Hi @xuesichao, sorry for late feedback. A few days ago we managed to fix the problem, just updating the version of amazon-chime-sdk-component-library-react and amazon-chime-sdk-js in our react project. I believe the issue was similar to issue #744. I'm closing this issue. Thank you for the support.