dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.63k stars 347 forks source link

onlyKilledRE error #140

Open chenshifei opened 9 years ago

chenshifei commented 9 years ago

Hi, I'm now using SONY Z1 with stock Lollipop 5.0.2. Everytime when I execute dump it fails with these messages,

Traceback (most recent call last):
  File "dump", line 175, in <module>
    vc.dump(window=options[WINDOW])
  File "/Users/johnchen/Repo/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 3073, in dump
    raise RuntimeError('''ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.''' + extraInfo)
RuntimeError: ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.

Here's a part of the original received message from UIAutomator,

...bounds="[809,1603][1078,1768]"><node index="0" text="??" resource-id="android:id/title" class="android.widget.TextView" package="com.dianping.v1" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="true" bounds="[821,1600][1066,1759]" /></node></node></node><node index="1" text="" resource-id="com.dianping.v1:id/iv_titleshadow" class="android.widget.ImageView" package="com.dianping.v1" content-desc="???title??" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,225][1080,234]" /></node></hierarchy>Killed

As you can see "Killed" was appended and causes onlyKilledRE to raise an exception.

I suppose onlyKilledRE is used to detect whether the output contains "Killed" only. Could you take a look at this? Thanks in advance!

dtmilano commented 9 years ago

Are you setting ignoreuiautomatorkilled=True when creating the ViewClient object?

chenshifei commented 9 years ago

Yes, kwargs2 shows below,

{'startviewserver': True, 'forceviewserveruse': False, 'autodump': False, 'ignoreuiautomatorkilled': True}