citrix / citrix-mam-sdks

The MAM SDK instrument your apps to enable enforcing policies and controls that are configured in Citrix Endpoint Management.
https://developer.cloud.com/citrixworkspace/mobile-application-integration
11 stars 4 forks source link

Android SDK 34 support; crash. #98

Open JonasPrap opened 1 year ago

JonasPrap commented 1 year ago

Hello

We are updating our app to compileSdk=34 and targetSdk=34.

This seems to cause a crash in MAM SDK. Crash log below. In release notes I only saw support for Android 33. Is Android 34 not supported? What is the ETA for it's support? We need this fixed somehow.

Crash goes away if I change targetSdk to 33.

We are using implementation group: 'com.citrix.android.sdk', name: 'mamsdk', version: "23.7.0+"

Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'android.content.SharedPreferences$Editor android.content.SharedPreferences.edit()' on a null object referen at com.citrix.worx.sdk.SettingPreferences.UpdateWith(SettingPreferences.java:96) at com.citrix.worx.sdk.SettingPreferences.SendUpdateNotifForLevel(SettingPreferences.java:148) at com.citrix.worx.sdk.CtxLog.setLevel(CtxLog.java:288) at com.citrix.sdk.appcore.api.a.a(Unknown Source:17) at com.citrix.sdk.appcore.api.a.a(Unknown Source:78) at com.citrix.sdk.appcore.api.MamSdk.<init>(Unknown Source:14) at com.citrix.sdk.appcore.api.MamSdk.getInstance(Unknown Source:37) at com.citrix.mvpn.h.d.<init>(Unknown Source:10) at com.citrix.mvpn.h.b.a(Unknown Source:27) at com.citrix.mvpn.h.e.i(Unknown Source:16) at com.citrix.mvpn.h.e.a(Unknown Source:14) at com.citrix.mvpn.api.MicroVPNSDK.startTunnel(Unknown Source:9)

JonasPrap commented 1 year ago

It seems the cause of crash is this. Please fix::

Caused by: java.lang.SecurityException:: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at

LoggingSDK native libs loading failed com.citrix.sdk.core.exception.InitializationException: Failed to initialize Citrix Logging Framework: at com.citrix.sdk.core.api.CoreSdk.b(Unknown Source:102) at com.citrix.sdk.core.api.CoreSdk.c(Unknown Source:21) at com.citrix.sdk.core.api.CoreSdk.initialize(Unknown Source:24) at com.citrix.sdk.core.api.CoreSdk.getInstance(Unknown Source:23) at com.citrix.sdk.core.api.DiagContentProvider.onCreate(Unknown Source:14) at android.content.ContentProvider.attachInfo(ContentProvider.java:2619) at android.content.ContentProvider.attachInfo(ContentProvider.java:2589) at android.app.ActivityThread.installProvider(ActivityThread.java:7765) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7276) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6983) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.SecurityException: com.----: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755) at com.citrix.worx.sdk.SettingPreferences.RegisterReceiver(SettingPreferences.java:131) at com.citrix.worx.sdk.SettingPreferences.IntializeWithDefault(SettingPreferences.java:54) at com.citrix.worx.sdk.CtxLog.initialize(CtxLog.java:162) at com.citrix.worx.sdk.CtxLog.initialize(CtxLog.java:103) at com.citrix.sdk.core.api.CoreSdk.b(Unknown Source:6) at com.citrix.sdk.core.api.CoreSdk.c(Unknown Source:21)  at com.citrix.sdk.core.api.CoreSdk.initialize(Unknown Source:24)  at com.citrix.sdk.core.api.CoreSdk.getInstance(Unknown Source:23)  at com.citrix.sdk.core.api.DiagContentProvider.onCreate(Unknown Source:14)  at android.content.ContentProvider.attachInfo(ContentProvider.java:2619)  at android.content.ContentProvider.attachInfo(ContentProvider.java:2589)  at android.app.ActivityThread.installProvider(ActivityThread.java:7765)  at android.app.ActivityThread.installContentProviders(ActivityThread.java:7276)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6983)  at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loopOnce(Looper.java:205)  at android.os.Looper.loop(Looper.java:294)  at android.app.ActivityThread.main(ActivityThread.java:8177)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)  Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13908) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720) at android.os.Binder.execTransactInternal(Binder.java:1339) at android.os.Binder.execTransact(Binder.java:1275)

xingliangt commented 1 year ago

Thanks for your information. We will upgrade API34 based on priority