voxeet / voxeet-sdk-android Goto Github PK
View Code? Open in Web Editor NEWThe Dolby.io Communications SDK for Android.
License: Other
The Dolby.io Communications SDK for Android.
License: Other
Describe the bug
We have received one crash in VoxeetSDK on Firebase crashlytic. I am sharing its detail received.
Crash Log -
MediaSDK.java line 282
com.voxeet.sdk.media.MediaSDK.unlockPeerOperation
Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'boolean com.voxeet.sdk.media.peer.PendingPeerOperation.tryUnlock(com.voxeet.sdk.media.peer.Type, java.lang.String, com.voxeet.sdk.media.peer.SdpDescription)' on a null object reference
com.voxeet.sdk.media.MediaSDK.unlockPeerOperation
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.voxeet.sdk.media.peer.PendingPeerOperation.tryUnlock(com.voxeet.sdk.media.peer.Type, java.lang.String, com.voxeet.sdk.media.peer.SdpDescription)' on a null object reference
at com.voxeet.sdk.media.MediaSDK.unlockPeerOperation(MediaSDK.java:282)
at com.voxeet.sdk.media.MediaSDK.onSessionCreated(MediaSDK.java:159)
Specifications
Device - Redmi 9
OS - Android 10
Hello team,
We are getting ANRs and Crashes in Android SDK -
Here is the ANR from GooglePlay Console -
java.lang.IllegalStateException - org.webrtc.Camera2Enumerator.getDeviceNames
java.lang.RuntimeException:
at android.app.ActivityThread.installProvider (ActivityThread.java:6329)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:5918)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:5857)
at android.app.ActivityThread.-wrap3 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1699)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6682)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)
Caused by: java.lang.IllegalStateException:
at android.hardware.camera2.impl.CameraMetadataNative.nativeReadFromParcel (Native Method)
at android.hardware.camera2.impl.CameraMetadataNative.readFromParcel (CameraMetadataNative.java:360)
at android.hardware.camera2.impl.CameraMetadataNative$1.createFromParcel (CameraMetadataNative.java:301)
at android.hardware.camera2.impl.CameraMetadataNative$1.createFromParcel (CameraMetadataNative.java:299)
at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics (ICameraService.java:406)
at android.hardware.camera2.CameraManager.getOrCreateDeviceIdListLocked (CameraManager.java:678)
at android.hardware.camera2.CameraManager.getCameraIdList (CameraManager.java:98)
at org.webrtc.Camera2Enumerator.getDeviceNames (Camera2Enumerator.java:53)
at com.voxeet.sdk.media.camera.CameraContext.getDevicesName (CameraContext.java:48)
at com.voxeet.sdk.media.camera.CameraContext.<init> (CameraContext.java:36)
at com.voxeet.sdk.media.camera.CameraEnumeratorLollipopWrapper.<init> (CameraEnumeratorLollipopWrapper.java:9)
at com.voxeet.sdk.services.MediaDeviceService.<init> (MediaDeviceService.java:87)
at com.voxeet.VoxeetSDK.createServices (VoxeetSDK.java:432)
at com.voxeet.VoxeetSDK.<init> (VoxeetSDK.java:183)
at com.voxeet.VoxeetSDK.setApplication (VoxeetSDK.java:106)
at com.voxeet.sdk.manifests.VoxeetSdkProvider.init (VoxeetSdkProvider.java:17)
at com.voxeet.sdk.manifests.AbstractManifestComponentProvider.attachInfo (AbstractManifestComponentProvider.java:47)
at android.app.ActivityThread.installProvider (ActivityThread.java:6326)
Hi,
We use in our app your SDK and we noticed in our crashlytics following OOM issue:
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 64 byte allocation with 684664 free bytes and 668KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at java.lang.StringFactory.newStringFromChars(StringFactory.java:112)
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:937)
at java.lang.StringBuilder.substring(StringBuilder.java:77)
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:882)
at java.lang.StringBuilder.substring(StringBuilder.java:77)
at com.android.internal.os.LoggingPrintStream.flush(LoggingPrintStream.java:104)
at com.android.internal.os.LoggingPrintStream.println(LoggingPrintStream.java:294)
at java.lang.Throwable$WrappedPrintStream.println(Throwable.java:770)
at java.lang.Throwable.printStackTrace(Throwable.java:678)
at java.lang.Throwable.printStackTrace(Throwable.java:663)
at java.lang.Throwable.printStackTrace(Throwable.java:654)
at com.voxeet.audio2.manager.bluetooth.BluetoothHelper._invokeGetActiveDevice(BluetoothHelper.java:75)
at com.voxeet.audio2.manager.bluetooth.BluetoothHelper.lambda$getActiveDevice$0(BluetoothHelper.java:32)
at com.voxeet.audio2.manager.bluetooth.BluetoothHelper.$r8$lambda$lk1ifsRUzaLd5uN2o1UDXHOg484(BluetoothHelper.java)
at com.google.android.datatransport.cct.CctTransportBackend$$InternalSyntheticLambda$5$336599f63a7da87e09aad74b29d82ad56f2f4bae9c20995e3c2332eee6757743$0.apply$bridge(CctTransportBackend.java:47)
at com.voxeet.audio.utils.__Opt$Then.orNull(__Opt.java:86)
at com.voxeet.audio2.manager.bluetooth.BluetoothHelper.getActiveDevice(BluetoothHelper.java:32)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore$$InternalSyntheticLambda$6$ceeb8383a83a1f81d4dc191b62a96e3726169873abab997218a1ff0ada4df541$0.apply$bridge(SQLiteEventStore.java:117)
at com.voxeet.audio.utils.__Opt$Then.orNull(__Opt.java:86)
at com.voxeet.audio2.manager.bluetooth.BluetoothHeadsetServiceListener.getActiveDevice(BluetoothHeadsetServiceListener.java:93)
at com.voxeet.audio2.manager.BluetoothHeadsetDeviceManager.lambda$new$0(BluetoothHeadsetDeviceManager.java:89)
at com.voxeet.audio2.manager.BluetoothHeadsetDeviceManager.$r8$lambda$9FJS5R6nBcOJx_D6GTNyk6Qf0mE(BluetoothHeadsetDeviceManager.java)
at androidx.profileinstaller.ProfileInstallerInitializer$$InternalSyntheticLambda$1$0f795b3312dc1da540aed76dfe7be9153bc2dd822b10dd31dcd76fb9862960b5$0.run$bridge(ProfileInstallerInitializer.java:105)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Version: 3.8.0
BLUETOOTH_CONNECT
permission not granted and not not requested
Can you take a look on that? As this issue is one of our highest frequent issues within the app
For Android SDK 3.3.0 and later, when a participant is added to a conference with a conference.listen() call, the participant events are not being received by the participant that created the conference using a conference.broadcast() call, nor are the receiving particpants appearing in the broadcaster's participant list. If the receive only participants enter the conference using the conference.join call their participant events are seen by the broadcaster and they appear on the participant list.
However, this is inconsistent with existing clients in the field using the older SDK (3.2.3 or earlier) or iOS clients.
@codlab's edit : removed sensitive info
Hello Team,
We are facing an issue with ConferenceState. The issue is, the getScore() method of ConferenceStats class returns the same conference score for all of the participants. getScore() method take participant id as a parameter, and it should return the state of that participant but it returns the same state for all the participants over the conference.
Please take a look into this issue.
Thank you in advance.
Hi, we get following crash on app startup:
Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@21d96a8c: AdapterService getRemoteName
at com.android.bluetooth.Utils.checkPermissionForDataDelivery(Utils.java:460)
at com.android.bluetooth.Utils.checkConnectPermissionForDataDelivery(Utils.java:492)
at com.android.bluetooth.btservice.AdapterService$AdapterServiceBinder.getRemoteName(AdapterService.java:3031)
at com.android.bluetooth.btservice.AdapterService$AdapterServiceBinder.getRemoteName(AdapterService.java:3022)
at android.bluetooth.IBluetooth$Stub.onTransact(IBluetooth.java:1219)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)
We've spotted this in our crash reporting system and also users report this. The crash occurs only on two devices:
with Android 13 (but I guess it could be also Android 12).
While this looks like an OS-specific issue, or at least "different, more rigorous behavior", we obviously can't wait for Sony to fix this so we're looking for fix/workaround on our side.
We can't say for 100% that this crash is caused by Voxeet, but there's no other library in our app that may call Bluetooth APIs. Also we don't have any of those devices so we can't verify if detaching Voxeet from the app fixes the crash.
But what I've spotted in the code is that despite of some changes that were done when adjusting Voxeet SDK Android and Voxeet SDK Android Audio to not crash when BLUETOOTH_CONNECT
is not granted, there are still some android.bluetooth.*
APIs called from Voxeet that don't catch SecurityException
.
I'm looking at BluetoothHeadsetServiceListener
and in the constructor I can see following code
try {
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
} catch (VerifyError exception) {
Log.e(TAG, "BluetoothHeadsetMachine: VerifyError exception for this device. Please report", exception);
bluetoothAdapter = null;
exception.printStackTrace();
}
As you can see there's a call to obtain BluetoothAdapter
and it doesn't catch SecurityException
, only VerifyError
. This looks somehow related to the crash stacktrace where we can see AdapterService
class. Not sure if this is the only place, there could be other ones.
I'm wondering if Voxeet SDK could be more cautious when it comes to using any Bluetooth system API. I mean, any call to android.bluetooth.*
could be wrapped with try-catch block, so that any error raised by it won't stop the app from working, as Bluetooth is not a necessary functionality for the app/Voxeet SDK to work.
Let me know if you need any more details/information. We're using Voxeet Android SDK 3.8.0 at the moment.
We have received a new ANR in Voxeet SDK. Please look into this.
#00 pc 00000000000133dc /system/lib/libc.so (syscall+28)
#00 pc 00000000000a98db /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
#00 pc 000000000027d7f5 /system/lib/libart.so (art::GoToRunnable(art::Thread*)+756)
#00 pc 00000000000875c9 /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+8)
#00 pc 000000000001aba9 /system/framework/arm/boot.oat (Java_android_os_Debug_isProductShipNative__+92)
at android.os.Debug.isProductShipNative (Native method)
at android.os.Debug.isProductShip (Debug.java:1090)
at android.bluetooth.BluetoothHeadset.<clinit> (BluetoothHeadset.java:65)
at android.bluetooth.BluetoothAdapter.getProfileProxy (BluetoothAdapter.java:1886)
at com.voxeet.audio2.manager.bluetooth.BluetoothHeadsetServiceListener.connect (BluetoothHeadsetServiceListener.java:72)
at com.voxeet.audio2.manager.BluetoothHeadsetDeviceManager.<init> (BluetoothHeadsetDeviceManager.java:71)
at com.voxeet.audio2.AudioDeviceManager.<init> (AudioDeviceManager.java:44)
at com.voxeet.sdk.media.audio.SoundManager.<init> (SoundManager.java:85)
at com.voxeet.sdk.services.AudioService.preInitSounds (AudioService.java:105)
at com.voxeet.sdk.services.AudioService.<init> (AudioService.java:81)
at com.voxeet.VoxeetSDK.createServices (VoxeetSDK.java:429)
at com.voxeet.VoxeetSDK.<init> (VoxeetSDK.java:183)
at com.voxeet.VoxeetSDK.setApplication (VoxeetSDK.java:106)
at com.voxeet.sdk.manifests.VoxeetSdkProvider.init (VoxeetSdkProvider.java:17)
at com.voxeet.sdk.manifests.AbstractManifestComponentProvider.attachInfo (AbstractManifestComponentProvider.java:47)
at android.app.ActivityThread.installProvider (ActivityThread.java:5437)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:5032)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4972)
at android.app.ActivityThread.access$1600 (ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1491)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:135)
at android.app.ActivityThread.main (ActivityThread.java:5910)
at java.lang.reflect.Method.invoke! (Native method)
at java.lang.reflect.Method.invoke (Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1200)
I receive an StreamAddedEvent
with stream FakeMediaStream{tracks=[null], parent=com.voxeet.android.media.MediaStream@82abf423, audio=true}
when I enable video but there are no events if I enable/disable microphone. Is there any possibility to know when a participant enables/disables a microphone?
I found an ActiveParticipantsEvent
but it is not really something I can rely on because video call participants can speak with a muted microphone and remain silent with an enabled microphone.
Hello! I'm currently building an app using voxeet-sdk-android. I've noticed, that unlike iOS SDK this one does not provide conferenceAlias
in the invitation, so in order to obtain that alias we have to fetch the conference. But the following code provide me with a null value instead of a String. So why conferenceAlias
is nullable and, more important, when is it null
and when not?
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: InvitationReceivedNotificationEvent) {
val invitation = event.invitation
val conference = invitation.conferenceId?.let { VoxeetSDK.conference().getConference(it) } ?: return
result?.success(
hashMapOf(
"type" to NotificationEventType.INVITATION_RECEIVED.rawValue,
"conferenceId" to event.invitation.conferenceId,
"conferenceAlias" to conference.alias,
"participant" to event.invitation.inviter.info?.toJson()
)
)
}
Bug Description
Hi, According to the ConferenceJoinOptions in docs it says that "The conference access token received from the create or invite REST API. The conference access token is required to join a protected conference." But in my experience most of the times SDK allows to join the conference without the access token which is I guess might be the security vulnerability (unless it doesn't work like I supposed).
Expected Behaviour
It should always gives exception without the accessToken provided
Steps to Reproduce the Problem
Minimalistic code (recommended)
VoxeetSDK.conference().fetchConference(confId) .then(ThenPromise { conference: com.voxeet.sdk.models.Conference? -> conference?.let { val conferenceJoinOptions = ConferenceJoinOptions.Builder( it ).build() VoxeetSDK.conference().join(conferenceJoinOptions) } } as ThenPromise<com.voxeet.sdk.models.Conference?, com.voxeet.sdk.models.Conference>) .then<Any>(ThenVoid { Log.d("Voxeet","Success: ${it.toString()}") }) .error { if (it is ServerErrorException) { Log.e("ServerErrorException","Error: ${it.error}") } }
Specifications
Hi team,
We are getting this crash on firebase in voxeet SDK. Please fix this issue. Before calling join action I always ensure that the conference object is not null.
JoinPromise.java line 107
com.voxeet.sdk.services.conference.promises.JoinPromise.lambda$null$1$JoinPromise
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.lang.Throwable.printStackTrace()' on a null object reference
at com.voxeet.sdk.services.conference.promises.JoinPromise.lambda$null$1$JoinPromise(JoinPromise.java:107)
at com.voxeet.sdk.services.conference.promises.-$$Lambda$JoinPromise$Hl-R14PDmo4I9MBZ_ussG5Nb5WU.onError(:8)
at com.voxeet.promise.PromiseInOut.postAfterOnError(PromiseInOut.java:188)
at com.voxeet.promise.PromiseInOut.access$300(PromiseInOut.java:19)
at com.voxeet.promise.PromiseInOut$7.run(PromiseInOut.java:193)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:215)
at android.app.ActivityThread.main(ActivityThread.java:6910)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Logs:
D/WebSocketProxy: onMessage: websocket:=okhttp3.internal.ws.RealWebSocket@e3529cb message:={"type":"ActiveParticipantsEvent","thirdPartyId":"pbyFeR6rzVX9_0FMCGMDPQ==","conference":{"confId":"3aa1365b-efe9-4655-9324-8e82d3811719","confAlias":"gfft"},"participantCount":1,"participants":[{"userId":"c5471024-acb4-3cb5-91a3-d13ba1cbe903","externalId":"voxeet_sdk_flutter/0","externalName":"Aragorn#King of Gondor","participantStatus":"ON_AIR","participantType":"USER"}]}
D/VoxeetDispatcher: dispatch: SOCKET_TEXT := {"type":"ActiveParticipantsEvent","thirdPartyId":"pbyFeR6rzVX9_0FMCGMDPQ==","conference":{"confId":"3aa1365b-efe9-4655-9324-8e82d3811719","confAlias":"gfft"},"participantCount":1,"participants":[{"userId":"c5471024-acb4-3cb5-91a3-d13ba1cbe903","externalId":"voxeet_sdk_flutter/0","externalName":"Aragorn#King of Gondor","participantStatus":"ON_AIR","participantType":"USER"}]}
[ 1677074945.371 18849:19008 E/failed to decode command := Could not resolve type id 'ActiveParticipantsEvent' as a sunull
D/VoxeetDispatcher: dispatch: event internally managed
The way I subscribe on this event:
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: ActiveParticipantsEvent) {
...
}
and this method is never called.
SDK Version 3.7.1
In io.dolby:sdk:3.11.0
Maven POM file I can see that it depends on dynamic version of io.dolby:promise
:
<dependency>
<groupId>io.dolby</groupId>
<artifactId>promise</artifactId>
<version>[2.9.0,)</version>
<scope>compile</scope>
</dependency>
This way we can get an unwanted bump of this transitive dependency when it is released, which means that our dependencies can get silently bumped and possibly break the build/app without any explicit library bump/change in the project's source code.
Also this causes Gradle configuration cache misses:
Calculating task graph as configuration cache cannot be reused because cached version information for io.dolby:promise:[2.9.0,) has expired.
Could you please change the configuration so that the SDK depends on the specific version of the Promise library?
I've noticed, that even though WebSocketProxy
and VoxeetDispatcher
show participants' statuses as ON_AIR
:
D/WebSocketProxy(22720): onMessage: websocket:=okhttp3.internal.ws.RealWebSocket@446129a message:={"type":"ActiveParticipantsEvent","thirdPartyId":"JXwaZEUhMdGNiHIUZMzAyQ==","conference":{"confId":"...","confAlias":"..."},"participantCount":2,"participants":[{"userId":"...","externalId":"...","externalName":"Dr. Turko","participantStatus":"ON_AIR","participantType":"USER"},{"userId":"...","externalId":"...","externalName":"Saruman White","participantStatus":"ON_AIR","participantType":"USER"}],"viewerCount":0}
D/VoxeetDispatcher(22720): dispatch: SOCKET_TEXT := {"type":"ActiveParticipantsEvent","thirdPartyId":"JXwaZEUhMdGNiHIUZMzAyQ==","conference":{"confId":"...","confAlias":"..."},"participantCount":2,"participants":[{"userId":"...","externalId":"...","externalName":"Dr. Turko","participantStatus":"ON_AIR","participantType":"USER"},{"userId":"...","externalId":"...","externalName":"Saruman White","participantStatus":"ON_AIR","participantType":"USER"}],"viewerCount":0}
D/EventsFactory(22720): decode: event := ActiveParticipantsEvent
but in the received event those are actually ERROR
:
Log.d("ActiveParticipantsEvent", "Decoded ${event.participants}")
D/ActiveParticipantsEvent(22720): Decoded [Participant{id='...', participantInfo=ParticipantInfo{name='Dr. Turko', externalId='...', avatarUrl=''}, status=ERROR}, Participant{id='...', participantInfo=ParticipantInfo{name='Saruman White', externalId='...', avatarUrl=''}, status=ERROR}]
We have VoxeetSDK.initialize
method. Is there a way to "de-initialize" it?
Hello! I'm trying to create and join a conference on Android simulator and I'm getting this error:
W/System.err(12774): com.voxeet.android.media.errors.RemoteDescriptionError: Unable set remote SDP for Peer: 9e9cf9d6-427b-333e-be3a-774a40962007 :: Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='video'.
W/System.err(12774): at com.voxeet.sdk.media.MediaSDK.lambda$createAnswerForPeer$0$com-voxeet-sdk-media-MediaSDK(MediaSDK.java:108)
W/System.err(12774): at com.voxeet.sdk.media.MediaSDK$$ExternalSyntheticLambda2.run(Unknown Source:14)
W/System.err(12774): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
W/System.err(12774): at java.util.concurrent.FutureTask.run(FutureTask.java:264)
W/System.err(12774): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
W/System.err(12774): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
W/System.err(12774): at java.lang.Thread.run(Thread.java:1012)
So my question is it even possible to run a voxeet app on the emulator? Or it is suitable only for real devices?
My setup
macOS 13.2.1 22D68 darwin-arm
Android 13.0 arm64-v8a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.