Investigate a way to avoid search bar ANRs in UI tests
Categories
(Firefox for Android :: UI Tests, task)
Tracking
()
People
(Reporter: ohorvath, Assigned: ohorvath)
References
Details
Attachments
(1 file)
There are many UI tests failing with ANRs, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268 or https://bugzilla.mozilla.org/show_bug.cgi?id=1830366
One common cause I've found was the opening of the search bar timed out (based on the last actions in the test logs).
This ticket is for investigating if we can go on this lead and improve the performance of our test app by removing some of the background work done while loading the search bar: search suggestions/search engines suggestion list/ etc. Ideally, this would be done through a feature setting, so we can toggle it depending on the test.
After it clicks the URL bar and opens the search bar:
04-26 16:29:59.849: W/InputDispatcher(556): Waiting because no window has focus but ActivityRecord{400f056 u0 org.mozilla.fenix.debug/org.mozilla.fenix.HomeActivity t11} may eventually add a window when it finishes starting up. Will wait for 5000ms
04-26 16:29:59.849: W/InputDispatcher(556): Still no focused window. Will drop the event in 4997ms
04-26 16:29:59.853: W/InputDispatcher(556): Still no focused window. Will drop the event in 4993ms
04-26 16:29:59.970: W/InputDispatcher(556): Still no focused window. Will drop the event in 4876ms
04-26 16:29:59.972: W/InputDispatcher(556): Still no focused window. Will drop the event in 4873ms
…..
04-26 16:30:05.620: I/WindowManager(556): Input event dispatching timed out sending to org.mozilla.fenix.debug/org.mozilla.fenix.HomeActivity. Reason: d87a0c9 org.mozilla.fenix.debug/org.mozilla.fenix.HomeActivity (server) is not responding. Waited 5007ms for KeyEvent(deviceId=-1, source=0x00000101, displayId=-1, action=UP, flags=0x00000000, keyCode=66, scanCode=0, metaState=0x00000000, repeatCount=0), policyFlags=0x6b000000
04-26 16:30:05.699: D/GeckoViewModule(9184): registerListener ["GeckoViewContent:ExitFullScreen","GeckoView:ClearMatches","GeckoView:DisplayMatches","GeckoView:FindInPage","GeckoView:HasCookieBannerRuleForBrowsingContextTree","GeckoView:RestoreState","GeckoView:ContainsFormData","GeckoView:ScrollBy","GeckoView:ScrollTo","GeckoView:SetActive","GeckoView:SetFocused","GeckoView:SetPriorityHint","GeckoView:UpdateInitData","GeckoView:ZoomToInput","GeckoView:IsPdfJs"]
04-26 16:30:06.213: W/IInputConnectionWrapper(9184): getSelectedText on inactive InputConnection
04-26 16:30:07.259: D/WindowManager(556): notifyANR took 1751ms
……
04-26 16:30:42.584: I/ActivityManager(556): Start proc 9706:org.mozilla.fenix.debug:tab18/u0a177 for service {org.mozilla.fenix.debug/org.mozilla.gecko.process.GeckoChildProcessServices$tab18}
04-26 16:30:42.584: W/ActivityManager(556): Slow operation: 1262ms so far, now at startProcess: starting to update pids map
04-26 16:30:42.587: W/ActivityManager(556): Slow operation: 1264ms so far, now at startProcess: done updating pids map
04-26 16:30:42.694: I/nix.debug:tab1(9706): Late-enabling -Xcheck:jni
04-26 16:30:42.903: W/lla.fenix.debu(9628): Verification of void org.mozilla.fenix.GleanMetrics.Metrics.<clinit>() took 164.307ms (2105.81 bytecodes/s) (7888B approximate peak alloc)
04-26 16:30:42.951: W/lla.fenix.debu(9628): Long monitor contention with owner DefaultDispatcher-worker-12 (9695) at java.io.InputStream android.content.res.AssetManager.open(java.lang.String, int)(AssetManager.java:880) waiters=4 in java.io.InputStream android.content.res.AssetManager.open(java.lang.String, int) for 148ms
04-26 16:30:43.235: E/SearchMiddleware(9628): Could not find migrated default search engine ()
04-26 16:30:43.307: E/SearchMiddleware(9628): Could not find migrated default search engine ()
Comment 1•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
The ANR issues were solved in most part by changing the selectors from using UIAutomator to other strategies. Closing this as it won't be needed anymore.
Description
•