Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

GUI with BrowserStack - Tunnel already opened Error #968

Open
colinkahn opened this issue May 21, 2019 · 0 comments
Open

GUI with BrowserStack - Tunnel already opened Error #968

colinkahn opened this issue May 21, 2019 · 0 comments

Comments

@colinkahn
Copy link

I'm using the gemini gui with BrowserStack and sometimes when I click retry for a suite it will throw an error saying the tunnel is already open (see below for full error).

Output of gemini --version:

7.4.1

Contents of .gemini.yml file:

module.exports = {
  rootUrl: 'http://localhost:6006',
  gridUrl: 'http://127.0.0.1:4444/wd/hub',

  browsers: {
    chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        windowSize: '1600x1200'
      }
    },
    edge: {
      desiredCapabilities: {
        browserName: 'edge',
        windowSize: '1600x1200'
      }
    },
    ie11: {
      desiredCapabilities: {
        os: 'WINDOWS',
        os_version: '7',
        browserName: 'internet explorer',
        version: '11',
        windowSize: '1600x1200'
      }
    }
  },

  system: {
    plugins: {
      'browserstack': {
        username: '...',
        accessKey: '...'
      },
      'html-reporter/gemini': {
        enabled: true,
        path: 'gemini-reports',
        defaultView: 'all',
        baseHost: 'localhost:9999',
        errorPatterns: [
          'Parameter .* must be a string',
          {
            name: 'Cannot read property of undefined',
            pattern: 'Cannot read property .* of undefined'
          }
        ]
      }
    }
  }
};

Test source code:

N/A

Command used to run the test:

npx gemini gui <paths> --port 7777

Publically accessible URL of the page you are testing against:

N/A

Result:

When trying to retry an image sometimes you get:

GUI is running at http://localhost:7777
Opening BrowserStack tunnel.
✓ create-account-overview-suite plain [edge]
Total: 1 Passed: 1 Failed: 0 Skipped: 0 Retries: 0
Closing BrowserStack tunnel.
Total: 0 Passed: 0 Failed: 0 Skipped: 0 Retries: 0
Closing BrowserStack tunnel.
Error while trying to run tests Error: Tunnel already opened.
    at Object.start (/Users/colinkahn/sdi-web-reg/node_modules/gemini-browserstack/lib/browserstack.js:18:15)
    at Gemini.<anonymous> (/Users/colinkahn/sdi-web-reg/node_modules/gemini-browserstack/lib/plugin.js:26:18)
    at Gemini.tryCatcher (/Users/colinkahn/sdi-web-reg/node_modules/bluebird/js/release/util.js:16:23)
    at Gemini.<anonymous> (/Users/colinkahn/sdi-web-reg/node_modules/bluebird/js/release/method.js:15:34)
    at _.map (/Users/colinkahn/sdi-web-reg/node_modules/gemini-core/lib/events/async-emitter/index.js:11:43)
    at arrayMap (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:639:23)
    at Function.map (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:9556:14)
    at interceptor (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:16993:35)
    at thru (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:8797:14)
    at /Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:4374:28
    at arrayReduce (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:683:21)
    at baseWrapperValue (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:4373:14)
    at LazyWrapper.lazyValue [as value] (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:1859:16)
    at baseWrapperValue (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:4371:25)
    at LodashWrapper.wrapperValue (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:9052:14)
    at Gemini.emitAndWait (/Users/colinkahn/sdi-web-reg/node_modules/gemini-core/lib/events/async-emitter/index.js:13:14)
    at Gemini.emitAndWait (/Users/colinkahn/sdi-web-reg/node_modules/gemini/lib/passthrough-emitter.js:13:22)
    at Gemini.<anonymous> (/Users/colinkahn/sdi-web-reg/node_modules/gemini/lib/passthrough-emitter.js:29:29)
    at TestsRunner.tryCatcher (/Users/colinkahn/sdi-web-reg/node_modules/bluebird/js/release/util.js:16:23)
    at TestsRunner.<anonymous> (/Users/colinkahn/sdi-web-reg/node_modules/bluebird/js/release/method.js:15:34)
    at _.map (/Users/colinkahn/sdi-web-reg/node_modules/gemini-core/lib/events/async-emitter/index.js:11:43)
    at arrayMap (/Users/colinkahn/sdi-web-reg/node_modules/lodash/lodash.js:639:23)

Expected behaviour:

No error, it either uses the already opened tunnel or closes any previously open tunnels.

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

No branches or pull requests

1 participant