aws-samples / amazon-chime-react-native-demo

A React Native demo application for Android and iOS using the Amazon Chime SDK.
MIT No Attribution
101 stars 24 forks source link

If new attendee joins/leaves the tile gets black out #134

Closed chetangodiya-simformsolutions closed 2 years ago

chetangodiya-simformsolutions commented 2 years ago

Describe the bug When ever the attendee joins/leaves the live event then the other attendees who turned on their camera on gets black out from the host device

To Reproduce Steps to reproduce the behavior:

  1. Create an event
  2. make it live ask other user to join the event and turn on their camera
  3. then ask other user to joins the same event
  4. See the output

Expected behavior The host may not gets the black out the attendee video

Test environment Info (please complete the following information):

Additional context In some cases the same issue is there in android as well

dylonChime commented 2 years ago

Hi @chetangodiya-simformsolutions,

A few questions:

I assume by event, you mean meeting?

Can you try reproducing on the demo app? If this is not reproducible on the demo, can you provide the diff?

Can you provide logs?

chetangodiya-simformsolutions commented 2 years ago

@dylonChime

2022-03-14 16:21:06.090551+0530 MVP Vibe[57510:481815] [DEFAULT] NativeMobileSDKBridge - [034:359][208391] (video_client_impl.cc:2183): Setting pending service type to desired service type camerarx 2022-03-14 16:21:06.090678+0530 MVP Vibe[57510:481815] [DEFAULT] NativeMobileSDKBridge - [034:359][208391] (video_client_impl.cc:838): UpdateLocalTrack subscribed_servicetype=camerarx pending_servicetype=camerarx 2022-03-14 16:21:06.091869+0530 MVP Vibe[57510:481815] [DEFAULT] NativeMobileSDKBridge - [034:360][208391] (video_client_impl.cc:1594): Successfully created session description 2022-03-14 16:21:06.092438+0530 MVP Vibe[57510:481816] [DEFAULT] NativeMobileSDKBridge - [034:361][186115] (p2p_transport_channel.cc:466): Set ICE ufrag: A8XT pwd: GzOZ/fvpqsKk7jcp9fgxrWNx on transport audio 2022-03-14 16:21:06.092586+0530 MVP Vibe[57510:481815] [DEFAULT] NativeMobileSDKBridge - [034:361][208391] (sdp_offer_answer.cc:2458): Session: 2498995650309509803 Old state: stable New state: have-local-offer 2022-03-14 16:21:06.092715+0530 MVP Vibe[57510:481817] [DEFAULT] NativeMobileSDKBridge - [034:361][208131] (channel.cc:903): Setting local voice description for {mid: audio, media_type: audio} 2022-03-14 16:21:06.092868+0530 MVP Vibe[57510:481817] [DEFAULT] NativeMobileSDKBridge - [034:361][208131] (webrtc_voice_engine.cc:1469): WebRtcVoiceMediaChannel::SetRecvParameters: {codecs: [AudioCodec[111:opus:48000:0:2], AudioCodec[103:ISAC:16000:0:1], AudioCodec[104:ISAC:32000:0:1], AudioCodec[9:G722:8000:0:1], AudioCodec[102:ILBC:8000:0:1], AudioCodec[0:PCMU:8000:0:1], AudioCodec[8:PCMA:8000:0:1], AudioCodec[106:CN:32000:0:1], AudioCodec[105:CN:16000:0:1], AudioCodec[13:CN:8000:0:1], AudioCodec[110:telephone-event:48000:0:1], AudioCodec[112:telephone-event:32000:0:1], AudioCodec[113:telephone-event:16000:0:1], AudioCodec[126:telephone-event:8000:0:1]], extensions: [{uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 1}, {uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, id: 2}, {uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, id: 3}]} 2022-03-14 16:21:06.092977+0530 MVP Vibe[57510:480633] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MeetingObservers remoteVideoSourcesDidBecomeAvailableWithSources:]: unrecognized selector sent to instance 0x600000757860' First throw call stack: ( 0 CoreFoundation 0x00007fff20421af6 exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007fff20177e78 objc_exception_throw + 48 2 CoreFoundation 0x00007fff204306f7 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0 3 CoreFoundation 0x00007fff20425dc0 __forwarding + 859 4 CoreFoundation 0x00007fff20428068 _CF_forwarding_prep_0 + 120 5 AmazonChimeSDK 0x000000010d8e1fc0 block_destroy_helper + 288 6 AmazonChimeSDK 0x000000010d8e1f34 block_destroy_helper + 148 7 AmazonChimeSDK 0x000000010d8a2934 __swift_destroy_boxed_opaque_existential_0 + 644 8 AmazonChimeSDK 0x000000010d8a2600 swift_noop_void_return + 3520 9 AmazonChimeSDK 0x000000010d8e8135 block_destroy_helper + 581 10 AmazonChimeSDK 0x000000010d8e2afe block_destroy_helper.34 + 1950 11 libdispatch.dylib 0x000000010d9a97ec _dispatch_call_block_and_release + 12 12 libdispatch.dylib 0x000000010d9aa9c8 _dispatch_client_callout + 8 13 libdispatch.dylib 0x000000010d9b8e75 _dispatch_main_queue_callback_4CF + 1152 14 CoreFoundation 0x00007fff2038fdbb CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 15 CoreFoundation 0x00007fff2038a63e CFRunLoopRun + 2685 16 CoreFoundation 0x00007fff203896d6 CFRunLoopRunSpecific + 567 17 GraphicsServices 0x00007fff2c257db3 GSEventRunModal + 139 18 UIKitCore 0x00007fff24696cf7 -[UIApplication _run] + 912 19 UIKitCore 0x00007fff2469bba8 UIApplicationMain + 101 20 MVP Vibe 0x000000010a0f4ce0 main + 112 21 libdyld.dylib 0x00007fff2025a3e9 start + 1 22 ??? 0x0000000000000001 0x0 + 1 ) 2022-03-14 16:21:06.093029+0530 MVP Vibe[57510:481817] [DEFAULT] NativeMobileSDKBridge - [034:362][208131] (webrtc_voice_engine.cc:1637): Setting receive voice codecs. libc++abi.dylib: terminating with uncaught exception of type NSException 2022-03-14 16:21:06.093557+0530 MVP Vibe[57510:481817] [DEFAULT] NativeMobileSDKBridge - [034:362][208131] (channel.cc:894): Changing voice state, recv=0 send=1 for {mid: audio, media_type: audio} *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MeetingObservers remoteVideoSourcesDidBecomeAvailableWithSources:]: unrecognized selector sent to instance 0x600000757860' terminating with uncaught exception of type NSException CoreSimulator 732.18.6 - Device: iPhone 12 Pro Max (ACCAF447-1A05-43CC-82EA-DF4558255722) - Runtime: iOS 14.4 (18D46) - DeviceType: iPhone 12 Pro Max (lldb)

dylonChime commented 2 years ago

Your error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MeetingObservers remoteVideoSourcesDidBecomeAvailableWithSources:]: unrecognized selector sent to instance 0x600000757860'

indicates you are trying to use a newer release of the iOS SDK that supports remoteVideoSourcesDidBecomeAvailable.

Currently this React Native Demo only supports the AmazonChimeSDK and AmazonChimeSDKMedia versions linked in the README.

However, If you feel inclined you can add those APIs yourself and open a PR.

chetangodiya-simformsolutions commented 2 years ago

@dylonChime

the above issue is resolved now by using the sdk mentioned in the README but the issue is remains

dylonChime commented 2 years ago

I'm glad to hear it works. I'll close this for now. The README will be updated when we officially support newer versions.

chetangodiya-simformsolutions commented 2 years ago

@dylonChime only the error you mentioned was resolved the issues of black out attendee tile is remains

ziyiz-amzn commented 2 years ago

Can you try the RN demo app following the updated README? The latest version compatible with RN demo app for iOS is 0.19.1. It comes with CocoaPods support. I cannot reproduce this issue using the demo app.

chetangodiya-simformsolutions commented 2 years ago

@ziyiz-amzn i found the issue after installing the sentry and here what i found please click on the below line

**Invariant Violation Unable to find node on an unmounted component. mechanism onerror handled false

Crashed in non-app: node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in findCurrentFiberUsingSlowPath src/Screens/Lounges/component/RNVideoRenderView.js in callback at line 11:36

// we need to delay the bind video 
// Because "componentDidMount" will be called "immediately after the initial rendering occurs"
// This is *before* RCTUIManager add this view to register (so that viewForReactTag() can return a view)
// So we need to dispatch bindVideoView after this function complete
setTimeout(() => {
  NativeFunction.bindVideoView(findNodeHandle(this), this.props.tileId);
}, 500);**

https://sentry.io/share/issue/bbc3062b84fa446f80215c6c65d02e66/

AlkanV commented 1 year ago

@chetangodiya-simformsolutions hello, did you find any solution you have mentioned above? i have the same problem