openstf / adbkit

A pure Node.js client for the Android Debug Bridge.
Other
831 stars 248 forks source link

Error Unhandled rejection FailError: Failure: 'device still authorizing' #130

Closed zangtian2 closed 4 years ago

zangtian2 commented 4 years ago

Example : Tracking devices

client.trackDevices()
        .then(function (tracker) {
            tracker.on('add', function (device) {
                var devInfo = {}
                devInfo.serial = ""
                devInfo.model = ""
                // mainWindow.webContents.send('monitor-devices', device.id)
                console.log('Device %s was plugged in', device.id)
                client.getProperties(device.id).then(function (err, properties) {
                    console.log(err)
                    properties.forEach(function (property) {
                        if (property) {
                            console.log(property)
                        }
                    })
...
#raise error "Unhandled rejection FailError: Failure: 'device still authorizing'"

but adb devices is fine.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

zangtian2 commented 4 years ago

setTimeout solve it