Comments (6)
Could you translate that Korean error message to English?
from adbkit.
Something went wrong: Error: failed to connect to '192.168.0.1:5555': Connection refused
from adbkit.
is this issue resolved??
from adbkit.
Not yet. Status is not changed.
from adbkit.
I can't reproduce it with @devicefarmer/adbkit@2
let adb = require("@devicefarmer/adbkit");
let client = adb.createClient();
client.connect("127.0.0.1", "5555").then(function(id) {
console.log("connect id:%s", id);
}).catch(function(err) {
console.error("Something went wrong:", err.stack);
});
setInterval(() => {
console.log('ping')
}, 1000);
Output:
Something went wrong: Error: failed to connect to '127.0.0.1:5555': Connection refused
at /tmp/test/node_modules/@devicefarmer/adbkit/lib/adb/command/host/connect.js:30:23
at tryCatcher (/tmp/test/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/tmp/test/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/tmp/test/node_modules/bluebird/js/main/promise.js:577:18)
at Async._drainQueue (/tmp/test/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/tmp/test/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/tmp/test/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate (node:internal/timers:466:21)
ping
ping
ping
The main process continues to run. Tested on node 10, 12, 14, 16, 17
from adbkit.
A bit late to the party but just wrap it with try/catch:
try {
await adbClient.connect('1.2.3.4', 5555);
return {
status: 1
}
}
catch (e) {
return {
status: 0,
error: e.message
};
}
from adbkit.
Related Issues (20)
- 3 high severity vulnerabilities in this package HOT 3
- [Enhancement] Add an online documentation HOT 2
- Is it working with React Native?
- Failed install apk on device HOT 2
- client.connect api issue HOT 2
- Exceptions on device during install (e.g. no space) are reported incorrectly HOT 1
- ios
- How would I capture the device screen and stream it to adbkit for object detection? HOT 1
- Push not handling errors correctly HOT 1
- Do anyone get the same error? "TypeError: Adb.createClient is not a function" HOT 4
- can't find device on higher version node: my node version is v18.7.0
- Forward command doesn't return the resolved tcp port
- Allow aborting shell commands
- errors in PullTransfers are issued after end (or close) HOT 2
- Supporting adb shell with v2 protocol HOT 1
- android device goes on and off constantly in 3.2.3
- adb shell content write not respnose
- Socket is not closed after running IsInstalledCommand
- TcpIP sometimes throws an empty error
- The usb-device-to-tcp feature doesn't work in Node versions 14 and above.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adbkit.