Fix recent (since Dec 2024) MacOS x64 14 e2e failures to start the web driver

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • None
    • None
    • Developer Tools

      Starting around 12/17, the variant [Test Package App MacOS x64 14|https://spruce.mongodb.com/variant-history/10gen-compass-main/test-packaged-app-macos-14-x64] has been unhealthy, flaking in the range of 50% of the time. The flake has multiple causes. This bug concerns the flake seen here: https://parsley.mongodb.com/test/10gen_compass_main_test_packaged_app_macos_14_x64_test_packaged_app_1_eb4adfd1d3b8b554e0d4297ae89a67b57b312e08_25_01_09_16_55_00/0/4906afa0078e026add18791b9c508006?bookmarks=0,11&shareLine=0

      with error:

       
      [2025/01/09 14:46:34.536] WebDriverError: The operation was aborted due to timeout when running "http://localhost:58657/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"browserName":"chrome","browserVersion":"128.0.6613.186","goog:chromeOptions":

      {"binary":"/Users/ec2-user/data/mci/63666a15163b9292b60065f644a79cf8/tmp/from-packaged/MongoDB Compass Dev.app/Contents/MacOS/MongoDB Compass Dev","args":["--enable-automation","--disable-popup-blocking","--disable-extensions","--disable-background-networking","--disable-background-timer-throttling","--disable-backgrounding-occluded-windows","--disable-sync","--metrics-recording-only","--disable-default-apps","--mute-audio","--no-first-run","--no-default-browser-check","--disable-hang-monitor","--disable-prompt-on-repost","--disable-client-side-phishing-detection","--password-store=basic","--use-mock-keychain","--disable-component-extensions-with-background-pages","--disable-breakpad","--disable-dev-shm-usage","--disable-ipc-flooding-protection","--disable-renderer-backgrounding","--force-fieldtrials=*BackgroundTracing/default/","--enable-features=NetworkService,NetworkServiceInProcess","--disable-features=site-per-process,TranslateUI,BlinkGenPropertyTrees","--media-router=0","--no-sandbox","--disable-gpu","--ignore-additional-command-line-flags","--atlasServiceBackendPreset=atlas-dev","--user-data-dir=/data/mci/63666a15163b9292b60065f644a79cf8/tmp/user-data-dir-1ih67csj8-6","--enable-logging=file","--log-file=/Users/ec2-user/data/mci/63666a15163b9292b60065f644a79cf8/src/packages/compass-e2e-tests/.log/electron-6.log","--log-level=0"]}

      ,"wdio:enforceWebDriverClassic":true,"wdio:chromedriverOptions":{"verbose":true,"allowedOrigins":["*"],"allowedIps":["0.0.0.0"]}},"firstMatch":[{}]}}"
      A likely root cause is https://github.com/mongodb-js/compass/pull/6480 as this updates electron, browserlist, and electron-to-chromium, and this commit went in around the right time.

      Skimming issues/commits for electron and browserlist I don't see anything calling out mac specifically unfortunately.

      For this bug, fix that flake cause. It seems only MacOS x64 14 is affected. I would try either reverting 6480, or bump all the relevant packages to an even newer version.

       

      FURTHERMORE, there are issues specifically in the aggregation test. It looks like the confirmation dialog is covering up the action the user is trying to do

      Confirmation dialog covers up another action the user is trying to do, see https://spruce.mongodb.com/task/10gen_compass_main_test_packaged_app_macos_14_x64_test_packaged_app_3_eb4adfd1d3b8b554e0d4297ae89a67b57b312e08_25_01_09_16_55_00/files?execution=0&sortBy=STATUS&sortDir=ASC and in particular see the "png" in the files. The line the error happens on is https://github.com/mongodb-js/compass/blob/main/packages/compass-e2e-tests/tests/collection-aggregations-tab.test.ts#L1199.

      There's a few variations of this error and it seems flakey. This shows 2 tests affected: https://spruce.mongodb.com/task/10gen_compass_main_test_packaged_app_macos_14_x64_test_packaged_app_3_5af0a12f432e866fa453a90a022875ed67b3b27b_25_01_08_10_04_36/tests?execution=0&sortBy=STATUS&sortDir=ASC

      However history of this task reveals it's only on MacOS x64 14 that it's flaking this way very often. https://spruce.mongodb.com/task-history/10gen-compass-main/test-packaged-app-3?selectedCommit=7724

      This MAY be a separate issue from the main webdriver issue, but I ruled them most likely the same issue due to the specificity of the environment it's happening on. 

      I recommend fixing the general issue bringing up the webdriver first. If it turns out the issues specific to the aggregation tab in "task 3" persist after that, spin it off into a separate ticket.

       

            Assignee:
            Basit Chonka
            Reporter:
            Daniel Echlin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: