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

Android 11 cannot connect to the device using the adb pair command . #700

Open
xiaohuimc opened this issue Aug 30, 2023 · 4 comments
Open

Comments

@xiaohuimc
Copy link

What is the issue or idea you have?

Android 11 cannot connect to the device using the adb pair command .

`
64ebc7eb2ba4:/# adb pair 192.168.31.44:40729
Enter pairing code: 166983
Successfully paired to 192.168.31.44:40729 [guid=adb-159bb5d9-XK1uGv]
64ebc7eb2ba4:/# adb devices
List of devices attached

64ebc7eb2ba4:/# adb devices
List of devices attached
`

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.

Please provide the steps to reproduce the issue.

What is the expected behavior?

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.

`

stf@86e81964c651:/app$ stf local
2023-08-30T04:46:20.698Z INF/util:procutil 364 [] Forking "/app/lib/cli migrate"
2023-08-30T04:46:21.660Z INF/db 371 [
] Connecting to rethinkdb:28015
2023-08-30T04:46:21.751Z INF/db:setup 371 [] Database "stf" already exists
2023-08-30T04:46:21.762Z INF/db:setup 371 [
] Table "users" already exists
2023-08-30T04:46:21.764Z INF/db:setup 371 [] Table "accessTokens" already exists
2023-08-30T04:46:21.765Z INF/db:setup 371 [
] Table "vncauth" already exists
2023-08-30T04:46:21.767Z INF/db:setup 371 [] Table "devices" already exists
2023-08-30T04:46:21.768Z INF/db:setup 371 [
] Table "logs" already exists
2023-08-30T04:46:21.770Z INF/db:setup 371 [] Table "groups" already exists
2023-08-30T04:46:21.820Z INF/db:setup 371 [
] Index "users"."adbKeys" already exists
2023-08-30T04:46:21.821Z INF/db:setup 371 [] Waiting for index "users"."adbKeys"
2023-08-30T04:46:21.826Z INF/db:setup 371 [
] Index "accessTokens"."email" already exists
2023-08-30T04:46:21.827Z INF/db:setup 371 [] Waiting for index "accessTokens"."email"
2023-08-30T04:46:21.840Z INF/db:setup 371 [
] Index "vncauth"."response" already exists
2023-08-30T04:46:21.840Z INF/db:setup 371 [] Waiting for index "vncauth"."response"
2023-08-30T04:46:21.843Z INF/db:setup 371 [
] Index "vncauth"."responsePerDevice" already exists
2023-08-30T04:46:21.844Z INF/db:setup 371 [] Waiting for index "vncauth"."responsePerDevice"
2023-08-30T04:46:21.848Z INF/db:setup 371 [
] Index "devices"."owner" already exists
2023-08-30T04:46:21.850Z INF/db:setup 371 [] Index "devices"."logs_enabled" already exists
2023-08-30T04:46:21.850Z INF/db:setup 371 [
] Index "devices"."present" already exists
2023-08-30T04:46:21.852Z INF/db:setup 371 [] Index "devices"."providerChannel" already exists
2023-08-30T04:46:21.854Z INF/db:setup 371 [
] Index "devices"."group" already exists
2023-08-30T04:46:21.854Z INF/db:setup 371 [] Index "groups"."privilege" already exists
2023-08-30T04:46:21.855Z INF/db:setup 371 [
] Index "groups"."owner" already exists
2023-08-30T04:46:21.856Z INF/db:setup 371 [] Waiting for index "devices"."owner"
2023-08-30T04:46:21.858Z INF/db:setup 371 [
] Waiting for index "devices"."logs_enabled"
2023-08-30T04:46:21.866Z INF/db:setup 371 [] Waiting for index "devices"."present"
2023-08-30T04:46:21.869Z INF/db:setup 371 [
] Waiting for index "devices"."providerChannel"
2023-08-30T04:46:21.872Z INF/db:setup 371 [] Waiting for index "devices"."group"
2023-08-30T04:46:21.878Z INF/db:setup 371 [
] Waiting for index "groups"."privilege"
2023-08-30T04:46:21.879Z INF/db:setup 371 [] Waiting for index "groups"."owner"
2023-08-30T04:46:21.885Z INF/db:setup 371 [
] Index "groups"."startTime" already exists
2023-08-30T04:46:21.885Z INF/db:setup 371 [] Waiting for index "groups"."startTime"
2023-08-30T04:46:21.936Z INF/db:setup 371 [
] Index "users"."adbKeys" is ready
2023-08-30T04:46:21.943Z INF/db:setup 371 [] Index "accessTokens"."email" is ready
2023-08-30T04:46:21.948Z INF/db:setup 371 [
] Index "vncauth"."response" is ready
2023-08-30T04:46:21.951Z INF/db:setup 371 [] Index "vncauth"."responsePerDevice" is ready
2023-08-30T04:46:21.952Z INF/db:setup 371 [
] Index "devices"."owner" is ready
2023-08-30T04:46:21.954Z INF/db:setup 371 [] Index "devices"."logs_enabled" is ready
2023-08-30T04:46:21.955Z INF/db:setup 371 [
] Index "devices"."present" is ready
2023-08-30T04:46:21.957Z INF/db:setup 371 [] Index "devices"."providerChannel" is ready
2023-08-30T04:46:21.959Z INF/db:setup 371 [
] Index "devices"."group" is ready
2023-08-30T04:46:21.960Z INF/db:setup 371 [] Index "groups"."privilege" is ready
2023-08-30T04:46:21.962Z INF/db:setup 371 [
] Index "groups"."owner" is ready
2023-08-30T04:46:21.963Z INF/db:setup 371 [] Index "groups"."startTime" is ready
2023-08-30T04:46:22.986Z INF/util:procutil 364 [
] Forking "/app/lib/cli triproxy app001 --bind-pub tcp://127.0.0.1:7111 --bind-dealer tcp://127.0.0.1:7112 --bind-pull tcp://127.0.0.1:7113"
2023-08-30T04:46:22.990Z INF/util:procutil 364 [] Forking "/app/lib/cli triproxy dev001 --bind-pub tcp://127.0.0.1:7114 --bind-dealer tcp://127.0.0.1:7115 --bind-pull tcp://127.0.0.1:7116"
2023-08-30T04:46:23.009Z INF/util:procutil 364 [
] Forking "/app/lib/cli processor proc001 --connect-app-dealer tcp://127.0.0.1:7112 --connect-dev-dealer tcp://127.0.0.1:7115"
2023-08-30T04:46:23.018Z INF/util:procutil 364 [] Forking "/app/lib/cli processor proc002 --connect-app-dealer tcp://127.0.0.1:7112 --connect-dev-dealer tcp://127.0.0.1:7115"
2023-08-30T04:46:23.046Z INF/util:procutil 364 [
] Forking "/app/lib/cli reaper reaper001 --connect-push tcp://127.0.0.1:7116 --connect-sub tcp://127.0.0.1:7111"
2023-08-30T04:46:23.064Z INF/util:procutil 364 [] Forking "/app/lib/cli provider --name 86e81964c651 --min-port 7400 --max-port 7700 --connect-sub tcp://127.0.0.1:7114 --connect-push tcp://127.0.0.1:7116 --group-timeout 900 --public-ip localhost --storage-url http://localhost:7100/ --adb-host 127.0.0.1 --adb-port 5037 --vnc-initial-size 600x800 --mute-master never"
2023-08-30T04:46:23.077Z INF/util:procutil 364 [
] Forking "/app/lib/cli auth-mock --port 7120 --secret kute kittykat --app-url http://localhost:7100/"
2023-08-30T04:46:23.127Z INF/util:procutil 364 [] Forking "/app/lib/cli app --port 7105 --secret kute kittykat --auth-url http://localhost:7100/auth/mock/ --websocket-url http://localhost:7110/"
2023-08-30T04:46:23.149Z INF/util:procutil 364 [
] Forking "/app/lib/cli api --port 7106 --secret kute kittykat --connect-push tcp://127.0.0.1:7113 --connect-sub tcp://127.0.0.1:7111 --connect-push-dev tcp://127.0.0.1:7116 --connect-sub-dev tcp://127.0.0.1:7114"
2023-08-30T04:46:23.190Z INF/util:procutil 364 [] Forking "/app/lib/cli groups-engine --connect-push tcp://127.0.0.1:7113 --connect-sub tcp://127.0.0.1:7111 --connect-push-dev tcp://127.0.0.1:7116 --connect-sub-dev tcp://127.0.0.1:7114"
2023-08-30T04:46:23.216Z INF/util:procutil 364 [
] Forking "/app/lib/cli websocket --port 7110 --secret kute kittykat --storage-url http://localhost:7100/ --connect-sub tcp://127.0.0.1:7111 --connect-push tcp://127.0.0.1:7113"
2023-08-30T04:46:23.266Z INF/util:procutil 364 [] Forking "/app/lib/cli storage-temp --port 7102"
2023-08-30T04:46:23.349Z INF/util:procutil 364 [
] Forking "/app/lib/cli storage-plugin-image --port 7103 --storage-url http://localhost:7100/"
2023-08-30T04:46:23.367Z INF/util:procutil 364 [] Forking "/app/lib/cli storage-plugin-apk --port 7104 --storage-url http://localhost:7100/"
2023-08-30T04:46:23.522Z INF/util:procutil 364 [
] Forking "/app/lib/cli poorxy --port 7100 --app-url http://localhost:7105/ --auth-url http://localhost:7120/ --api-url http://localhost:7106/ --websocket-url http://localhost:7110/ --storage-url http://localhost:7102/ --storage-plugin-image-url http://localhost:7103/ --storage-plugin-apk-url http://localhost:7104/"
lib/cli triproxy [name]

Options:
-h, --help Show help. [boolean]
-V, --version Show version. [boolean]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[string] [default: "tcp://:7112"]
--bind-pub, -u The address to bind the ZeroMQ PUB endpoint to.
[string] [default: "tcp://
:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[string] [default: "tcp://*:7113"]
--name An easily identifiable name for log output.
[string] [default: "86e81964c651"]

Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
STF_TRIPROXY_ (e.g. STF_TRIPROXY_BIND_PUB).

lib/cli triproxy [name]

Options:
-h, --help Show help. [boolean]
-V, --version Show version. [boolean]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[string] [default: "tcp://:7112"]
--bind-pub, -u The address to bind the ZeroMQ PUB endpoint to.
[string] [default: "tcp://
:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[string] [default: "tcp://*:7113"]
--name An easily identifiable name for log output.
[string] [default: "86e81964c651"]

Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
STF_TRIPROXY_ (e.g. STF_TRIPROXY_BIND_PUB).

Address already in use
2023-08-30T04:46:27.180Z FTL/cli:local 364 [] Child process had an error ExitError: Exit code "1"
at ChildProcess. (/app/lib/util/procutil.js:49:23)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
2023-08-30T04:46:27.183Z INF/cli:local 364 [
] Shutting down all child processes
Address already in use

`

Please run stf doctor and paste the output here.

stf@86e81964c651:/app$ stf doctor
2023-08-30T04:44:31.421Z INF/cli:doctor 353 [*] OS Arch: x64
2023-08-30T04:44:31.430Z INF/cli:doctor 353 [*] OS Platform: linux
2023-08-30T04:44:31.431Z INF/cli:doctor 353 [*] OS Platform: 5.19.0-43-generic
2023-08-30T04:44:31.433Z INF/cli:doctor 353 [*] Using Node 17.9.0
2023-08-30T04:44:31.591Z INF/cli:doctor 353 [*] Using ZeroMQ 4.2.2
2023-08-30T04:44:31.689Z ERR/cli:doctor 353 [*] RethinkDB is not installed (`rethinkdb` is missing)
2023-08-30T04:44:31.691Z ERR/cli:doctor 353 [*] ProtoBuf is not installed (`protoc` is missing)
2023-08-30T04:44:31.691Z ERR/cli:doctor 353 [*] ADB is not installed (`adb` is missing)
2023-08-30T04:44:31.881Z INF/cli:doctor 353 [*] Using GraphicsMagick 1.3.35
@denis99999
Copy link

@xiaohuimc your issue with adb pair command is not related to STF, please contact Android Developer Support instead; Second, note that you get an address already in use error when launching stf local; finally if you want to debug an Android device under STF control, please preferably use the API exposed by STF to avoid any service interaction leading to STF platform instability and inconsistency.

@xiaohuimc
Copy link
Author

xiaohuimc commented Aug 30, 2023

Can STF only be connected through USB? I connected remotely, but the webpage did not display a successful connection.

64ebc7eb2ba4:/# adb connect 192.168.31.44:39447
connected to 192.168.31.44:39447
64ebc7eb2ba4:/# adb devices -l
List of devices attached
192.168.31.44:39447    device product:umi model:Mi_10 device:umi transport_id:7

image

@xiaohuimc your issue with adb pair command is not related to STF, please contact Android Developer Support instead; Second, note that you get an address already in use error when launching stf local; finally if you want to debug an Android device under STF control, please preferably use the API exposed by STF to avoid any service interaction leading to STF platform instability and inconsistency.

@denis99999
Copy link

Can STF only be connected through USB? I connected remotely, but the webpage did not display a successful connection.

No of course, did you well launch STF with the --allow-remote option ? What say the logs ?

@xiaohuimc
Copy link
Author

Can STF only be connected through USB? I connected remotely, but the webpage did not display a successful connection.

No of course, did you well launch STF with the --allow-remote option ? What say the logs ?

Thank you very much. I solved the above problem by adding the --allow- remote option.

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

2 participants