microsoftconnect / ms-intune-app-sdk-android

Intune App SDK for Android enables data protection features and mobile app management via Microsoft Intune
45 stars 18 forks source link

Accessing an activity in a dynamic feature module throws a linkageError exception at runtime #233

Closed lseth03 closed 2 months ago

lseth03 commented 6 months ago

Dynamic feature module's activity crashes the application at runtime

Summary

I'm trying to add a dynamic feature module to an application that uses Intune, and every time I launch a FragmentActivity subclass from the dynamic feature module I get the following crash. The activity works fine if the module is added as part of the main apk. Other classes of dynamic feature module can be accessed with no issue. The issue is only with the activity class. There is a similar issue already reported - https://github.com/msintuneappsdk/ms-intune-app-sdk-android/issues/93. Please investigate and provide a solution for this.

Activity name - com.adobe.scansdk.ARScanSDKActivity

Process: com.adobe.reader, PID: 12489
**java.lang.LinkageError: Method void com.adobe.scansdk.ARScanSDKActivity.onCreate(android.os.Bundle) overrides final method in class Lcom/microsoft/intune/mam/client/app/MAMActivity; (declaration of 'com.adobe.scansdk.ARScanSDKActivity' appears in /data/app/~~pqNzXKGXQ9HegKYrSnVhjQ==/com.adobe.reader--Ttlbfj4JrqQASaH3A1Oqg==/base.apk!classes12.dex)**
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:607)
at java.lang.Class.forName(Class.java:512)
at com.adobe.reader.scan.ARScanSDKHelper.startScanSDKActivity(ARScanSDKHelper.kt:141)
at com.adobe.reader.dynamicFeature.ARDynamicFeatureWorkflowManager.startWorkflow(ARDynamicFeatureWorkflowManager.kt:114)
at com.adobe.reader.dynamicFeature.ARDynamicFeatureWorkflowManager.onWorkflowInvoked(ARDynamicFeatureWorkflowManager.kt:47)
at com.adobe.reader.home.fab.ARHomeFabMenu.handleFabItemClick(ARHomeFabMenu.java:114)
at com.adobe.reader.home.fab.ARHomeFabMenu$$ExternalSyntheticLambda0.onItemClicked(R8$$SyntheticClass:0)
at com.adobe.libs.acrobatuicomponent.contextboard.viewProviders.dialogFragments.AUIBaseContextBoardDialogFragment.lambda$populateView$0(AUIBaseContextBoardDialogFragment.java:135)
at com.adobe.libs.acrobatuicomponent.contextboard.viewProviders.dialogFragments.AUIBaseContextBoardDialogFragment.$r8$lambda$Qzj0WgxzxvuDzMdLmm7X0UmEtBE(AUIBaseContextBoardDialogFragment.java:0)
at com.adobe.libs.acrobatuicomponent.contextboard.viewProviders.dialogFragments.AUIBaseContextBoardDialogFragment$$ExternalSyntheticLambda0.onItemClicked(R8$$SyntheticClass:0)
at com.adobe.libs.acrobatuicomponent.contextboard.AUIContextBoardMenuAdapter$ViewHolderNormalItem.lambda$setItemClickListener$0(AUIContextBoardMenuAdapter.java:212)
at com.adobe.libs.acrobatuicomponent.contextboard.AUIContextBoardMenuAdapter$ViewHolderNormalItem.$r8$lambda$iIBtA4KVvfLXlwWZ6Dh9bZaWyR8(AUIContextBoardMenuAdapter.java:0)
at com.adobe.libs.acrobatuicomponent.contextboard.AUIContextBoardMenuAdapter$ViewHolderNormalItem$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:0)
at android.view.View.performClick(View.java:7896)
at android.view.View.performClickInternal(View.java:7873)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30886)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8567)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

To Reproduce

Add a new FragmentActivity in a dynamic feature module and access it from base app. The call to dynamic feature's activity throws a runtime exception.

Details

AndroidX Dependencies

If your app includes any AndroidX libraries, please list them here, along with the version info:

androidxCore = "1.10.1" androidxLifecycle = "2.4.1" androidxWorkManager = "2.8.1" androidxNavigation = "2.5.2" androidxStartupRuntime = "1.1.0" androidxDatastore = "1.0.0" androidxAnnotation = "1.7.1"

Third-Party Library Dependencies

manupa-ms commented 2 months ago

Hello @lseth03, apologies for the delayed response here. We are aware of this issue and are internally working on a fix which should be available soon.

rygo-msft commented 2 months ago

This has been fixed in the 10.4.1 release

mishramayank1 commented 1 month ago

Follow the guidance to configure the dynamic module with 10.4.1.