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

Cache cleaning error on some applications #1124

Closed
WildBlooded11 opened this issue Apr 7, 2024 · 3 comments · Fixed by #1152
Closed

Cache cleaning error on some applications #1124

WildBlooded11 opened this issue Apr 7, 2024 · 3 comments · Fixed by #1152
Labels
api: 34 A14 (Upside Down Cake) Automation Accessibility service related bug Something isn't working as expected c: AppCleaner

Comments

@WildBlooded11
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error: Log attached (please see below)

Expected behavior
App doesn't clean cache on some applications like google photos, google pay and then skips to the next application.

Smartphone (please complete the following information):

  • Device: REALME GT NEO 3
  • OS: ANDROID 14
  • Root status: NO
  • SD Maid 2/SE version 0.23.3-beta0

Debug log
If you can reproduce the bug, record the event in a debug log.
eu.darken.sdmse_logfile_1712471652776.log

Screenshots/Video
If applicable, add screenshots or a video if it helps to explain your problem.

Additional context
Add any other context about the problem here.

@WildBlooded11 WildBlooded11 added bug Something isn't working as expected triage This ticket needs to be sorted and labeled. labels Apr 7, 2024
@d4rken d4rken added c: AppCleaner Automation Accessibility service related and removed triage This ticket needs to be sorted and labeled. labels Apr 7, 2024
@d4rken
Copy link
Member

d4rken commented Apr 30, 2024

For the apps that failed, the system didn't provide SD Maid with the current screen-content.

2024-04-07T06:34:46.628Z  V/SDMSE:Automation:Crawler: doCrawl(): Attempt 4 for Spec(parent=SDMSE:AppCleaner:Automation:Realme:Specs, label=Find & click 'Storage' (targets=[Storage usage, Storage & cache, Storage, Storage space, Storage & memory]))
2024-04-07T06:34:46.628Z  D/SDMSE:Automation:Crawler: To dismiss any notification shade
2024-04-07T06:34:46.631Z  V/SDMSE:Automation:Crawler: Launching window intent: Intent { act=android.settings.APPLICATION_DETAILS_SETTINGS dat=package: flg=0x10818000 }
2024-04-07T06:34:46.853Z  V/SDMSE:Automation:Crawler: Waiting for window event filter to pass...
2024-04-07T06:34:47.939Z  D/SDMSE:Automation:Service: onAccessibilityEvent(eventType=4096)
2024-04-07T06:34:47.941Z  V/SDMSE:Automation:Service: New automation event: EventType: TYPE_VIEW_SCROLLED; EventTime: 134647200; PackageName: com.android.settings; MovementGranularity: 0; Action: 0; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: androidx.recyclerview.widget.RecyclerView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: true; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: 0; ScrollDeltaY: 0; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:47.946Z  V/SDMSE:Automation:Service: Fallback root was android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false, now is null
2024-04-07T06:34:47.993Z  V/SDMSE:Automation:Service: Providing event: EventType: TYPE_VIEW_SCROLLED; EventTime: 134647200; PackageName: com.android.settings; MovementGranularity: 0; Action: 0; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: androidx.recyclerview.widget.RecyclerView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: true; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: 0; ScrollDeltaY: 0; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:47.994Z  V/SDMSE:Automation:Crawler: Testing window event EventType: TYPE_VIEW_SCROLLED; EventTime: 134647200; PackageName: com.android.settings; MovementGranularity: 0; Action: 0; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: androidx.recyclerview.widget.RecyclerView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: true; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: 0; ScrollDeltaY: 0; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:47.995Z  V/SDMSE:Automation:Crawler: Waiting for window event filter passed!
2024-04-07T06:34:48.001Z  W/SDMSE:Automation:Service: Using fallback rootNode: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.001Z  V/SDMSE:Automation:Service: Providing window root: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.002Z  V/SDMSE:Automation:Crawler: Looking for viable window root, current nodes:
2024-04-07T06:34:48.006Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.006Z  V/SDMSE:Automation:Crawler: crawl():0: className=android.widget.FrameLayout, text='null', isClickable=false, isEnabled=true, viewIdResourceName=null, pkgName=com.android.settings
2024-04-07T06:34:48.008Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.009Z  D/SDMSE:Automation:Crawler: Not a viable root node: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false (spec=Spec(parent=SDMSE:AppCleaner:Automation:Realme:Specs, label=Find & click 'Storage' (targets=[Storage usage, Storage & cache, Storage, Storage space, Storage & memory])))
2024-04-07T06:34:48.175Z  D/SDMSE:Automation:Service: onAccessibilityEvent(eventType=32)
2024-04-07T06:34:48.176Z  V/SDMSE:Automation:Service: New automation event: EventType: TYPE_WINDOW_STATE_CHANGED; EventTime: 134646935; PackageName: com.android.settings; MovementGranularity: 0; Action: 0; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: android.widget.FrameLayout; Text: [Application icon]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: true; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: -1; ScrollDeltaY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:48.180Z  V/SDMSE:Automation:Service: Fallback root was android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false, now is null
2024-04-07T06:34:48.214Z  W/SDMSE:Automation:Service: Using fallback rootNode: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.214Z  V/SDMSE:Automation:Service: Providing window root: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.214Z  V/SDMSE:Automation:Crawler: Looking for viable window root, current nodes:
2024-04-07T06:34:48.216Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.217Z  V/SDMSE:Automation:Crawler: crawl():0: className=android.widget.FrameLayout, text='null', isClickable=false, isEnabled=true, viewIdResourceName=null, pkgName=com.android.settings
2024-04-07T06:34:48.219Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.221Z  D/SDMSE:Automation:Crawler: Not a viable root node: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false (spec=Spec(parent=SDMSE:AppCleaner:Automation:Realme:Specs, label=Find & click 'Storage' (targets=[Storage usage, Storage & cache, Storage, Storage space, Storage & memory])))
2024-04-07T06:34:48.229Z  V/SDMSE:Automation:Service: Providing event: EventType: TYPE_WINDOW_STATE_CHANGED; EventTime: 134646935; PackageName: com.android.settings; MovementGranularity: 0; Action: 0; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: android.widget.FrameLayout; Text: [Application icon]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: true; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: -1; ScrollDeltaY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:48.425Z  W/SDMSE:Automation:Service: Using fallback rootNode: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.425Z  V/SDMSE:Automation:Service: Providing window root: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:48.426Z  V/SDMSE:Automation:Crawler: Looking for viable window root, current nodes:
2024-04-07T06:34:48.429Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.430Z  V/SDMSE:Automation:Crawler: crawl():0: className=android.widget.FrameLayout, text='null', isClickable=false, isEnabled=true, viewIdResourceName=null, pkgName=com.android.settings
2024-04-07T06:34:48.432Z  D/SDMSE:Automation:Crawler:Common: Refresh success: false
2024-04-07T06:34:48.433Z  D/SDMSE:Automation:Crawler: Not a viable root node: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false (spec=Spec(parent=SDMSE:AppCleaner:Automation:Realme:Specs, label=Find & click 'Storage' (targets=[Storage usage, Storage & cache, Storage, Storage space, Storage & memory])))
2024-04-07T06:34:48.529Z  V/SDMSE:Automation:ScreenState: unregisterReceiver(eu.darken.sdmse.automation.core.ScreenState$state$1$receiver$1@6041140)
2024-04-07T06:34:48.531Z  V/SDMSE:Automation:ScreenState: state.onCompletion()
2024-04-07T06:34:48.531Z  W/SDMSE:Automation:Crawler: crawl(): Attempt 5 failed on Spec(parent=SDMSE:AppCleaner:Automation:Realme:Specs, label=Find & click 'Storage' (targets=[Storage usage, Storage & cache, Storage, Storage space, Storage & memory])):
kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 20000 ms

@d4rken
Copy link
Member

d4rken commented Apr 30, 2024

This looks similar to #1016 but in your case, this is only intermittently and works again for other apps. The apps itself, don't look special (e.g. not high security apps or system apps).

InstallId(pkgId=com.google.android.apps.photos, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.oplus.camera, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.google.android.apps.nbu.paisa.user, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.coloros.filemanager, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.sbi.lotusintouch, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.moveinsync.ets, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.coloros.alarmclock, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.snapwork.hdfc, userHandle=UserHandle2(handleId=0))
InstallId(pkgId=com.coloros.video, userHandle=UserHandle2(handleId=0))

🤔

@d4rken
Copy link
Member

d4rken commented Apr 30, 2024

This is interesting:

We successfully finish the Youtube app:

024-04-07T06:34:28.516Z  V/SDMSE:AppCleaner:Automation:Realme:Specs: Clicking on className=android.widget.Button, text='Clear cache', isClickable=true, isEnabled=true, viewIdResourceName=com.android.settings:id/button, pkgName=com.android.settings for NormalPkg(packageName=com.google.android.youtube, userHandle=UserHandle2(handleId=0)):
2024-04-07T06:34:28.516Z  V/SDMSE:Automation:Crawler:Common: Clicking on className=android.widget.Button, text='Clear cache', isClickable=true, isEnabled=true, viewIdResourceName=com.android.settings:id/button, pkgName=com.android.settings
2024-04-07T06:34:28.519Z  D/SDMSE:Automation:Crawler: Crawl was successful :)
2024-04-07T06:34:28.520Z  V/SDMSE:Automation:ScreenState: unregisterReceiver(eu.darken.sdmse.automation.core.ScreenState$state$1$receiver$1@808001a)
2024-04-07T06:34:28.520Z  V/SDMSE:Automation:ScreenState: state.onCompletion()
2024-04-07T06:34:28.521Z  D/SDMSE:Automation:AppCleaner:ClearCacheModule: Cleared default primary cache in 1867ms for NormalPkg(packageName=com.google.android.youtube, userHandle=UserHandle2(handleId=0)) 

but when going for the next app (photos app), we receive a delayed event about clicking clear cache in the youtube settings window, then when going for the photos app, the rootWindow does not seem to be ready and we crawl the last node we got via the event, so we crawl the previous root-node of the youtube app, and we never get a new node for the photos app?

2024-04-07T06:34:29.524Z  D/SDMSE:Automation:Service: onAccessibilityEvent(eventType=1)
2024-04-07T06:34:29.525Z  V/SDMSE:Automation:Service: New automation event: EventType: TYPE_VIEW_CLICKED; EventTime: 134628782; PackageName: com.android.settings; MovementGranularity: 0; Action: 16; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: android.widget.Button; Text: [Clear cache]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: false; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: -1; ScrollDeltaY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:29.528Z  V/SDMSE:Automation:Service: Fallback root was android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false, now is null
2024-04-07T06:34:29.576Z  V/SDMSE:Automation:Service: Providing event: EventType: TYPE_VIEW_CLICKED; EventTime: 134628782; PackageName: com.android.settings; MovementGranularity: 0; Action: 16; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: android.widget.Button; Text: [Clear cache]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: false; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: -1; ScrollDeltaY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:29.576Z  V/SDMSE:Automation:Crawler: Testing window event EventType: TYPE_VIEW_CLICKED; EventTime: 134628782; PackageName: com.android.settings; MovementGranularity: 0; Action: 16; ContentChangeTypes: []; WindowChangeTypes: [] [ ClassName: android.widget.Button; Text: [Clear cache]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; Enabled: false; Password: false; Checked: false; FullScreen: false; Scrollable: false; ImportantForAccessibility: true; AccessibilityDataSensitive: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: 0; ScrollY: 0; MaxScrollX: 0; MaxScrollY: 0; ScrollDeltaX: -1; ScrollDeltaY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null; DisplayId: 0 ]; recordCount: 0
2024-04-07T06:34:29.576Z  V/SDMSE:Automation:Crawler: Waiting for window event filter passed!
2024-04-07T06:34:29.587Z  W/SDMSE:Automation:Service: Using fallback rootNode: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
2024-04-07T06:34:29.587Z  V/SDMSE:Automation:Service: Providing window root: android.view.accessibility.AccessibilityNodeInfo@80006cfd; boundsInParent: Rect(0, 0 - 1080, 2412); boundsInScreen: Rect(0, 0 - 1080, 2412); boundsInWindow: Rect(0, 0 - 1080, 2412); packageName: com.android.settings; className: android.widget.FrameLayout; text: null; error: null; maxTextLength: -1; stateDescription: null; contentDescription: null; tooltipText: null; containerTitle: null; viewIdResName: null; uniqueId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; visible: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null]; isTextSelectable: false
```

d4rken added a commit that referenced this issue Apr 30, 2024
Stop using the root from accessibility events as fallback.
Delayed event emission can lead to an out-dated (and later recycled) root being used by the step-process.

Error behavior:

* Click event from app 1 is emitted when SD Maid starts processing app 2
* windowRoot of app 2 is not ready yet
* SD Maid starts using fallback root from the last event (the click event from app 2)
* The fallback root is no longer valid, as it corresponds to the settings screen from app 1
* SD Maids keeps retrying and the fallback root is at some point recycled
* SD Maid keeps trying to crawl an empty root nodef

Fixes #1124
Might fix #1016
d4rken added a commit that referenced this issue May 1, 2024
Stop using the root from accessibility events as fallback.
Delayed event emission can lead to an out-dated (and later recycled) root being used by the step-process.

Error behavior:

* Click event from app 1 is emitted when SD Maid starts processing app 2
* windowRoot of app 2 is not ready yet
* SD Maid starts using fallback root from the last event (the click event from app 2)
* The fallback root is no longer valid, as it corresponds to the settings screen from app 1
* SD Maids keeps retrying and the fallback root is at some point recycled
* SD Maid keeps trying to crawl an empty root nodef

Fixes #1124
Might fix #1016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: 34 A14 (Upside Down Cake) Automation Accessibility service related bug Something isn't working as expected c: AppCleaner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants