Skip to content

UIAutomator Was Killed. No reason given #181

Description

@apandhi

I keep receiving this error.
RuntimeError: ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.

It seems to only happen sometimes. Other times, it's completely fine. Android 4.2.2

Here are my kwargs:
{'forceviewserveruse': False, 'useuiautomatorhelper': False, 'ignoreuiautomatorkilled': True, 'autodump': False, 'startviewserver': False, 'compresseddump': True}

Activity

  1. alvin777 commented on Feb 20, 2016

    @alvin777
    Contributor

    I think this is the issue. If it finds 'Killed' word anywhere in the dump it thinks that it's about the uiautomator process

    onlyKilledRE = re.compile('[\n\S]*Killed[\n\r\S]*', re.MULTILINE)
    if onlyKilledRE.search(received):
        ...
        raise RuntimeError('''ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.''' + extraInfo)
    
    
  2. apandhi commented on Feb 25, 2016

    @apandhi
    Author

    @alvin777 I tried removing that statement, turns out that UIAutomator is just spitting out "Killed" over and over again.

  3. dtmilano commented on Feb 25, 2016

    @dtmilano
    Owner

    Try

    $ adb shell
    $ uiautomator dump
    

    and verify if it's a uiautomator problem.

    On Thu, Feb 25, 2016 at 5:24 PM, Ashish Pandhi notifications@github.com
    wrote:

    @alvin777 https://github.com/alvin777 I tried removing that statement,
    turns out that UIAutomator is just spitting out "Killed" over and over
    again.

    —
    Reply to this email directly or view it on GitHub
    #181 (comment)
    .

    Have you read my blog ?
    http://dtmilano.blogspot.com
    android junit tests ui linux cult thin clients

  4. alvin777 commented on Feb 26, 2016

    @alvin777
    Contributor

    It's not a uiautomator issue. The regex '[\n\S]Killed[\n\r\S]' fires every time there's a word 'Killed' in an xml. Fixed that for myself replacing regex with 'Killed$'.

  5. dtmilano commented on Feb 26, 2016

    @dtmilano
    Owner

    You are correct!
    If the word "Killed" is found anywhere inside the dump this issue happens.
    Would you like to upload a pull request?

    On Fri, Feb 26, 2016 at 12:12 AM, Stanislav Krasnoyarov <
    notifications@github.com> wrote:

    It's not a uiautomator issue. The regex '[\n\S]Killed[\n\r\S]' fires
    every time there's a word 'Killed' in an xml. Fixed that for myself
    replacing regex with 'Killed$'.

    —
    Reply to this email directly or view it on GitHub
    #181 (comment)
    .

    Have you read my blog ?
    http://dtmilano.blogspot.com
    android junit tests ui linux cult thin clients

  6. alvin777 commented on Feb 26, 2016

    @alvin777
    Contributor

    Here you are: #184

  7. apandhi commented on Mar 4, 2016

    @apandhi
    Author

    Thanks @alvin777

  8. Ganesh6773 commented on May 21, 2018

    @Ganesh6773

    restarting adb server solved this issue for me.
    try :
    adb stop-server
    adb start server
    adb roo
    and then try to take screen dump

  9. dtmilano commented on May 21, 2018

    @dtmilano
    Owner

    @Ganesh6773 what was the problem you were seeing and what was the command used?
    Also, if you can specify adb version, android version, device model, etc. it would help identify your problem and solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions