voxeet / voxeet-uxkit-cordova

Dolby.io UXKit for Cordova
Other
1 stars 14 forks source link

App crash when using broadcast method #15

Closed youssmak closed 4 years ago

youssmak commented 4 years ago

Describe the bug

The app crash when using broadcast method on iOS. The app works well replacing broadcast method by join method.

Expected Behaviour

Support broadcast method, and show user in fullscreen even if no user has joined the livestream yet (same as on Android)

Minimalistic code (recommended)

const { Voxeet, UserType } = VoxeetSDK;

Voxeet.initializeToken("YOUR_CONSUMER_KEY", "YOUR_CONSUMER_SECRET")
.then(() => Voxeet.defaultBuiltInSpeaker(true))
.then(() => Voxeet.defaultVideo(true))
.then(() => Voxeet.connect(new UserInfo(id, name, avatar)))
.then(() => Voxeet.create({alias: conferenceAlias}))
.then(result => Voxeet.broadcast(result.conferenceId))
.catch(err => alert(err));

Logs

[VoxeetSDK] 1.4.1.0
[VoxeetConferenceKit] 1.2.0.0
2019-07-23 13:16:05.092612+0200 app[521:49624] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x28134d200> to GL_RENDERBUFFER 1
2019-07-23 13:16:05.092680+0200 app[521:49624] Failed to make complete framebuffer object 8cd6
2019-07-23 13:16:05.092771+0200 app[521:49624] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x28134cdc0> to GL_RENDERBUFFER 1
2019-07-23 13:16:05.092799+0200 app[521:49624] Failed to make complete framebuffer object 8cd6
2019-07-23 13:16:05.092868+0200 app[521:49624] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x281349e60> to GL_RENDERBUFFER 1
2019-07-23 13:16:05.092894+0200 app[521:49624] Failed to make complete framebuffer object 8cd6
2019-07-23 13:16:05.439096+0200 app[521:49624] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(0x1b5cb127c 0x1b4e8b9f8 0x1b5c2ace8 0x1b5b9c754 0x100e210d8 0x100e21924 0x100f7e574 0x100e0ce4c 0x100e0ccb4 0x100e0f08c 0x1c52cce54 0x1c5430378 0x1c559b980 0x1c51bde44 0x1c537d930 0x1c51ae9b4 0x1c51b14a4 0x1bcdfa310 0x1bcdfa5d0 0x1b5c43018 0x1b5c42f98 0x1b5c42880 0x1b5c3d7bc 0x1b5c3d0b0 0x1b7e3d79c 0x1e25b7978 0x100dd90c8 0x1b57028e0)
libc++abi.dylib: terminating with uncaught exception of type NSException

Specifications

VTCoco commented 4 years ago

You should broadcast a message after joining a conference (.then(result => Voxeet.broadcast(result.conferenceId))).

-> create -> join -> broadcast message

youssmak commented 4 years ago

To be clear, i'm not using the sendBroadcastMessage method but the broadcast() one. My app still crash when joining before broadcasting :

const { Voxeet, UserType } = VoxeetSDK;
const user = {user: {type: UserType.LISTENER}};

Voxeet.initializeToken("YOUR_CONSUMER_KEY", "YOUR_CONSUMER_SECRET")
.then(() => Voxeet.defaultBuiltInSpeaker(true))
.then(() => Voxeet.defaultVideo(true))
.then(() => Voxeet.connect(new UserInfo(id, name, avatar)))
.then(() => Voxeet.create({alias: conferenceAlias}))
.then(result => Voxeet.join(result.conferenceId, listener ? user : {})
.then(result => Voxeet.broadcast(result.conferenceId))
.catch(err => alert(err));

It doesn't crash on Android with or without joining before broadcasting

VTCoco commented 4 years ago

Sorry @youssmak I misunderstood the question because I totally forgot that we had a broadcast method on Cordova which basically do a join with some internal options.

I’m working on a fix for the crash and do a basic join for iOS / Android compatibility.

codlab commented 4 years ago

Bundled within the 1.2.2, this adds the fix for iOS