Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to make tunnel work #131

Open
abhagupta opened this issue Jul 7, 2017 · 1 comment
Open

Not able to make tunnel work #131

abhagupta opened this issue Jul 7, 2017 · 1 comment

Comments

@abhagupta
Copy link

abhagupta commented Jul 7, 2017

I am not able to make sauce-connect-launcher work for me. I have a very simple script.

var sauceConnectLauncher = require('sauce-connect-launcher');
var webdriver = require('selenium-webdriver');

var username = "<username>",
    accessKey = "<key>";

sauceConnectLauncher(
    {
        username: username,
        accessKey: accessKey,
        verbose: true,
        verboseDebugging: true
    }, function ( err, sauceConnectProcess) {
        if(err){
            console.error(err.message);
            return;
        }
        console.log("Sauce Connect ready ", sauceConnectProcess);

        var builder = new webdriver.Builder()
            .forBrowser('chrome')
            .withCapabilities({
                'username': username,
                'accessKey': accessKey,

                'browserName': 'chrome',
                'platform': 'Windows XP',
                'enablePerformanceLogging': 'true'
            }).
            usingServer("http://" + username + ":" + accessKey +
                "@ondemand.saucelabs.com:80/wd/hub");
        var driver = builder.build();
        driver.get("https://localhost:3000");
        sauceConnectProcess.close(function () {
            console.log("Closed Sauce Connect process");
        })
    }

)

I have confirmed that https://localhost:3000 is accessible on my machine. But this app is not accessible on the saucelab cloud. When I run the sc script seperately and run this script, my app is successfully accessible on saucelabs cloud.

@valishah
Copy link
Contributor

Hello @abhagupta,
Do you see any errors while executing? Can you try not to close immediately after the builder?

Hope this reference may help.
https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy+FAQS#SauceConnectProxyFAQS-CanIAccessApplicationsonlocalhost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants