browserstack/browserstack-local-nodejs

Giving `binarypath` fails because of auto-upgrade

Closed this issue · 6 comments

When using the binarypath option, the binary still tries to auto-update and exits with an error code:

[test/browserstack/ci ] BrowserStack error BrowserStack tunnel: 'Error: Command failed: /opt/atlassian/pipelines/agent/build/build/bin/test.browserstack.sh'
[test/browserstack/ci ] BrowserStack error Error: Command failed: /opt/atlassian/pipelines/agent/build/build/bin/test.browserstack.sh
[test/browserstack/ci ] 
[test/browserstack/ci ] 
[test/browserstack/ci ] BrowserStackLocal v6.1
[test/browserstack/ci ] 
[test/browserstack/ci ] ----------------------------------------------
[test/browserstack/ci ] Updating BrowserStackLocal...
[test/browserstack/ci ] Updated to 6.2
[test/browserstack/ci ] ----------------------------------------------
[test/browserstack/ci ] 
[test/browserstack/ci ] 
[test/browserstack/ci ] BrowserStackLocal v6.2

See https://bitbucket.org/atlassian/atlaskit/addon/pipelines/home#!/results/%7Bf0f7fead-6125-49b7-bbd1-5e79a2f83858%7D

Is there a flag to prevent the auto-update when we want to use the provided binary? Otherwise builds will fail until we update the docker image, whenever a new version is released.

It actually might not be related to the auto-update, but just 6.2 might be broken. This is a docker image with 6.2 and it fails as well: https://bitbucket.org/atlassian/atlaskit/addon/pipelines/home#!/results/%7B74a0801e-a770-4f68-989c-6bb3268b7e6e%7D

@joscha
I think the test is failing because of these errors -

[test/browserstack/ci ] ERROR in ./packages/ak-editor-schema/test/entity.ts
[test/browserstack/ci ] (6,34): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 
[test/browserstack/ci ] ERROR in ./packages/ak-editor-schema/test/del-mark.ts
[test/browserstack/ci ] (5,28): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 
[test/browserstack/ci ] ERROR in ./packages/ak-editor-schema/test/del-mark.ts
[test/browserstack/ci ] (6,34): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 
[test/browserstack/ci ] ERROR in ./packages/ak-editor-plugin-text-formatting/test/index.ts
[test/browserstack/ci ] (2,66): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 
[test/browserstack/ci ] ERROR in ./packages/ak-editor-plugin-mentions/test/input-rules.ts
[test/browserstack/ci ] (7,28): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 
[test/browserstack/ci ] ERROR in ./packages/ak-editor-plugin-mentions/test/index.ts
[test/browserstack/ci ] (7,38): error TS2307: Cannot find module 'ak-editor-test'.
[test/browserstack/ci ] 

So, the problem Cannot find module 'ak-editor-test might be with using relative paths (?)
Anyways, for BrowserStackLocal these are the logs -

[test/browserstack/ci ] 
[test/browserstack/ci ] 
[test/browserstack/ci ] BrowserStackLocal v6.2
[test/browserstack/ci ] 
[test/browserstack/ci ] Setting output as extra verbose with request parsing
[test/browserstack/ci ] You can now access your local server(s) in our remote browser.
[test/browserstack/ci ] 
[test/browserstack/ci ] 
[test/browserstack/ci ] Connecting to BrowserStack using WebSocket protocol...
[test/browserstack/ci ] Platform supports WebSocket connections.
[test/browserstack/ci ] 
[test/browserstack/ci ] Press Ctrl-C to exit
[test/browserstack/ci ] 
[test/browserstack/ci ] 

which says that the binary version 6.2 is connected and waiting for network activity. In your tests I think you are echo'ing BrowserStackLocal logs on test failure, hence they are displayed just before the end.

@vedharish the first is just output from Typescript, they are not failures. When I use the binary directly without going through browserstack-local-nodejs it seems to work. The failures started appearing when 6.2 was released.

Is there a way to prevent the auto-upgrade?

@joscha I see that your current tests on master are working fine.
Also, this package is working fine for the latest binary version for me.
Will reopen if the issue is reproduced.

PS - Please contact support@browserstack.com if you need any queries resolved with your tests.

@joscha apologies for trouble. one corner case was missed, we will super careful from next time!