Hello, Team!
please advice what is wrong?
I am trying to run test on mobile device 'Samsung' in browserstack
and got the following error:
(node:4208) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Was unable to open the browser "browserstack:Samsung Galaxy S8 Plus@7.0" due to error.
RangeError: "port" argument must be >= 0 and < 65536
at assertPort (internal/net.js:17:11)
at Server.listen (net.js:1388:5)
It happens only for Samsung devices (for iOS perfectly works)
my runner below but it also happen if I run from package
const runTest = suite => {
let failedCount = 0;
createTestCafe(null, 1337, 1338)
.then(tc => {
testcafe = tc;
runner = testcafe.createRunner();
runner.screenshots('reports/screenshots/', true);
})
.then(() => {
return getTests(suite);
})
.then(testFiles => {
return runner
.src(testFiles)
.browsers('browserstack:Samsung Galaxy S8 Plus@7.0')
.run(runOptions)
.then(actualFailedCount => {
failedCount = actualFailedCount;
console.log(failedCount);
return testcafe.close();
});
})
.then(() => process.exit(failedCount));
};
Thank you in advance!