Open 2343909 opened 8 months ago
Hi @2343909 thank you for creating the bug report (and including logs etc). There's been a problem on Windows with long URLs if you haven't enabled long file names but this looks like something else. Can you check which Python version you are using, it seems that 3.12 (https://github.com/HandBrake/HandBrake/issues/5454) maybe introduced this?
Hi @soulgalore Thanks a lot for quick response and yes, I am using Python 3.12.2
Hi @2343909 can you try run just a simple test without a scripting and see if you get the same? I tested on Windows with 3.12 and do not get that error. You can checkout the test with Edge and video:
https://github.com/sitespeedio/browsertime/actions/runs/8281202122/job/22659184892
Hey @soulgalore, I just tried without scripting with Edge and Chrome, the same error occurs . Looks like you are running it with " node bin/browsertime.js" and I am running it with "node bin/sitespeed.js"
Yes but sitespeed.io uses browsertime internally. Just wanted to verify, shorter URL works fine for you (just so all dependencies for video recording/analysing is working)? Can you try to remove await seleniumDriver.manage().window().maximize();
from your test and see if that makes any difference? I'm not sure our code handles if you set that directly through selenium.
@soulgalore I tried it multiple different ways as you have suggested in the previous comment and the outcome is the same specifically for the long URLs.
I have executed many different scripts with not as long URLs and it works fine.
I removed await seleniumDriver.manage().window().maximize();
and still not changes.
@2343909 ok. Do you have long paths enabled on your machine as in this PR https://github.com/sitespeedio/browsertime/pull/2040/files ? I want to avoid adding that to the code because it seems strange to edit people properties, but you can manually set it if you don't have already?
@soulgalore Ok, looks like that is what the issue was... I enabled long paths:
PS C:\WINDOWS\system32> New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
LongPathsEnabled : 1
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
PSChildName : FileSystem
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
@soulgalore However :), there is slight small additional issue when selecting the long URL in the HTML report under the "Page" tab where after clicking on the long URL I get no file found error but if I change the name to something shorter then it works fine:
Uploading 2024-03-26_14h58_02.mp4…
Have you read the documentation?
URL
See in the script
What are you trying to accomplish
Here is execution command: _node bin/sitespeed.js -b chrome -n 1 --video --visualMetrics --multi storefront\storefrontfe\src\workflows\demo.mjs
NOTE: If " --visualMetrics" is removed, then it works fine.
What browser did you use?
Chrome
How to reproduce
Log output