Skip to content

adb connect api issue #135

@slugger941

Description

@slugger941

I want to test adb coonect by wifi.
So i use client.connect api to connect remote device.
But if I set ip that not used by any device, error is occured and main process is stopped.
I think that main process should not be stopped tough error is occured.
Let me know how to handle it.
My test code is like below.

let adb = require('adbkit');
let client = adb.createClient();

client.connect('192.168.0.1', '5555')
.then(function(id) {
console.log('connect id:%s', id);
})
.catch(function(err) {
console.error('Something went wrong:', err.stack);
})

Something went wrong: Error: cannot connect to 192.168.0.1:5555: ?곌껐??援ъ꽦?먯쑝濡쒕????묐떟???놁뼱 ?곌껐?섏? 紐삵뻽嫄곕굹, ?몄뒪?몃줈遺�???묐떟???놁뼱 ?곌껐???딆뼱議뚯뒿?덈떎. (10060)
at C:\code\testapp\node_modules\adbkit\lib\adb\command\host\connect.js:30:23
at tryCatcher (C:\code\testapp\node_modules\bluebird\js\main\util.js:26:23)
at Promise._settlePromiseFromHandler (C:\code\testapp\node_modules\bluebird\js\main\promise.js:503:31)
at Promise._settlePromiseAt (C:\code\testapp\node_modules\bluebird\js\main\promise.js:577:18)
at Async._drainQueue (C:\code\testapp\node_modules\bluebird\js\main\async.js:128:12)
at Async._drainQueues (C:\code\testapp\node_modules\bluebird\js\main\async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\code\testapp\node_modules\bluebird\js\main\async.js:15:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions