Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: do not kill adb on UNIX-like systems #1103

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

raphinesse
Copy link
Contributor

Motivation and Context

Closes #1098

Description

This basically reverts 66fa12a.

Testing

Unit tests pass & works for me on Linux

@codecov-io
Copy link

codecov-io commented Oct 20, 2020

Codecov Report

Merging #1103 into master will increase coverage by 0.35%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1103      +/-   ##
==========================================
+ Coverage   69.71%   70.06%   +0.35%     
==========================================
  Files          20       20              
  Lines        1806     1784      -22     
==========================================
- Hits         1259     1250       -9     
+ Misses        547      534      -13     
Impacted Files Coverage Δ
bin/templates/cordova/lib/build.js 33.33% <0.00%> (+2.22%) ⬆️
bin/templates/cordova/lib/device.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 335b0f2...d621b6d. Read the comment docs.

@NiklasMerz
Copy link
Member

I think my linux system is set up weirdly. I sometimes get an error when running the adb command that I am using a different version and it restarts. But looking at the log outputs in this PR this is somthing different. I can't really tell if this is still useful 🤷‍♂️ 😄

@raphinesse
Copy link
Contributor Author

I sometimes get an error when running the adb command that I am using a different version and it restarts.

Which adb command? It sounds like you are talking about app installation. That has not been touched here.

But looking at the log outputs in this PR this is somthing different. I can't really tell if this is still useful

I don't think I can follow you. Did you observe any change in behavior with the change from this PR?

@NiklasMerz
Copy link
Member

I did not test this PR locally, yet. Nevermind I was just thinking loud because I always had strange adb behaviour but that is most likely not caused by Cordova.

From the issue:

The problem this killall is supposed to solve might not even exist anymore. I remember adb losing devices a few years back but it hasn't happened to me in a long time. It would be great to know if someone still encounters these problems today on a regular basis. If not, we could simply put an end to all that killing 😉

I often have trouble with lost connections to my real device on a Linux machine. I feel this is problem with my setup and it's hard to reproduce properly.

This is probably a good change but I am unsure about how to test this👍

@raphinesse
Copy link
Contributor Author

This is probably a good change but I am unsure about how to test this

Yeah, it is hard to test in how far adb stability is still an issue. I would suggest we remove the current workaround and in case people report frequent hangs, we add a timeout to short-running adb commands.

@breautek
Copy link
Contributor

In my experience, at least on Linux, adb tools is a finicky program that barely works. Often I have to unplug the USB device and replug it in and ADB will start magically working again. I'm not sure if this is a problem we can solve on the Cordova side. Obviously 66fa12a was probably a good attempt but I don't think it solved the issue.

In the long term, I envision that we abandoned adb for most, if not all tasks anyway, and use the bundletool instead. If we're lucky it will fix all ADB related issues, and give us a whole brand new set of challenges 😄

Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@raphinesse
Copy link
Contributor Author

If nobody objects I will merge this into master soon. IMO this is more a fix than anything else.

Copy link
Member

@NiklasMerz NiklasMerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to me. Let's see if this is still a problem 👍

@raphinesse raphinesse added this to the 9.0.1 milestone Oct 22, 2020
@raphinesse raphinesse merged commit aada3e8 into apache:master Oct 22, 2020
@raphinesse raphinesse deleted the no-kill-adb branch October 22, 2020 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Killing all adb processes messes with following calls to adb devices
4 participants