Skip to content

Problem with the Local Bindings for Nodejs while using a Windows system locally. #29

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

Open
shanep2300 opened this issue Mar 31, 2017 · 4 comments

Comments

@shanep2300
Copy link

shanep2300 commented Mar 31, 2017

Started a ticket with support but I figured I'd add an issue here.

It's inconsistent but the error is: "[browserstack.local] is set to true but local testing through BrowserStack is not connected".

@nakula
Copy link

nakula commented Aug 23, 2017

can you provide more details. ?

@silicakes
Copy link

silicakes commented Nov 8, 2017

I'm having the same issue:

system

nodejs: 8.5.0
os: MacOS sierra

config

const browserstack = require('browserstack-local');
const baseConfig = require("./base.wdio.conf").config;

const availableBrowsers = ['iPhone6', 'iPhone5', 'Chrome', 'Firefox', 'Safari'];

const capabilities = availableBrowsers.map(browser => {
    const capability = {
        name: browser,
        build: "BUILD_ID",
        project: "PROJECT",
        'browserstack.local': true,
        'browserstack.debug': true
    };

    if(!browser.toLocaleLowerCase().includes("iphone")) {
        capability.resolution = '1920x1080';
        capability.browserName = browser.toLowerCase();
        
    }
    return capability;
});

exports.config = Object.assign({}, baseConfig, {
    user: BS_USER,
    key: BS_KEY,
    updateJob: false,
    browserstackLocal: true,
    maxInstances: 5,
    capabilities,
    services: ['browserstack'],
    jasmineNodeOpts: {
        defaultTimeoutInterval: 10000,
        expectationResultHandler: function (passed, assertion) {
        }
    },
    onPrepare: (config, capabilities) => {
        console.log("Connecting local");
        return new Promise(function (resolve, reject) {
            exports.bs_local = new browserstack.Local();
            exports.bs_local.start({ 'key': config.key}, function (error) {
                if (error) return reject(error);
                console.log('Connected. Now testing...');
                resolve();
            });
        });
    },
    onComplete: (capabilties, specs) => {
        exports.bs_local.stop(function () { console.log("ARGS::",arguments) });
    },
    beforeSuite: () => {
        console.log("suite");
    },
    beforeTest: test => {
        console.log(test);
    }
});

@patthiel
Copy link

We're encountering the same issue when attempting to use wdio-browserstack-service with browserstack.local set to true on windows. Any updates on this?

@irbrownie
Copy link

I figured out that their documentation is wrong. the keys for this are actually

 const browserStackConfig = {
        'browserstackUser': BROWSERSTACK_USER,
        'browserstackKey': BROWSERSTACK_KEY,
        commonCapabilities: {  
            'browserstack.debug': true,
            'browserstack.local': true,
            'acceptSslCerts': 'true',
            'browserstack.ie.enablePopups': true,
            'browserstack.edge.enablePopups': true,
        },
       }

user/key fall under the toplevel config and shouldn't be added to capabilities. It also seems like adding localIdentifier to capabilites breaks it as well. Also notice that the creds aren't dot separated like on their site. They are camelCase.

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

5 participants