Commit ef93382
committed
Puppeteer _resolve_installed_browser_path: fall back to newest mtime when no SemVer
Chromium build IDs (e.g. ``1618494``) aren't valid SemVer, so
``SemVer.parse`` returns ``None`` for all candidates. When two
builds end up in the cache (typical ``chromium@latest`` reinstall
flow: original build + newly-resolved ``latest``) we fell through
to ``return None`` because ``parsed_candidates=[]`` and
``len(candidates) > 1``. ``provider.install('chrome', no_cache=True)``
then failed the post-install load with "Installed package did not
produce runnable binary 'chrome'" — exactly the CI failure on
``test_chrome_alias_installs_real_browser_binary``.
Add a deterministic fallback: sort unparseable candidates by file
mtime and pick the newest, so a ``latest`` reinstall still resolves
to the freshly-downloaded build instead of bailing out.1 parent 72c1825 commit ef93382
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
412 | 424 | | |
413 | 425 | | |
414 | 426 | | |
| |||
0 commit comments