alibaba / alibaba/macaca

[macaca-android-docker] device unauthorized

Open
#904 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
3.2k
Forks
418
PR merge metrics
No merged PRs in 30d

Description

* **Macaca Version**:
2.1.12
* **Macaca Doctor Logs**:
```
macaca-doctor version: 2.0.16

Node.js checklist:

node env: /opt/node-v9.8.0-linux-x64/bin/node
node version: v9.8.0

Android checklist:

JAVA version is `1.8`
JAVA_HOME is set to `/usr/lib/jvm/java-8-openjdk-amd64`
ANDROID_HOME is set to `/opt/android-sdk-linux`
Platforms is set to `/opt/android-sdk-linux/platforms/android-26`
ADB tool is set to `/opt/android-sdk-linux/platform-tools/adb`
TypeError: Cannot read property '0' of undefined
at checkJavaHome.then.catch.then.then.catch.then.std (/opt/node-v9.8.0-linux-x64/lib/node_modules/macaca-cli/node_modules/_java-home@1.0.7@java-home/lib/java-home.js:92:27)
at
gradle is installed, version: 4.2

Installed driver list:

android: 2.0.48 [out-of-date]
```
* **Operate System**:
Ubuntu 16.04.4 LTS(macaca-android-docker)
* **Programming Language**:
NodeJS

下图是macaca Server报错
![image](https://user-images.githubusercontent.com/11214319/55219239-5ab8f980-523f-11e9-9679-2ec80fc53295.png)

设备也是有权限的
root@a6e008204b51:~/boss-script# adb devices
List of devices attached
10.91.45.43:15109 device

手动运行 /opt/android-sdk-linux/platform-tools/adb -s 10.91.45.43:15109 forward tcp:9001 tcp:9001 该命令是不会报错的
![image](https://user-images.githubusercontent.com/11214319/55219262-745a4100-523f-11e9-8abc-5c2eded7735a.png)

但是只要使用代码运行就会报错

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Macaca Server path that invokes `/opt/android-sdk-linux/platform-tools/adb` and compare it with the working `adb -s 10.91.45.43:15109 forward tcp:9001 tcp:9001` command. Reproduce the unauthorized error in the macaca-android-docker environment and trace the difference; done means the cause is identified and the code no longer rejects this authorized device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, docker, node.js
Domain
mobile-dev, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.