macaca icon indicating copy to clipboard operation
macaca copied to clipboard

[macaca-android-docker] device unauthorized

Open Lixucheng opened this issue 6 years ago • 2 comments

  • 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/[email protected]@java-home/lib/java-home.js:92:27)
    at <anonymous>
  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

设备也是有权限的 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

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

Lixucheng avatar Mar 29 '19 08:03 Lixucheng

This is the translated issue:


[macaca-android-docker] device unauthorized

  • 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/[email protected]@java- Home/lib/java-home.js:92:27)
    At <anonymous>
  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

The following picture is macaca Server error !image

The device is also privileged Root@a6e008204b51:~/boss-script# adb devices List of devices attached 10.91.45.43:15109 device

Manually run /opt/android-sdk-linux/platform-tools/adb -s 10.91.45.43:15109 forward tcp:9001 tcp:9001 This command will not report an error. image

But as long as you use the code to run it will give an error

macaca-bot avatar Mar 29 '19 08:03 macaca-bot

This is the translated issue comment: @pangguobo


    • ** 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/maca-cli/node_modules/[email protected]@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

The picture below is Macaca Server error ! [image] (https://user-images.githubuserContent.com/11214319/55219239-5AB8F980-523F1E9-9679-2EC80FC53295.PNG)

Equipment is also permission root @ a6e008204b51: ~ / boss-script # adb devices List of devices attached 10.91.45.43:15109 Device

Manual Run / OPT / Android-SDK-Linux / Platform-Tools / Adb-S 10.91.45.43:15109 Forward TCP: 9001 TCP: 9001 This command will not report an error ! [Image] (https://user-images.githubuserContent.com/11214319/55219262-745A4100-523F1E9-8ABC-5C2EDED 7735A.PNG)

But as long as you use the code to run, you will report an error.

Hello, is this problem solved?

macaca-bot avatar Feb 07 '21 01:02 macaca-bot