Skip to content

[web:tests] safaridriver intermittently fails to create a WebDriver session #163790

Closed

Description

@yjbanov

Sample error:

Error: SessionNotCreatedException (500): Could not create a session: The session timed out while connecting to a Safari instance.
#0      parseW3cResponse (package:webdriver/src/handler/w3c/utils.dart:81:9)
#1      W3cSessionHandler.parseCreateResponse (package:webdriver/src/handler/w3c/session.dart:19:21)
#2      InferSessionHandler.parseCreateResponse (package:webdriver/src/handler/infer_handler.dart:106:34)
#3      AsyncRequestClient.send (package:webdriver/src/common/request_client.dart:96:32)

This happens after safaridriver server starts listening to HTTP connections. In this sample log, notice how on the first attempt safaridriver failed to create a server. Then on retry 1, the server started successfully, but it failed to create a driver session. Our current approach is to abandon everything and start a brand new safaridriver instance. But that exposes us to the risk of failing to open the port again which, as you can see from all the following attempt, does indeed happen.

Proposal

Once safaridriver successfully opens a port, hold onto that server, and retry the session instead with the same safaridriver instance. It is possible 🤞 that Safari will boot up and stop timing out.

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    c: tech-debtTechnical debt, code quality, testing, etc.
    P1High-priority issues at the top of the work list
    platform-webWeb applications specifically
    team-webOwned by Web platform team
    triaged-webTriaged by Web platform team
    on Feb 20, 2025
  2. self-assigned this
    on Feb 20, 2025
  3. github-actions commented on Mar 10, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testsbrowser: safari-macosonly manifests in Safari on macOSc: tech-debtTechnical debt, code quality, testing, etc.platform-macosBuilding on or for macOS specificallyplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions