Modifying setting `wdm.ttl` doesn't help
Description of the problem:
By default WDM has wdm.ttl=86400.
If I modify this value in my tests, for example, to 1 minute, it doesn't help: WDM still uses the cached value chrome=81 for a whole day!
Look at ~/.m2/repository/webdriver/resolution.properties:
chrome=81
chrome-ttl=20\:55\:04 23/05/2020 EEST
Solution: I suggest to store the moment of caching instead of the moment of expiration:
chrome=81
chrome-cached-at=18\:55\:04 22/05/2020 EEST
In this case, changing wdm.ttl setting in my tests will immediately apply.
WebDriverManager version: 3.8.1, 4.0.0
WebDriverManager use: WebDriverManager.chrome().setup();
Would forcing the cache every time help? Will try and seee
@bonigarcia @asolntsev .. I get :
Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 12882
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1590318308.967][SEVERE]: Timed out receiving message from renderer: 600.000
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 611.195 s <<< FAILURE! - feature name here
[ERROR] Feature name here Time elapsed: 611.195 s <<< ERROR!
org.openqa.selenium.SessionNotCreatedException:
session not created
from timeout: Timed out receiving message from renderer: 600.000
(Session info: headless chrome=83.0.4103.61)
Build info: version: 'SELENIUMVERSION', revision: '8c567de6dc'
System info: host: 'MACHINENAME', ip: 'XX.XX.XX.X', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x00969563+2725219]
Ordinal0 [0x00868551+1672529]
Ordinal0 [0x00750359+525145]
Ordinal0 [0x00747A90+490128]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074F055+520277]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00747739+489273]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074B809+505865]
Ordinal0 [0x0074B857+505943]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00747739+489273]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074D83E+514110]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00747739+489273]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074BBF6+506870]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00747739+489273]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074B1B7+504247]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00747739+489273]
Ordinal0 [0x00746EFE+487166]
Ordinal0 [0x00747135+487733]
Ordinal0 [0x00746B75+486261]
Ordinal0 [0x0074337C+471932]
Ordinal0 [0x00746B32+486194]
Ordinal0 [0x00746A87+486023]
Ordinal0 [0x00750FF0+528368]
Ordinal0 [0x006FD6C9+186057]
Ordinal0 [0x006FCA3D+182845]
Ordinal0 [0x006FA94B+174411]
Ordinal0 [0x006E2528+75048]
Ordinal0 [0x006E35A0+79264]
Ordinal0 [0x006E3539+79161]
Ordinal0 [0x0087D607+1758727]
GetHandleVerifier [0x00A86546+1050150]
GetHandleVerifier [0x00A86291+1049457]
GetHandleVerifier [0x00A910D7+1094071]
GetHandleVerifier [0x00A86B46+1051686]
Ordinal0 [0x00875B06+1727238]
Ordinal0 [0x0087EB7B+1764219]
Ordinal0 [0x0087ECE3+1764579]
Ordinal0 [0x00894C05+1854469]
BaseThreadInitThunk [0x75E56359+25]
RtlGetAppContainerNamedObjectPath [0x77517C24+228]
RtlGetAppContainerNamedObjectPath [0x77517BF4+180]
I'm seeing some odd issues too. When 81.0.xxxx is cached on disk, even after chrome updated to 83, WDM continued to default to 81 never downloaded the new driver. I had to remove all the WDM driver cache inside .m2 directory, and restart before things started to work correctly again. Not sure if this is a caching bug, version detection issue or what, but on Windows is most definitely a problem.
Happens on Jenkins (Linix) and windows for me
Chris Kempster
On Wed, 27 May 2020, 19:51 Brian Carlson, [email protected] wrote:
I'm seeing some odd issues too. When 81.0.xxxx is cached on disk, even after chrome updated to 83, WDM continued to default to 81 never downloaded the new driver. I had to remove all the WDM driver cache inside .m2 directory, and restart before things started to work correctly again. Not sure if this is a caching bug, version detection issue or what, but on Windows is most definitely a problem.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bonigarcia/webdrivermanager/issues/484#issuecomment-634869664, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUXSW6QYA3XFGTXUOQN3ZTRTVOMHANCNFSM4NIBGDAA .
I'm seeing some odd issues too. When 81.0.xxxx is cached on disk, even after chrome updated to 83, WDM continued to default to 81 never downloaded the new driver. I had to remove all the WDM driver cache inside .m2 directory, and restart before things started to work correctly again. Not sure if this is a caching bug, version detection issue or what, but on Windows is most definitely a problem.
I registered another issue for this problem: https://github.com/bonigarcia/webdrivermanager/issues/483
I see that we can set the TTL using WebDriverManager.globalConfig().setTtl(172800); but, even though you set the default config is set on https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/java/io/github/bonigarcia/wdm/cache/ResolutionCache.java#L117
What you think guys if we:
- change the default TTL from the
webdrivermanager.propertiesfile - change the code to accept a different TTL
I decided to rollback the support for "-cached-at" instead of "-ttl" in the resolution cache (implemented in 95188820e35b3a8985dc71eaceeb2f12d7680388). The reason is that with "-cached-at" there was no backward compatibility (i.e., version 4.0.0 fails with the label "-cached-at" in the resolution cache).
In any case, the TTL configuration (used from Java, properties, or envs) is still working. The only difference is that with "-ttl" this value is honored at writing time (i.e., when the entry is created), and with "-cached-at" the value is honored at reading time (i.e., when the entry is checked). IMHO is no big deal to continue working using the first approach.