Intermittent "no such execution context" error in 118.0.5951.0

1,567 views
Skip to first unread message

Tom Gowland

unread,
Aug 29, 2023, 12:00:13 PM8/29/23
to ChromeDriver Users
Hello all,

We are experiencing intermittent test failures (all with "no such execution context") across all of our Selenium tests after upgrading to version 118.0.5951.0.

I have also reproduced the problem on 117.0.5938.22.

Our tests are written using the Python Selenium Webdriver, and we are on the latest version (4.11.2).

I have provided a simple script below which allows me to reproduce the problem (typically, the get request in the loop will break 1 in 10 times with a "no such execution context" error returned from the ChromeDriver).

from selenium import webdriver
from selenium.webdriver.chrome.options import Options as ChromeOptions
attempt_number = 1
while True:
    print(f"Attempt number: {attempt_number}")
    options = ChromeOptions()
    options.add_argument("--headless=new")

    driver = webdriver.Chrome(options=options)
    driver.get("http://www.python.org")

    driver.quit()
    attempt_number += 1

If I take ChromeDriver (and Chrome) back to 116.0.5845.96, we still see intermittent failures, but this time the error is a little more detailed:

no such execution context: loader has changed while resolving nodes

However, I understood that this was the fix for that problem, so it should no longer be occurring.

Interestingly, I am unable to reproduce the problem locally, where my system details are as follows:
$ uname -a
Linux network 4.15.0-176-generic #185-Ubuntu SMP
Tue Mar 29 17:40:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
But on our AWS SPOT instances, the intermittent failures are very present:
$ uname -a
Linux network 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP
Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Any help / advice would be very much appreciated.

Many thanks,
Tom

Tom Gowland

unread,
Sep 12, 2023, 7:27:46 AM9/12/23
to ChromeDriver Users
I am still seeing this problem with the latest canary release (119.0.6004.0), though the problem seems to happen less frequently.

As with before, any advise would be very much appreciated.

Tom

Nga Tran

unread,
Sep 22, 2023, 1:16:50 AM9/22/23
to ChromeDriver Users
link ??


Vào lúc 18:27:46 UTC+7 ngày Thứ Ba, 12 tháng 9, 2023, Tom Gowland đã viết:

Ajay Kumar

unread,
Sep 27, 2023, 1:07:17 PM9/27/23
to ChromeDriver Users
We are also getting the same exception in Chrome 117 as well as Chrome 118.

WebDriverException: no such execution context(Session info: chrome=117.0.5938.89) (Driver info: chromedriver=117.0.5938.88 (be6afae4721209be42944bbcd325665f9f44563b-refs/branch-heads/5938_62@{#9}),platform=Windows NT 10.0.14393 x86_64)

WebDriverException: no such execution context(Session info: chrome=118.0.5993.18) (Driver info: chromedriver=118.0.5993.18 (2b5df5fa7b5d57ac73ba3507a3663bc46bdb0c52-refs/branch-heads/5993@{#441}),platform=Windows NT 10.0.14393 x86_64)

Earlier we were getting the same issue in Chrome 114 and 115 and we resolved it by applying patch for the fixes mentioned in https://bugs.chromium.org/p/chromedriver/issues/detail?id=4205.
And to be exact, these two changes - 

But now again getting this in Chrome 117 and these changes are already present there.

Ned Thompson

unread,
Oct 20, 2023, 10:29:49 AM10/20/23
to ChromeDriver Users

Getting same in Chrome 118, NUnit, C#, .net 6.

This issue seems to be getting worse -> better -> and now worse again - similar to what Ajay is saying.

Ashvini Hiray

unread,
Oct 26, 2023, 12:04:28 PM10/26/23
to ChromeDriver Users

@Ajay Kumar 
Please elaborate, how did you apply patch for the fixes? 
TIA
Reply all
Reply to author
Forward
0 new messages