Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

karma-browserstack-launcher does not work with Travis-CI #151

Description

@gaoruhao

If I configured the Travis-CI browserstack addon according to this document, karma-browserstack-launcher will always receive an "access denied" when running in travis-ci.

The reason is that travis-ci will always add a suffix "-travis" to your browserstack username and also set this new username to the process.env.BROWSERSTACK_USERNAME.

https://github.com/travis-ci/travis-build/blob/10491086722c72e8bd73672c76d9e1947c70b3c1/lib/travis/build/addons/browserstack.rb#L182
image

Then this modified browserstack username is used by karma-browserstack-launcher, according to the code below.

username: env.BROWSERSTACK_USERNAME || env.BROWSER_STACK_USERNAME || config.username,

The workaround is to set process.env.BROWSERSTACK_USERNAME to your original username at the top of karma.conf.js but I hope this issue can be fixed in karma-browserstack-launcher or at least mentioned in the README/FAQ.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions