When starting the app (see example below) without localIdentifier is fails to load:
const bs_local_args = {
key: "***",
// localIdentifier: "testing"
}
Expected Behavior
It just loads.
Actual Behavior
It fails with LocalError: Either another browserstack local client is running on your machine or some server is listening on port 45691
Error: LocalError: Either another browserstack local client is running on your machine or some server is listening on port 45691
at /Users/Adriaan/node_modules/browserstack-local/lib/Local.js:65:20
at ChildProcess.exithandler (child_process.js:286:7)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
name: 'LocalError',
message: 'Either another browserstack local client is running on your machine or some server is listening on port 45691',
extra: undefined
Platform details
- browserstack-local-nodejs version: 1.4.5
- node version: 12.14.0
- os type and version: mac os x Catalina
Details
This is a minimal version of the bug:
const browserstack = require("browserstack-local");
const url = require("url");
const http = require("http");
const PORT = 8080;
(async () => {
http
.createServer(req => {
const { pathname } = url.parse(req.url);
console.log("Request:", pathname);
})
.listen(PORT, () => {
console.log("Started node server");
});
const bs_local = new browserstack.Local();
const bs_local_args = {
key: "***",
// localIdentifier: "testing"
};
bs_local.start(bs_local_args, function(error) {
if (error) return console.error("Error:", error);
console.log("Running BrowserStackLocal", bs_local.isRunning());
bs_local.stop(function() {
console.log("Stopped BrowserStackLocal");
});
});
})();
When starting the app (see example below) without
localIdentifieris fails to load:Expected Behavior
It just loads.
Actual Behavior
It fails with
LocalError: Either another browserstack local client is running on your machine or some server is listening on port 45691Platform details
Details
This is a minimal version of the bug: