ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint error using Selenium Python ChromeDriver
L

1

6

I am just starting to learn selenium but when I run the program it opens the chrome window for few seconds and then closes giving the error:

DevTools listening on ws://127.0.0.1:52176/devtools/browser/b5500769-96fb-4f99-85df-b05a11157eea
[11368:11308:0324/102029.198:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s
[11368:11308:0324/102029.486:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s
[11368:11308:0324/102029.757:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s
[11368:11308:0324/102030.045:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s

As I am new to selenium I dont have any idea why this error is showing up.

Limoges answered 24/3, 2023 at 5:0 Comment(1)
please add the code snippet to better understand your problem, stackoverflow.com/help/minimal-reproducible-exampleWehrle
X
2

This error message...

[11368:11308:0324/102029.198:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s
[11368:11308:0324/102029.486:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s
[11368:11308:0324/102029.757:ERROR:page_load_metrics_update_dispatcher.cc(194)] Invalid first_paint 5.369 s for first_meaningful_paint 5.287 s

...indicates that there is a mismatch between the binary versions you are using.


Details

As per the comment within the discussion:

The supported configuration is to always match the version between Chrome and ChromeDriver - so when you are using Chrome 80, you should use Chrome 80. It is also possible to run ChromeDriver N with Chrome N+1, but this will always generate the warning you see. Most operations will complete successfully, but it is not the recommended approach.

The solution is to upgrade ChromeDriver to version 80: https://chromedriver.chromium.org/downloads


Solution

You need to ensure:

Xenogenesis answered 24/3, 2023 at 7:39 Comment(1)
Wow. I would've never guessed that a timing issue points at versions mismatch. In my case, I am using the latest as of yesterday: org.seleniumhq.selenium:selenium-java:4.22.0, chromedriver-win64 126.0.6478.126, Android System WebView 126.0.6478.134. Is it that sensitive to the 4th version component (126 vs 134) ?Elison

© 2022 - 2024 — McMap. All rights reserved.