Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Upgrading Azure-Communication-Calling from 2.4.0 to 2.11.0 causing a run time error #1747

Open
3 tasks done
franciscerio opened this issue Nov 13, 2024 · 1 comment
Open
3 tasks done
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@franciscerio
Copy link

Describe the bug
After I updated our azure-communication-calling 2.4.0 to 2.11.0, I always encountered this issue.

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~tXVLgRgp34eEClMcw7o9fg==/com.app-41VBh9_g0OTEeBMgQoyVfg==/base.apk!/lib/arm64-v8a/libskypert.so"...
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1661)
at com.azure.android.communication.calling.CallClient.loadNativeLibraries(CallClient.java:404)
at com.azure.android.communication.calling.CallClient.(CallClient.java:413)

Exception or Stack Trace

FATAL EXCEPTION: main
Process: com.sample.app, PID: 22171
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~tXVLgRgp34eEClMcw7o9fg==/com.sample.app.preprod-41VBh9_g0OTEeBMgQoyVfg==/base.apk!/lib/arm64-v8a/libskypert.so"...
    at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
    at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
    at java.lang.System.loadLibrary(System.java:1661)
    at com.azure.android.communication.calling.CallClient.loadNativeLibraries(CallClient.java:404)
    at com.azure.android.communication.calling.CallClient.<clinit>(CallClient.java:413)
    at com.sample.app.common.communication.engine.AzureCallEngine.setup(AzureCallEngine.kt:89)
    at com.sample.app.ui.communication.call.ConsultationCallActivity.displayAppointmentDetails(ConsultationCallActivity.kt:481)
    at com.sample.app.ui.communication.call.ConsultationCallActivity.access$displayAppointmentDetails(ConsultationCallActivity.kt:55)
    at com.sample.app.ui.communication.call.ConsultationCallActivity$setupObserver$1$1.emit(ConsultationCallActivity.kt:206)
    at com.sample.app.ui.communication.call.ConsultationCallActivity$setupObserver$1$1.emit(ConsultationCallActivity.kt:203)
    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382)
    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:235)
    at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:191)
    at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:163)
    at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:474)
    at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:508)
    at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497)
    at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:368)
    at kotlinx.coroutines.flow.SharedFlowImpl.emitSuspend(SharedFlow.kt:503)
    at kotlinx.coroutines.flow.SharedFlowImpl.emit$suspendImpl(SharedFlow.kt:405)
    at kotlinx.coroutines.flow.SharedFlowImpl.emit(Unknown Source:0)
    at com.sample.app.ui.communication.call.ConsultationCallViewModel$getAppointmentDetails$1.invokeSuspend(ConsultationCallViewModel.kt:36)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.app.ActivityThread.main(ActivityThread.java:8919)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@f869684, Dispatchers.Main.immediate]

To Reproduce
Update dependency

Code Snippet
from

implementation 'com.azure.android:azure-communication-calling:2.4.0'
implementation 'com.azure.android:azure-communication-common:1.1.0'

to

implementation 'com.azure.android:azure-communication-calling:2.11.0'
implementation 'com.azure.android:azure-communication-common:1.2.1'

Expected behavior
Expected to run without runtime error

Screenshots
Sorry I can't, it's in production

Setup (please complete the following information):

  • OS: MacOS Monterey 12.5
  • IDE : Android Studio Ladybug | 2024.2.1 Patch 2
  • Version of the Library used :
    com.azure.android:azure-communication-calling:2.4.0
    com.azure.android:azure-communication-common:1.1.0

Additional context
Add any other context about the problem here.
Tried to do some version downgrade but I encountered a lot of issues aside from UnsatisfiedLinkError

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 13, 2024
@raosanat
Copy link
Member

raosanat commented Nov 18, 2024

There seems to be a similar issue reported here.

android/ndk#329

For anybody else in the future, who might have the same problem — I have tracked down the issue to NDK r16b and NDK r17b not working with each other properly.

I had a library compiled with NDK r16b and it required __emutls_get_address symbol (which was normally provided by libc++_shared.so from NDK r16b), however when later compiling my application with NDK r17b, the libc++_shared.so provided by the newer NDK no longer had the symbol inside. I fixed it by compiling both with NDK r16b, however compiling both with NDK r17b could possibly work as well.

Which version of Android NDK are you building with ?

@raosanat raosanat reopened this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants