Hi Sarath! Just a quick one, but are you using your own admin credentials? If you are, it's likely that you're receiving a 403, since we do not support admin credentials in our SDK. If that's not causing the issue, let me know and I'll take a look at this tomorrow.
I have similliar issue with RequestListActivity showing up but not loading requests on Android. In my case this issue only happens in release mode of app, when application is in debug this RequestListActivity loads properly and shows requests, but when APK is made it gets stuck at loading. I think that most likely there are some issues with proguard rules.
# Keep classes which may be lost by R8 when using the Support SDK
# Guide Main Screen
-keep class zendesk.support.HelpCenterSettings { *; }
-keep class zendesk.support.HelpResponse { *; }
-keep class zendesk.support.ArticlesListResponse { *; }
-keep class zendesk.support.CategoryItem { *; }
-keep class zendesk.support.SectionItem { *; }
-keep class zendesk.support.ArticleItem { *; }
-keep class zendesk.support.SeeAllArticlesItem { *; }
-keep class zendesk.support.guide.HelpCenterActivity { *; }
# Guide Search Results
-keep class zendesk.support.guide.HelpSearchFragment { *; }
-keep class zendesk.support.ArticlesSearchResponse { *; }
-keep class zendesk.support.SearchArticle { *; }
-keep class zendesk.support.guide.HelpSearchRecyclerViewAdapter { *; }
-keep class zendesk.support.HelpCenterSearch { *; }
-keep class zendesk.support.Category { *; }
-keep class zendesk.support.Section { *; }
-keep class zendesk.support.Article { *; }
# Guide View Article
-keep class zendesk.support.guide.ArticleViewModel { *; }
-keep class zendesk.support.guide.ArticleConfiguration { *; }
-keep class zendesk.support.guide.ViewArticleActivity { *; }
-keep class zendesk.support.ArticleResponse { *; }
-keep class zendesk.support.ArticleVote { *; }
-keep class zendesk.support.ArticleVoteResponse { *; }
-keep class zendesk.support.ZendeskArticleVoteStorage { *; }
-keep class zendesk.support.AttachmentResponse { *; }
-keep class zendesk.support.HelpCenterAttachment { *; }
# Support Requests (Create, Update, List)
-keep class zendesk.support.request.** { *; }
-keep class zendesk.support.requestlist.** { *; }
-keep class zendesk.support.SupportSdkSettings { *; }
-keep class zendesk.support.Request { *; }
-keep class zendesk.support.CreateRequest { *; }
-keep class zendesk.support.Comment { *; }
-keep class zendesk.support.CommentResponse { *; }
-keep class zendesk.support.CommentsResponse { *; }
-keep class zendesk.support.EndUserComment { *; }
-keep class zendesk.support.ZendeskRequestStorage { *; }
-keep class zendesk.support.ZendeskRequestProvider { *; }
-keep class zendesk.support.CreateRequestWrapper { *; }
-keep class zendesk.support.UpdateRequestWrapper { *; }
-keep class zendesk.support.RequestsResponse { *; }
-keep class zendesk.support.RequestResponse { *; }
# Support Attachments
-keep class zendesk.support.UploadResponse { *; }
-keep class zendesk.support.UploadResponseWrapper { *; }
-keep class zendesk.support.ZendeskUploadProvider { *; }
-keep class zendesk.support.Attachment { *; }
# Core SDK
-keep class zendesk.core.** { *; }
# Gson
-keep class sun.misc.Unsafe { *; }
# Okio
-dontwarn okio.**
# Retrofit
-dontwarn retrofit2.Platform**
# Dagger
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
# OkHttp3: https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
## JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
## A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
## Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
## OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform
# Support SDK
-keepnames class zendesk.support.** { *; }
# Gson
-keep class sun.misc.Unsafe { *; }
# Okio
-dontwarn okio.**
# Retrofit
-dontwarn retrofit2.Platform**
# java-common
-dontwarn java.awt.Color
# Dagger
-dontwarn com.google.errorprone.annotations.*
#Picasso
-dontwarn com.squareup.okhttp.**
# MenuItems
-keep class android.support.v7.widget.SearchView { *; }
-keep class zendesk.support.request.ViewCellAttachmentMenuItem { *; }
-keep class zendesk.core.AuthenticationRequestWrapper { *; }
-keep class zendesk.core.PushRegistrationRequestWrapper { *; }
-keep class zendesk.core.PushRegistrationRequest { *; }
-keep class zendesk.core.PushRegistrationResponse { *; }
-keep class zendesk.core.ApiAnonymousIdentity { *; }
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod
# Retrofit does reflection on method and parameter annotations.
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
# Keep annotation default values (e.g., retrofit2.http.Field.encoded).
-keepattributes AnnotationDefault
# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit
# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>
# Keep inherited services.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface * extends <1>
# With R8 full mode generic signatures are stripped for classes that are not
# kept. Suspend functions are wrapped in continuations where the type argument
# is used.
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
# R8 full mode strips generic signatures from return types if not kept.
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
# With R8 full mode generic signatures are stripped for classes that are not kept.
-keep,allowobfuscation,allowshrinking class retrofit2.Response
# Retrofit
-dontwarn retrofit2.Platform**
-keep class retrofit2.** { *; }
# OkHttp
-dontwarn okhttp3.**
-keep class okhttp3.** { *; }
# Gson
-keep class com.google.gson.** { *; }
-dontwarn com.google.gson.**
# Zendesk
-keep class zendesk.** { *; }
-keep class zendesk.support.** { *; }
-keep class zendesk.core.** { *; }
-keep class zendesk.service.** { *; }
Adding these proguard rules resolved issue for me.
7 comments
Sarath
I have tried the following code after submitting the ticket the list page is not loading
version 5.2.0
0
Greg Katechis
0
Sarath
No not using admin credentials. I can see the portal is returning the settings from the below logs
2024-01-03 23:33:20.180 4258-4755 okhttp.OkHttpClient ****.******.******** I --> GET https://****.zendesk.com/api/private/mobile_sdk/settings/cfb729a7088e625e98dbe20e1***************.json
2024-01-03 23:33:20.229 564-578 CoreBackPreview system_server D Window{c74a7ad u0 ****.******.********/zendesk.support.requestlist.RequestListActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@20cee73, mPriority=0, mIsAnimationCallback=false}
2024-01-03 23:33:20.278 564-583 ActivityTaskManager system_server I Displayed ****.******.********/zendesk.support.requestlist.RequestListActivity for user 0: +359ms
2024-01-03 23:33:20.279 564-583 WindowManager system_server V Sent Transition #3259 createdAt=01-03 23:33:19.916 via request=TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=406 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=****.******.********/com.******.******.**.ui.activity.SplashActivity } baseActivity=ComponentInfo{****.******.********/com.******.******.**.ui.activity.HomeActivity} topActivity=ComponentInfo{****.******.********/zendesk.support.requestlist.RequestListActivity} origActivity=null realActivity=ComponentInfo{****.******.********/com.******.******.**.ui.activity.SplashActivity} numActivities=2 lastActiveTime=311011380 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{RemoteToken{652f400 Task{c9e2685 #406 type=standard A=10244:****.******.********}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 136 - 0, 0) topActivityInfo=ActivityInfo{90c543a zendesk.support.requestlist.RequestListActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}, remoteTransition = null, displayChange = null }
2024-01-03 23:33:20.279 564-583 WindowManager system_server V info={id=3259 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{2bc8ef5 u0 ****.******.********/zendesk.support.requestlist.RequestListActivity)/@0x522c05c sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1440, 3120) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{32c3a48 u0 ****.******.********/com.******.******.**.ui.activity.HomeActivity)/@0xefdd3ea sb=Rect(0, 0 - 1440, 3120) eb=Rect(0, 0 - 1440, 3120) d=0}]}
2024-01-03 23:33:20.287 787-834 WindowManagerShell com.android.systemui V onTransitionReady android.os.BinderProxy@a27a9df: {id=3259 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{2bc8ef5 u0 ****.******.********/zendesk.support.requestlist.RequestListActivity)/@0x7b2068a sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1440, 3120) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{32c3a48 u0 ****.******.********/com.******.******.**.ui.activity.HomeActivity)/@0xd8704fb sb=Rect(0, 0 - 1440, 3120) eb=Rect(0, 0 - 1440, 3120) d=0}]}
2024-01-03 23:33:20.287 787-834 WindowManagerShell com.android.systemui V Transition doesn't have explicit remote, search filters for match for {id=3259 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{2bc8ef5 u0 ****.******.********/zendesk.support.requestlist.RequestListActivity)/@0x7b2068a sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1440, 3120) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{32c3a48 u0 ****.******.********/com.******.******.**.ui.activity.HomeActivity)/@0xd8704fb sb=Rect(0, 0 - 1440, 3120) eb=Rect(0, 0 - 1440, 3120) d=0}]}
2024-01-03 23:33:20.287 787-834 WindowManagerShell com.android.systemui V start default transition animation, info = {id=3259 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{2bc8ef5 u0 ****.******.********/zendesk.support.requestlist.RequestListActivity)/@0x7b2068a sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1440, 3120) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{32c3a48 u0 com.****/com.****.ui.activity.HomeActivity)/@0xd8704fb sb=Rect(0, 0 - 1440, 3120) eb=Rect(0, 0 - 1440, 3120) d=0}]}
2024-01-03 23:33:20.858 4258-4755 okhttp.OkHttpClient ****.******.******** I <-- 200 https://****.zendesk.com/api/private/mobile_sdk/settings/cfb729a7088e625e98dbe20e113819**********.json (677ms, unknown-length body)
0
Sarath
It would be very helpful if you can have a look thanks
0
Sarath
Hi Greg,
Have you got a chance to look at this ?
0
Jakub Szymanski
Hello
I have similliar issue with RequestListActivity showing up but not loading requests on Android. In my case this issue only happens in release mode of app, when application is in debug this RequestListActivity loads properly and shows requests, but when APK is made it gets stuck at loading. I think that most likely there are some issues with proguard rules.
0
Jakub Szymanski
Adding these proguard rules resolved issue for me.
0