Skip to content

Debugging isn't stopped by apk install failure #329

Closed

Description

@Skylled

Screenshot

The debugger is still trying its hardest.

The failure, on Flutter's side, is here. My guess is that either a signal is being sent and DC isn't picking it up, or there's no signal being sent here. I'll find time to test the same scenario with IntelliJ to see how it stacks up.

Activity

  1. Skylled commented on Jun 20, 2017

    @Skylled
    ContributorAuthor

    Relevant logs from IntelliJ

    [      +13 ms] C:\Android\sdk\platform-tools\adb -s LGH9107a67a5fd install -r build\app/outputs/apk/app.apk
    [    +1226 ms] Failed to install build\app/outputs/apk/app.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1076058160.tmp/base.apk using APK Signature Scheme v2: SHA-256 digest of contents did not verify]
    [{"event":"app.progress","params":{"appId":"f58301a2-7c89-48f9-bebb-0ea90965839f","id":"1","progressId":null,"finished":true}}]
    [       +3 ms] Error: ADB exited with exit code 1
    [            ] Warning: Failed to install APK.
    [            ] Error launching application on LG H910.
    [{"event":"app.stop","params":{"appId":"f58301a2-7c89-48f9-bebb-0ea90965839f"}}]
    [{"id":0,"error":"app 'f58301a2-7c89-48f9-bebb-0ea90965839f' not found"}]```
    
  2. added this to the milestone on Jun 21, 2017
  3. added
    in flutter
    on Jun 21, 2017
  4. DanTup commented on Jul 6, 2017

    @DanTup
    Member

    @Skylled Is there an easy way I can repro this sort of failure? I just tested by having no devices attached, but it seemed to handle it fine (flutter run terminated, which ends the debug session). Not sure if it's since been fixed or whether it's a different type of failure.

  5. Skylled commented on Jul 6, 2017

    @Skylled
    ContributorAuthor

    No, I wish. I can't even get a solid repro for the flutter devs. flutter run just quits when the problem comes up.

    It's an edge case, that I wish I wasn't part of.

  6. DanTup commented on Jul 6, 2017

    @DanTup
    Member

    I checked the code, and it looks like as long as flutter run terminated, we should disconnect fine (by sending TeminatedEvent). This isn't new code, so I wonder if flutter run isn't terminating correctly in this case.

    I'll see if I can repro by disconnecting the device during deployment or something.

  7. Skylled commented on Jul 6, 2017

    @Skylled
    ContributorAuthor

    Okay, so I traced out the error message Error launching application on {device} to runHot in resident_runner which is hooked into run in HotRunner, which is called by the flutter run command, and in this case should use throwToolExit to throw an exception and stop the program.

    Maybe it's abruptly ending, and not sending a signal to DC?

  8. DanTup commented on Jul 6, 2017

    @DanTup
    Member

    We hook when the process exits which should fire in all cases :( I'll see if disconnecting during deployment causes same behavior.. should be easy to fix if so!

  9. DanTup commented on Jul 7, 2017

    @DanTup
    Member

    Yanking the cable during an install results in same behaviour - debugger doesn't disconnect.

    Repro

  10. DanTup commented on Jul 7, 2017

    @DanTup
    Member

    I've raised flutter/flutter#11103 - seems like flutter run --machine is incorrectly (IMO) not terminating after an install failure.

  11. DanTup commented on Jul 7, 2017

    @DanTup
    Member

    I've added some code to terminate the flutter process when it sends an app.stop event in the meantime.

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

    in flutteris bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions