cheets_ClipboardTest: Unhandled JsonRPCError: android.support.test.uiautomator.UiObjectNotFoundException |
|||||||
Issue descriptionThe test failed with an unclear message: https://pantheon.corp.google.com/storage/browser/chromeos-autotest-results/70017435-chromeos-test/chromeos4-row6-rack9-host12/debug/ Unhandled unicode: Unhandled JsonRPCError: JsonRPC Error code: -32002, Message: android.support.test.uiautomator.UiObjectNotFoundException: UiSelector[CLASS=android.widget.EditText] I don't see any obvious reason. Could it be some kind of flake? +sheriffs, please help me to find a right owner of this bug.
,
Jul 18 2016
Assign to test owner for now.
,
Jul 18 2016
From the screenshot taken at [1], it seems like the app crashed so the test wasn't able to continue [1] https://pantheon.corp.google.com/storage/browser/chromeos-autotest-results/70017435-chromeos-test/chromeos4-row6-rack9-host12/cheets_ClipboardTest/sysinfo/var/log/
,
Jul 18 2016
I guess it was flake because that is the only time I've seen this test fail. Please reopen if it fails again and I will look into it more
,
Jul 21 2016
https://uberchromegw.corp.google.com/i/chromeos/builders/cyan-cheets-chrome-pfq/builds/439 It failed in the PFQ preventing a roll. If this test is unreliable, we should remove it from bvt-cq and move it elsewhere.
,
Jul 21 2016
,
Jul 21 2016
P2 for now. Seems to be a crash that's worth investigating. Will bump to P1 if it flakes again.
,
Jul 21 2016
Happened again in following CQ run: https://uberchromegw.corp.google.com/i/chromeos/builders/veyron_minnie-cheets-paladin/builds/1617
,
Jul 21 2016
All of these failures are missing the logcat from /sysinfo/var/log/ The screenshots all show the app is crashing but I can't tell why and cannot reproduce locally with 10+ runs.
,
Jul 21 2016
I've re-opened an internal bug related to the missing logcat files.
,
Jul 21 2016
I managed to get the crash to reproduce (after 20-30 tries, sorry didn't count the exact number). On the bad run, I see the following in logcat output: 07-21 15:59:06.659 287 637 W ArcClipboardService: ClipboardHost not available 07-21 15:59:06.667 287 636 W ArcClipboardService: ClipboardHost not available 07-21 15:59:06.694 287 1033 W ArcClipboardService: ClipboardHost not available 07-21 15:59:06.695 1469 1469 D AndroidRuntime: Shutting down VM 07-21 15:59:06.695 287 350 W AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 4, track 44100 Hz, output 48000 Hz 07-21 15:59:06.697 21 356 D audio_hw_primary: out_set_parameters: kvpairs routing=2 --------- beginning of crash 07-21 15:59:06.712 1469 1469 E AndroidRuntime: FATAL EXCEPTION: main 07-21 15:59:06.712 1469 1469 E AndroidRuntime: Process: org.chromium.arc.testapp.clipboard, PID: 1469 07-21 15:59:06.712 1469 1469 E AndroidRuntime: java.lang.IllegalStateException: Could not execute method for android:onClick 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.view.View$DeclaredOnClickListener.onClick(View.java:4458) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.view.View.performClick(View.java:5204) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21174) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5524) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at android.view.View$DeclaredOnClickListener.onClick(View.java:4453) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: ... 9 more 07-21 15:59:06.712 1469 1469 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ClipData$Item android.content.ClipData.getItemAt(int)' on a null object reference 07-21 15:59:06.712 1469 1469 E AndroidRuntime: at org.chromium.arc.testapp.clipboard.ClipboardActivity.pasteButton(ClipboardActivity.java:54) 07-21 15:59:06.712 1469 1469 E AndroidRuntime: ... 11 more 07-21 15:59:06.714 287 811 W ActivityManager: Force finishing activity org.chromium.arc.testapp.clipboard/.ClipboardActivity
,
Jul 21 2016
Thanks! So the Android app crashes when it tries to paste nothing. Copying to the clipboard from chrome failed for some reason. I'll look at it. I'll move the test back to bvt-perbuild in the meantime
,
Jul 22 2016
It seems like we have a potential problem with startup timing here. Normally, the mojo message from Chrome to ClipboardInstance Init to set the ClipboardHost arrives before the app is running, but in the case where it fails it appears to have not yet happened (as evidenced by grepping the logcat output for ArcClipboardService and seeing that ArcClipboardService.init doesn't get called - it normally emits a log statement) I don't think there's anything inherently wrong with the test - by the time the application is running, the clipboard sync between Chrome and Android should be functioning (getPrimaryClip shouldn't be null either). I believe we'll have to be smart about deferring considering the system ready until this - and possibly other - services/hosts have initialized properly... In the short-term, I recommend we disable this test since it is flaky, even if the flakiness is rare, until the underlying issue is resolved.
,
Jul 22 2016
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/autotest-cheets/+/e66c846a61f477e4e2d0348e464ee9c78a59d491 commit e66c846a61f477e4e2d0348e464ee9c78a59d491 Author: David Haddock <dhaddock@chromium.org> Date: Thu Jul 21 23:50:02 2016
,
Jul 25 2016
I think we can close this bug now that it has been disabled on the CQ/PFQ. Real change is tracked here: https://buganizer.corp.google.com/u/0/issues/30291674 |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dshi@chromium.org
, Jul 18 2016Traceback (most recent call last): File "/usr/local/autotest/common_lib/test.py", line 600, in _exec _call_test_function(self.execute, *p_args, **p_dargs) File "/usr/local/autotest/common_lib/test.py", line 810, in _call_test_function raise error.UnhandledTestFail(e) UnhandledTestFail: Unhandled JsonRPCError: JsonRPC Error code: -32002, Message: android.support.test.uiautomator.UiObjectNotFoundException: UiSelector[CLASS=android.widget.EditText] Traceback (most recent call last): File "/usr/local/autotest/common_lib/test.py", line 804, in _call_test_function return func(*args, **dargs) File "/usr/local/autotest/common_lib/test.py", line 461, in execute dargs) File "/usr/local/autotest/common_lib/test.py", line 347, in _call_run_once_with_retry postprocess_profiled_run, args, dargs) File "/usr/local/autotest/common_lib/test.py", line 376, in _call_run_once self.run_once(*args, **dargs) File "/usr/local/autotest/tests/cheets_ClipboardTest/cheets_ClipboardTest.py", line 103, in run_once self.copy_from_chrome_to_android(extension, d) File "/usr/local/autotest/tests/cheets_ClipboardTest/cheets_ClipboardTest.py", line 61, in copy_from_chrome_to_android android_paste = device(className='android.widget.EditText').text File "/usr/local/autotest/deps/uiautomator/uiautomator/__init__.py", line 887, in __getattr__ info = self.info File "/usr/local/autotest/deps/uiautomator/uiautomator/__init__.py", line 898, in info return self.jsonrpc.objInfo(self.selector) File "/usr/local/autotest/deps/uiautomator/uiautomator/__init__.py", line 441, in wrapper return _method_obj(*args, **kwargs) File "/usr/local/autotest/deps/uiautomator/uiautomator/__init__.py", line 132, in __call__ "%s: %s" % (jsonresult["error"]["data"]["exceptionTypeName"], jsonresult["error"]["message"]) JsonRPCError: JsonRPC Error code: -32002, Message: android.support.test.uiautomator.UiObjectNotFoundException: UiSelector[CLASS=android.widget.EditText] Failed in copy_from_chrome_to_android android_paste = device(className='android.widget.EditText').text