AgoraIO-Community / VideoUIKit-ReactNative

A React Native package to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
MIT License
93 stars 43 forks source link

Crash when tearing down AgoraUIKit component #112

Closed nbonatsakis closed 1 year ago

nbonatsakis commented 1 year ago

Target device: (Note: simulators are not supported for running the UIKit)

App Info

Describe the issue We have updated to the latest Agora RN UI Kit, version of Agora libs:

Whenever the app tears down AgoraUIKit, the app experiences a hard native crash.

To Reproduce Steps to reproduce the behavior:

Put the following code in an app, wiring up tokens as needed, then set the active useState to false

const renderAgoraCall = () => {
        if (!active) return null

        return <AgoraUIKit
            settings={{
                disableRtm: true,
                layout: Layout.Grid
            }}
            connectionData={{
                appId: ...,
                channel: ...,
                rtcToken: ...,
                rtcUid: ...,
            }}
            rtcCallbacks={{
                EndCall: () => {
                },
                JoinChannelSuccess: () => {
                },
            }}/>
    }

I was able to capture some logs leading up the crash by running the custom client in Xcode:

[2023-01-03 10:25:36.615] [13440] [debug] [iris_rtc_engine_impl.cc:132] ret 0 result {"result":0}
[2023-01-03 10:25:36.615] [13440] [debug] [iris_rtc_engine_impl.cc:49] IrisRtcEngineImpl Destroy
[2023-01-03 10:25:36.615] [13440] [debug] [iris_rtc_music_center_impl.cc:21] IrisMusiImpl Destroy
[2023-01-03 10:25:36.616] [13440] [debug] [iris_rtc_media_recoder_impl.cc:15] IrisMediaRecoderImpl Destroy
[2023-01-03 10:25:36.616] [13440] [debug] [iris_rtc_spatial_audio_engine_impl.cc:203] IrisLocalSpatialAudioEngineImpl Destroy
[2023-01-03 10:25:36.616] [13440] [debug] [iris_rtc_media_player_impl.cc:28] IrisMediaPlayerImpl Destroy
[2023-01-03 10:25:36.616] [13440] [debug] [iris_rtc_device_manager_impl.cc:25] IrisRtcDeviceManagerImpl Destroy
2023-01-03 10:25:36.618021-0500 ExpoLava[13440:7195300] [javascript] Leaving RTC channel
EkaanshArora commented 1 year ago

Hey I was able to reproduce the issue, I have released a hotfix 5.0.1-alpha.0 on NPM, can you try this version and see if it works as expected?

npm i agora-rn-uikit@5.0.1-alpha.0

I’ll merge this and release this as stable after some more testing.

nbonatsakis commented 1 year ago

Thank you so much for taking care of this. I just tried that alpha and it worked!

Please let me know when this hits the mainline and we’ll update.

Nick

Nick Bonatsakis Software Consultant Velocity Raptor http://velocityraptor.co/

On Jan 9, 2023 at 11:20:18 AM, Ekaansh Arora @.***> wrote:

Hey I was able to reproduce the issue, I have released a hotfix 5.0.1-alpha.0 https://www.npmjs.com/package/agora-rn-uikit/v/5.0.1-alpha.0 on NPM, can you try this version and see if it works as expected?

npm i @.***

I’ll merge this and release this as stable after some more testing.

— Reply to this email directly, view it on GitHub https://github.com/AgoraIO-Community/VideoUIKit-ReactNative/issues/112#issuecomment-1375897895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADDYX4YOOZEXHDQAOBGY53WRQ3EFANCNFSM6AAAAAATSABL4Q . You are receiving this because you authored the thread.Message ID: @.*** com>

EkaanshArora commented 1 year ago

5.0.1 is live :)