sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.75k stars 603 forks source link

Sitespeed results with waterfall,video and visual metrics for URLs or user journey scripts running MacOS Safari browser #3974

Closed myanees284 closed 10 months ago

myanees284 commented 1 year ago

Your question

Hello Team, When I am trying to run the below command, the user journey works on safari browser. However it generates results with basic information like Performance Score, TTFB and FCP.

node /bin/sitespeed --multi test.js -n 1 -b safari

I do not see any information related to waterfall view, video and visual metrics like First visual change, speedIndex, VisualComplete, lastVisual change etc.

Is there anything I am missing? Please help

soulgalore commented 1 year ago

Hi @myanees284 if you install the decencies in https://www.sitespeed.io/documentation/sitespeed.io/installation/#mac then you can add --videoand --visualMetrics and you will get all the visual metrics like first visual change and speed index.

myanees284 commented 1 year ago

Hi @myanees284 if you install the decencies in https://www.sitespeed.io/documentation/sitespeed.io/installation/#mac then you can add --videoand --visualMetrics and you will get all the visual metrics like first visual change and speed index.

Hello @soulgalore. Thanks for your reply. I followed the above installation steps and tried to run again by adding the arguments node sitespeed.io/bin/sitespeed.js --multi test.js -n 1 -b safari --video --visualMetrics

I could see the safari browser getting opened and orange screen flashes and disappears leaving me with below error in the console:

`[2023-10-09 22:43:52] INFO: Versions OS: darwin 21.6.0 nodejs: v18.18.0 sitespeed.io: 29.7.0 browsertime: 17.16.0 coach: 8.0.2 [2023-10-09 22:43:52] INFO: Running tests using Safari - 1 iteration(s) Selenium Manager binary found at //sitespeed/sitespeed.io/node_modules/selenium-webdriver/bin/macos/selenium-manager Driver path: /usr/bin/safaridriver Browser path: /Applications/Safari.app/Contents/MacOS/Safari [2023-10-09 22:43:56] INFO: Start to measure HomePage [2023-10-09 22:43:56] ERROR: TypeError: Cannot read properties of null (reading '1') at getScreenOnOSX (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/video/screenRecording/desktop/osx/getScreen.js:30:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async buildX11FfmpegArguments (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/video/screenRecording/desktop/ffmpegRecorder.js:18:23) at async start (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/video/screenRecording/desktop/ffmpegRecorder.js:157:27) at async Measure._startVideo (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/command/measure.js:85:7) at async Measure.start (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/command/measure.js:207:7) at async module.exports (//sitespeed/test.js:36:5) at async file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/run.js:4:7 at async Iteration.run (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/iteration.js:240:9) at async Engine.runByScript (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/index.js:304:20) at async analyzeUrl (file:////sitespeed/sitespeed.io/lib/plugins/browsertime/analyzer.js:190:19) at async BrowsertimePlugin.processMessage (file:////sitespeed/sitespeed.io/lib/plugins/browsertime/index.js:173:26) //sitespeed/sitespeed.io/node_modules/selenium-webdriver/lib/error.js:524 let err = new ctor(data.message) ^

NoSuchSessionError at Object.throwDecodedError (//sitespeed/sitespeed.io/node_modules/selenium-webdriver/lib/error.js:524:15) at parseHttpResponse (//sitespeed/sitespeed.io/node_modules/selenium-webdriver/lib/http.js:601:13) at Executor.execute (//sitespeed/sitespeed.io/node_modules/selenium-webdriver/lib/http.js:529:28) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Driver.execute (//sitespeed/sitespeed.io/node_modules/selenium-webdriver/lib/webdriver.js:745:17) at async Screenshot.take (file:////sitespeed/sitespeed.io/node_modules/browsertime/lib/core/engine/command/screenshot.js:9:17) { remoteStacktrace: '' }

Node.js v18.18.0`

myanees284 commented 1 year ago

I missed to install ffmpeg. Now I could get the visual metric details and video. However I do not see waterfalls details

image

thanks once again

soulgalore commented 1 year ago

Hi @myanees284 waterfall/HAR isn't implemented. The reason is that Safari doesn't support it, I wrote about here: https://github.com/sitespeedio/browsertime/issues/1777#issuecomment-1112565938