GithubHelp home page GithubHelp logo

saucelabs-connector's People

Contributors

aleksey28 avatar alexandermoskovkin avatar andreybelym avatar dependabot[bot] avatar ekarudianto avatar farfurix avatar kirovboris avatar kisrefod avatar miherlosev avatar patrykkopycinski avatar yannikrudolph0108 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saucelabs-connector's Issues

Error "Unhandled promise rejection" on webdriver libs - Cannot read property 'destUrl' of null

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

Use saucelabs-connect-launcher

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.

Allow Options for Sauce Real Devices

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:

https://wiki.saucelabs.com/display/DOCS/Automated+Mobile+Application+Testing+with+Sauce+Labs#AutomatedMobileApplicationTestingwithSauceLabs-RunningYourTestonRealDevices

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.

No support for linux arm64 architecture

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.