diff --git a/app/igneum-app/src/engine.rs b/app/igneum-app/src/engine.rs index 7b26e99d0..f0cb59163 100644 --- a/app/igneum-app/src/engine.rs +++ b/app/igneum-app/src/engine.rs @@ -4532,7 +4532,7 @@ mod tests { assert_eq!(super::power_control_after_prompt(&Err("the elevated step exited with code 2".into())), None); } - use super::{digest_from_line, parse_race, switches_of, sync_decision, Reading}; + use super::{is_stall_exit, sync_decision_v2, digest_from_line, parse_race, switches_of, sync_decision, Reading}; #[test] fn digest_comes_from_the_nodes_own_line_only() { diff --git a/relay/playbooks/app-shot-light.ps1 b/relay/playbooks/app-shot-light.ps1 index 35e1502d2..5f5f81781 100644 --- a/relay/playbooks/app-shot-light.ps1 +++ b/relay/playbooks/app-shot-light.ps1 @@ -8,6 +8,7 @@ if (-not (Test-Path $urlFile)) { Write-Host "ERROR: $urlFile missing (is the app $url = (Get-Content $urlFile -Raw).Trim() $edge = @("$env:ProgramFiles (x86)\Microsoft\Edge\Application\msedge.exe", "$env:ProgramFiles\Microsoft\Edge\Application\msedge.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1 if (-not $edge) { Write-Host "ERROR: Edge not found"; exit 2 } +Write-Host ("edge " + (Get-Item $edge).VersionInfo.ProductVersion + " at " + $edge) $out = Join-Path $env:TEMP 'igneum-shots'; New-Item -ItemType Directory -Force -Path $out | Out-Null # a profile of its own, or the launcher hands the request to the user's running Edge and returns at once with no file # (run-20261006-222112 on PC 2: both shots missing in 0 s); -Wait holds until the headless browser exits @@ -15,9 +16,14 @@ $profile = Join-Path $out 'profile'; New-Item -ItemType Directory -Force -Path $ foreach ($page in @('overview', 'cards')) { $png = Join-Path $out "igneum-$page-light-1440.png" if (Test-Path $png) { Remove-Item $png -Force } - $args = @('--headless=new', '--disable-gpu', '--hide-scrollbars', '--no-first-run', '--window-size=1440,1000', '--virtual-time-budget=8000', "--user-data-dir=$profile", "--screenshot=$png", "$url?page=$page&visible=1") - $p = Start-Process -FilePath $edge -ArgumentList $args -Wait -PassThru -WindowStyle Hidden + # take 3: the old headless mode (the new one wrote nothing on PC 2's Edge, exit 0 in 11 s); the screenshot path is + # passed bare, and the working directory is the output folder because old headless falls back to screenshot.png there + $args = @('--headless', '--disable-gpu', '--hide-scrollbars', '--no-first-run', '--no-sandbox', '--window-size=1440,1000', '--virtual-time-budget=8000', "--user-data-dir=$profile", "--screenshot=$png", "$url?page=$page&visible=1") + $errLog = Join-Path $out "edge-$page.log" + $p = Start-Process -FilePath $edge -ArgumentList $args -Wait -PassThru -WindowStyle Hidden -WorkingDirectory $out -RedirectStandardError $errLog $tries = 0; while (-not (Test-Path $png) -and $tries -lt 20) { Start-Sleep -Milliseconds 500; $tries++ } + if (-not (Test-Path $png) -and (Test-Path (Join-Path $out 'screenshot.png'))) { Move-Item (Join-Path $out 'screenshot.png') $png -Force } + if (Test-Path $errLog) { Get-Content $errLog | Select-Object -First 5 | ForEach-Object { Write-Host "edge: $_" } } if (Test-Path $png) { Write-Host "RESULT shot=$page bytes=$((Get-Item $png).Length) edge_exit=$($p.ExitCode)"; & $env:RELAY_SEND -TaskId ([long]$env:RELAY_TASK_ID) -Title "app $page light" $png } else { Write-Host "RESULT shot=$page missing edge_exit=$($p.ExitCode)" } } exit 0