devexpress / saucelabs-connector Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello,
we have randomly an error when testing on saucelabs by using "testcafe-browser-provider-saucelabs" which is using "saucelabs-connector". It seems to have nothing to do with our test code. It also happens sporadically and the error is in the webdriver libs, which are called by "saucelabs-connector".
Error:
1) Unhandled promise rejection:
Error: [eval("")] Error response status: 17, , JavaScriptError -
An error occurred while executing user supplied JavaScript. Selenium
error: javascript error: Cannot read property 'destUrl' of null
(Session info: chrome=83.0.4103.61)
(Driver info: chromedriver=83.0.4103.39
(ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}),platform=Windows
NT 10.0.10586 x86_64)
at exports.newError
(/home/circleci/project/node_modules/wd/lib/utils.js:152:13)
at /home/circleci/project/node_modules/wd/lib/callbacks.js:94:19
at /home/circleci/project/node_modules/wd/lib/webdriver.js:202:5
at Request._callback
(/home/circleci/project/node_modules/wd/lib/http-utils.js:89:7)
at Request.self.callback
(/home/circleci/project/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.<anonymous>
(/home/circleci/project/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
Browser: Chrome 83.0.4103.61 / Windows 10
(https://app.************.saucelabs.com/tests/0b17c28b60594e07a73b1646a95abdff)
Most important:
Unhandled promise rejection
...
Cannot read property 'destUrl' of null
...
node_modules/wd/lib/utils.j
wd = webdriver is used by "saucelabs-connector" and we think the code part which can lead to this problems is in file
https://github.com/DevExpress/saucelabs-connector/blob/f76536d37212b0a6ff2207962ed255906608d478/src/index.js
on this code blocks, it seems it occurs when saucelabs is not answering or too late answering and promise is not resolved. On pingIntervalId and later calling getSessionUrl(webDriver)
async startBrowser (browser, url, { jobName, tags, build } = {}, timeout = null) {
var webDriver = wd.promiseChainRemote(`ondemand.${SAUCE_API_HOST}`, 80, this.username, this.accessKey);
var pingWebDriver = () => webDriver.eval('');
webDriver.once('status', () => {
// HACK: if the webDriver doesn't get any command within 1000s, it fails
// with the timeout error. We should send any command to avoid this.
**webDriver.pingIntervalId = setInterval(pingWebDriver, WEB_DRIVER_PING_INTERVAL);**
if (this.options.connectorLogging) {
this
.getSessionUrl(webDriver)
.then(sessionUrl => this._log(`${browser.browserName} started. See ${sessionUrl}`));
}
});
Do you have any idea how and why this error could hapenning and how to fix it?
Best regards and thanks a lot
Sebastian
These requirments were requested by @AndreyBelym for development browser provider plugin.
UPD. Add ability to disable browser start message.
I'm not able to find 1.1.0 on npm, is this going to be published?
The sauce-tunel
is kind of abandoned (last commit is July 3, 2016), and doesn't include up-to-date Sauce Connect binaries. saucelabs-connect-launcher
seems more appropriate for now.
/cc @georgiy-abbasov
Change from
'Browser stardet. See ...'
to
'chrome started. See ...'
It looks like this package is designed to connect to Sauce Labs' virtual devices (using the Selenium remote URL of https://ondemand.saucelabs.com
or similar). It might be helpful if options could be passed in to connect to Sauce Real Devices:
This would include connecting to a RDC remote url like
https://us1.appium.testobject.com/wd/hub
for the US data center case, or
https://eu1. appium.testobject.com/wd/hub
for the EU data center case in addition to handling capabilities specific to Sauce Real Devices.
When running the plugin on Linux with arm64 architecture, the Linux sauce connect is downloaded for the x86 version instead of the arm64 version. Sauce Connect has download URLs for both, so there should be a way to detect the architecture for Linux and download the correct one. This issue was encountered while using the testcafe-browser-provider-saucelabs plugin.
When looking through the code, it seems like it is coming from the the dependency of saucelabs-connector (sauce-connect-launcher at lib/sauce-connect-launcher.js). That dependency is found here: https://github.com/bermi/sauce-connect-launcher. I've created an issue in that repo as well, but there have been no updates in that repo for 2 years so I don't know if that is something that can get addressed there. Is there a possible workaround that can be done or if a different dependency available used?
This was occurring on v1.0.0 as well.
/cc @georgiy-abbasov
It can be helpful for solving testcafe-issue-373
Proof
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.