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

Device still authorizing issue #608

Closed
lampi87 opened this issue Dec 22, 2018 · 6 comments
Closed

Device still authorizing issue #608

lampi87 opened this issue Dec 22, 2018 · 6 comments

Comments

@lampi87
Copy link

lampi87 commented Dec 22, 2018

On Windows 10 I'm facing the issue, that ionic cordova run android -lc aborts with message "error: device is still authorizing" if emulator wasn't already started.

I've adapted platforms/android/cordova/lib/emulator.js, starting at line 345 to

if ((error && error.message &&
(error.message.indexOf('not found') > -1)) ||
(error.message.indexOf('device offline') > -1) ||  
(error.message.indexOf('device still connecting') > -1) ||  
(error.message.indexOf('device still authorizing') > -1)) {

and issue is gone.

8.1.2 (cordova-lib@8.1.1)
Installed platforms:
android 7.1.4
ios 4.5.5
Available platforms:
browser ~5.0.1
osx ~4.0.1
windows ~6.0.0

@moose4lord
Copy link
Contributor

moose4lord commented Jan 13, 2019

I have this issue as well on macOS when trying to run the emulator for recent versions of Android. Running the emulator with the Android Marshmallow system image works fine, but Android Oreo throws the "device still authorizing" error after the emulator has started (the emulator starts, but the app doesn't).

This is the error message in case someone is googling for it:

Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output:
error: device still authorizing

It seems related to this issue from a few months ago:
https://issues.apache.org/jira/browse/CB-14165

Your patch to the platforms/android/cordova/lib/emulator.js file worked for me too. Thanks.

@ultimateglue
Copy link

I have this issue too on macOS. I'm running emulator on Nougat and after patching it as well as turning off and on USB Debugging to get RSA key fingerprint reauthorized, all is a Ok.

@janpio
Copy link
Member

janpio commented Jan 18, 2019

Could one of your please create a PR for that change in that file? Thanks.

@moose4lord
Copy link
Contributor

I'm a Git novice. Would probably muck it up if I tried to do it. :) The code change is trivial. Maybe someone with more Git experience could jump in.

@janpio
Copy link
Member

janpio commented Jan 18, 2019

Actually, you can do it all in the GitHub UI! Navigate to the file in this repository, click the pencil button to edit, make the changes, then save these changes by clicking the green button at the bottom in your fork (should happen automatically), then create a PR with hose changes. And boom, you learned something new and very useful :) (Let me know if it doesn't work, then I will look for some documentation for those steps)

@moose4lord
Copy link
Contributor

ok, I gave it a shot. Seems too easy. :) Although I don't know what the checkboxes at the bottom of the form were about. Seems like they weren't applicable to a Git project.

Sorry if I stole your thunder @lampi87. Since you first reported the problem, maybe I should have left the PR to you. Now I get all the glory and riches of being a Cordova contributor. Woohoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants