-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[🐛 Bug]: docker-compose-v3-dynamic-grid set SE_NODE_SESSION_TIMEOUT not effect #1824
Comments
@wuyue92tree, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Can you please update to the latest image and then share the logs where we can see that the timeout is not respected? Also please share a script we can use to reproduce the issue. |
Thanks for reply. Like you said, I update to the latest image, but issue still here. docker-compose.yaml and config.toml
container & images version and logger
Test script, I use playwright-python import os
from playwright.sync_api import sync_playwright
# pip install playwright==1.23.0
def run():
# https://playwright.dev/docs/selenium-grid#connecting-playwright-to-selenium-grid
os.environ['SELENIUM_REMOTE_URL'] = 'http://selenium:4444' # selenium hub url
os.environ['DEBUG'] = 'pw:browser*'
with sync_playwright() as p:
browser = p.chromium.launch(headless=False, channel='chrome')
context = browser.new_context(
user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64)'
' AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
)
page = context.new_page()
try:
# skip webdriver check
page.add_init_script("""
navigator.webdriver = false
Object.defineProperty (navigator, 'webdriver', {
get: () => false
})
""")
page.goto('https://www.baidu.com/')
while True:
page.wait_for_timeout(10000)
# reload page every 10 seconds
page.reload()
except Exception as e:
print(e)
finally:
page.close()
context.close()
browser.close()
if __name__ == '__main__':
run() |
Another strange behavior is that,when the |
@wuyue92tree Thanks for including the scripts to replicate the issue. We'll dig in as soon as we can. |
I ran into the same issue when running Selenium Node Docker (node-docker:4.12.1-20230912) with the -e SE_NODE_SESSION_TIMEOUT option through the environment variable. It can't be set to anything greater than the default timeout value as @wuyue92tree mentioned. The current workaround is to set the timeout value through -e SE_OPTS option as mentioned in the description. |
If one of you wants to open a pull request on this, it would be greatly appreciated. For now, it looks like we have a workaround. |
…effect Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
…effect Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
…effect Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
) * bug(#1824): Container ENV SE_NODE_SESSION_TIMEOUT not take effect Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Update helm-chart-test.yml for SNAPSHOT CI build * Update helm-chart-test.yml for SNAPSHOT CI build Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Revert test Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> --------- Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
When I set SE_NODE_SESSION_TIMEOUT to 600 , It still closed after 300 second.
Command used to start Selenium Grid with Docker
My docker-compose.yaml
but when I set
SE_OPTS=--session-timeout 600
, it's work fine.Operating System
Centos7
Docker Selenium version (tag)
4.8.1-20230306
The text was updated successfully, but these errors were encountered: