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

fix async recursion when retrying to start SC tunnel #7552

Closed
wants to merge 1 commit into from

Conversation

enriquegh
Copy link
Contributor

Proposed changes

Prior to this change, when retrying the function was not called using await

This change adds await when retrying SC tunnel startup

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

Prior to this change, when retrying the function was not called using await

This change adds await when retrying SC tunnel startup
@linux-foundation-easycla
Copy link

CLA Not Signed

@christian-bromann
Copy link
Member

@enriquegh thanks for sending a PR.

I am not sure if this change has any effect. It already returns a promise which fails if rejected. With await it would fail in the function but the result is the same.

@enriquegh
Copy link
Contributor Author

Hey @christian-bromann thanks for the comment.
Main reason I thought about this is because I see something like this in a customer's logs:

28 09 2021 16:41:25.389:INFO [framework.browserify]: bundle built
28 09 2021 16:41:25.451:INFO [karma-server]: Karma v6.3.2 server started at http://localhost:8001/
28 09 2021 16:41:25.452:INFO [launcher]: Launching browsers sl_chrome_latest_macOS_Catalina, sl_firefox_macOS_Catalina with concurrency 4
28 09 2021 16:41:25.457:INFO [launcher]: Starting browser Chrome latest macOS 10.15 on SauceLabs
28 09 2021 16:41:25.457:***** [launcher]: null -> BEING_CAPTURED
28 09 2021 16:41:25.491:INFO [launcher]: Starting browser Firefox  macOS 10.15 on SauceLabs
28 09 2021 16:41:25.491:***** [launcher]: null -> BEING_CAPTURED
28 09 2021 16:41:33.621:***** [launcher.SauceConnect]: Failed to start Sauce Connect Proxy due to Error: spawn /home/circleci/user/node_modules/saucelabs/build/.sc-v4.6.4/bin/sc ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
28 09 2021 16:41:33.621:***** [launcher.SauceConnect]: Retrying 1/3

nothing really happening after Retrying 1/3 and the job times out after 10 minutes.
So that kinda made me think it might not be getting called because of the await?
I will admit since I can't reproduce this at all it's hard for me to say if it even is retrying.

@christian-bromann
Copy link
Member

Hey @enriquegh

I looked into this and I believe the await would be counter productive because if the retry doesn't work it would throw the error in the catch block and not retry again. The problem must be somewhere else 🤔

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

Successfully merging this pull request may close these issues.

None yet

2 participants