bug: no feedback if android keychain is empty

Open
#7,885 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
54/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, react-native, typescript
Domain
mobile

Research direction

Start by locating the Android certificate application flow and how it handles the empty keychain result; the issue does not name files or tests. Reproduce on Android with an empty keychain, tap “Apply certificate,” and trace the result reported in the logcat excerpt. Done means the user receives visible feedback when there are no keys to choose from.

Written by the indexing model from the issue text.

Description

🐛 bug type: bug
Describe the Bug

If the android keychain is empty, the "apply certificate" button does nothing, and gives no feedback what's wrong.

Steps to Reproduce
  1. enter a valid URL
  2. Click on "Apply certificate"
Expected Behavior

Some kind of popup or toast

Actual Behavior

No response

Rocket.Chat Server Version

n/a

Rocket.Chat App Version

4.77.2.109999

Device Name

Fairphone 3

OS Version

Android 15

Additional Context

logcat filtered with rg -i 'rocket|keychain':

11-06 14:28:13.072  1695  2323 I ActivityTaskManager: START u0 {act=com.android.keychain.CHOOSER pkg=com.android.keychain cmp=com.android.keychain/.KeyChainActivity (has extras)} with LAUNCH_SINGLE_TOP from uid 10232 (sr=95619705) (BAL_ALLOW_VISIBLE_WINDOW) result code=0
11-06 14:28:13.073  2571  2625 V WindowManagerShell: Transition requested (#123): android.os.BinderProxy@9675bdd TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=5016 effectiveUid=10232 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=chat.rocket.android/chat.rocket.reactnative.MainActivity } baseActivity=ComponentInfo{chat.rocket.android/chat.rocket.reactnative.MainActivity} topActivity=ComponentInfo{com.android.keychain/com.android.keychain.KeyChainActivity} origActivity=null realActivity=ComponentInfo{chat.rocket.android/chat.rocket.reactnative.MainActivity} numActivities=2 lastActiveTime=4103663 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@8eda352} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 0 - 0, 0) topActivityInfo=ActivityInfo{85db623 com.android.keychain.KeyChainActivity} launchCookies=[android.os.BinderProxy@ff1c2a3] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isTopActivityNoDisplay=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=true isActivityStackTransparent=false lastNonFullscreenBounds=Rect(242, 513 - 838, 1593) capturedLink=null capturedLinkTimestamp=0 requestedVisibleTypes=-9 topActivityRequestOpenInBrowserEducationTimestamp=0 appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false eligibleForLetterboxEducation= false isLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false eligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 topActivityLetterboxAppWidth=-1 topActivityLetterboxAppHeight=-1 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false hasMinAspectRatioOverride=false topActivityLetterboxBounds=null cameraCompatTaskInfo=CameraCompatTaskInfo { freeformCameraCompatMode=inactive}} topActivityMainWindowFrame=null}, pipChange = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 123 }
11-06 14:28:13.186  3806  3835 D MeasurementService: bound by: GetServiceRequest[MEASUREMENT, packageName="chat.rocket.android", gmsVersion=12451000, scopes=[], extras=Bundle[{}], defaultFeatures=[], apiFeatures=[], supportsConnectionInfo=true]
11-06 14:28:13.202 15381 15381 I KeyChain: Requested by app uid 10232 to provide a private key alias
11-06 14:28:13.202 15381 15381 I KeyChain: Key types specified: []
11-06 14:28:13.202 15381 15381 I KeyChain: Issuers specified, will be listed later.
11-06 14:28:13.203  3806  3835 D MeasurementService: sendEvent(com.google.android.gms.measurement.internal.EventParcel@c7b1637) for AppMetadata[chat.rocket.android]
11-06 14:28:13.204  3806  3835 D MeasurementService: sendCurrentScreen(0, null, null, chat.rocket.android)
11-06 14:28:13.223  1695  2323 D CoreBackPreview: Window{50fb0f9 u0 com.android.keychain/com.android.keychain.KeyChainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@753769f, mPriority=0, mIsAnimationCallback=false, mOverrideBehavior=0}
11-06 14:28:13.241 15381 17032 I KeyChain: Alias provided by device policy client: null
11-06 14:28:13.241 15381 17032 I KeyChain: No keys to choose from
11-06 14:28:13.251  2571  2625 V WindowManagerShell:         {m=OPEN f=TRANSLUCENT|FILLS_TASK leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xf776720 sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=-1->0 r=-1->0:-1 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}
11-06 14:28:13.252  2571  2625 V WindowManagerShell: Transition doesn't have explicit remote, search filters for match for {id=123 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{m=OPEN f=TRANSLUCENT|FILLS_TASK leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xf776720 sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=-1->0 r=-1->0:-1 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}]}
11-06 14:28:13.253  2571  2625 V WindowManagerShell: start default transition animation, info = {id=123 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{m=OPEN f=TRANSLUCENT|FILLS_TASK leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xf776720 sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=-1->0 r=-1->0:-1 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}]}
11-06 14:28:13.271  1695  1872 I ActivityTaskManager: Displayed com.android.keychain/.KeyChainActivity for user 0: +201ms
11-06 14:28:13.272  1695  1872 V WindowManager: Sent Transition (#123) createdAt=11-06 14:28:13.050 via request=TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=5016 effectiveUid=10232 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=chat.rocket.android/chat.rocket.reactnative.MainActivity } baseActivity=ComponentInfo{chat.rocket.android/chat.rocket.reactnative.MainActivity} topActivity=ComponentInfo{com.android.keychain/com.android.keychain.KeyChainActivity} origActivity=null realActivity=ComponentInfo{chat.rocket.android/chat.rocket.reactnative.MainActivity} numActivities=2 lastActiveTime=4103663 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{RemoteToken{10375ed Task{d0283be #5016 type=standard A=10232:chat.rocket.android}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 0 - 0, 0) topActivityInfo=ActivityInfo{914933 com.android.keychain.KeyChainActivity} launchCookies=[android.os.BinderProxy@dc99470] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isTopActivityNoDisplay=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=true isActivityStackTransparent=false lastNonFullscreenBounds=Rect(242, 513 - 838, 1593) capturedLink=null capturedLinkTimestamp=0 requestedVisibleTypes=-9 topActivityRequestOpenInBrowserEducationTimestamp=0 appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false eligibleForLetterboxEducation= false isLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false eligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 topActivityLetterboxAppWidth=-1 topActivityLetterboxAppHeight=-1 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false hasMinAspectRatioOverride=false topActivityLetterboxBounds=null cameraCompatTaskInfo=CameraCompatTaskInfo { freeformCameraCompatMode=inactive}} topActivityMainWindowFrame=null}, pipChange = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 123 }
11-06 14:28:13.272  1695  1872 V WindowManager:         {m=OPEN f=TRANSLUCENT|FILLS_TASK leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0x4e992d8 sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=-1->0 r=-1->0:-1 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}
11-06 14:28:13.276  3806  3835 D MeasurementService: sendCurrentScreen(-1006956961168492952, NewServerView, NewServerView, chat.rocket.android)
11-06 14:28:13.278  1695  1872 V WindowManager:         {m=CLOSE f=TRANSLUCENT|FILLS_TASK|IS_OCCLUDED leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0x4e992d8 sb=Rect(0, 0 - 1080, 2160) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=0 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}
11-06 14:28:13.278  2571  2625 V WindowManagerShell:         {m=CLOSE f=TRANSLUCENT|FILLS_TASK|IS_OCCLUDED leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xc11c69b sb=Rect(0, 0 - 1080, 2160) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=0 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}
11-06 14:28:13.288  1695  2352 I ImeTracker: com.android.keychain:592d6e81: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW fromUser false
11-06 14:28:13.289 15381 15381 I ImeTracker: com.android.keychain:592d6e81: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
11-06 14:28:13.295  2571  2625 V WindowManagerShell: Transition doesn't have explicit remote, search filters for match for {id=124 t=CLOSE f=0x0 trk=0 r=[0@Point(0, 0)] c=[{m=CLOSE f=TRANSLUCENT|FILLS_TASK|IS_OCCLUDED leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xc11c69b sb=Rect(0, 0 - 1080, 2160) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=0 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}]}
11-06 14:28:13.296  2571  2625 V WindowManagerShell: start default transition animation, info = {id=124 t=CLOSE f=0x0 trk=0 r=[0@Point(0, 0)] c=[{m=CLOSE f=TRANSLUCENT|FILLS_TASK|IS_OCCLUDED leash=Surface(name=ActivityRecord{120154817 u0 com.android.keychain/.KeyChainActivity)/@0xc11c69b sb=Rect(0, 0 - 1080, 2160) eb=Rect(0, 0 - 1080, 2160) epz=Point(1080, 2160) d=0 bc=ff303030 component=com.android.keychain/.KeyChainActivity opt={t=FROM_STYLE mUserId=0}}]}
11-06 14:28:13.319  1695  2352 I ImeTracker: chat.rocket.android:7777d681: onRequestShow at ORIGIN_SERVER reason ATTACH_NEW_INPUT fromUser false
11-06 14:28:13.323  1695  2352 I ImeTracker: chat.rocket.android:ba00727: onRequestShow at ORIGIN_SERVER reason SHOW_RESTORE_IME_VISIBILITY fromUser false
11-06 14:28:13.411  1695  8237 D CoreBackPreview: Window{2948a63 u0 chat.rocket.android/chat.rocket.reactnative.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@7a63077, mPriority=0, mIsAnimationCallback=true, mOverrideBehavior=0}
11-06 14:28:13.411  1695  8237 D CoreBackPreview: Window{2948a63 u0 chat.rocket.android/chat.rocket.reactnative.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@79114e4, mPriority=0, mIsAnimationCallback=false, mOverrideBehavior=0}
11-06 14:28:13.499  1695  8237 I ImeTracker: chat.rocket.android:ba00727: onCancelled at PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED
11-06 14:28:13.529  1695  6832 D CoreBackPreview: Window{2948a63 u0 chat.rocket.android/chat.rocket.reactnative.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@97b8d4d, mPriority=0, mIsAnimationCallback=true, mOverrideBehavior=0}
11-06 14:28:13.568 15381 15381 D VRI[KeyChainActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-06 14:28:13.595  1695  6832 D CoreBackPreview: Window{50fb0f9 u0 com.android.keychain/com.android.keychain.KeyChainActivity}: Setting back callback null
11-06 14:28:13.713 15503 15503 I ImeTracker: chat.rocket.android:7777d681: onShown
Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 15h
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.ReactNative

All issues in RocketChat/Rocket.Chat.ReactNative

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.