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

Mobile Browser Perf Testing #4190

Open 2343909 opened 4 months ago

2343909 commented 4 months ago

Your question

I see under Page instructing to run firefox browser on Android phone but when I check Browsertime docs under page says it supports only Chrome on Android and Safari on Mac. I tried running a test on a Android device using Chrome and it works fine, then I tried running the same test on Firefox and Edge, they both fail. The error for Firefox: "firefox failed to start, trying 2 more time(s): adb error: fchown failed: Operation not permitted" The error for Edge: " ERROR: FailError: Failure: 'cannot bind listener: cannot bind to 127.0.0.1:9222: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)'"

So, does sitespeed.io supports perf testing on physical mobile devices using Firefox and Edge browsers? If yes, is there any guidance on how to solve noted errors?

2024-06-18_01h00_59 2024-06-18_00h57_44 2024-06-18_00h58_11

soulgalore commented 4 months ago

Yep it works on Firefox on Android. On Edge, I created an upstream issue for that a couple of years ago, asking the Edge team to add some documentation on how you would do that using WebDriver, I think it wasn't clear which activity/package that should be used. If Edge on Android supports WebDriver, then it should work. Let me know how it works out for you.

I'll update the documentation later today, thanks for noticing.

soulgalore commented 4 months ago

My guess is that the fchown error you get is from the GeckoDriver?

soulgalore commented 4 months ago

You can also upgrade to latest sitespeed.io 34+ have an updated HAR functionality for Firefox so you can get the HAR file from Firefox.

2343909 commented 4 months ago

@soulgalore I have upgraded to the latest sitespeed.io version and still get the same error: " node bin/sitespeed.js --android -b firefox -n 1 https://www.sitespeed.io/ [2024-06-18 07:56:21] INFO: Versions OS: win32 10.0.19045 nodejs: v20.11.0 sitespeed.io: 34.2.2 browsertime: 22.5.0 coach: 8.0.2 [2024-06-18 07:56:23] INFO: Run tests on SM-S901U [R5CT10NRCKA] using Android version 12 [2024-06-18 07:56:23] INFO: Running tests using Firefox - 1 iteration(s) [2024-06-18 07:57:13] INFO: firefox failed to start, trying 2 more time(s): adb error: fchown failed: Operation not permitted"

2343909 commented 4 months ago

It does not even try to load the firefox browser on the phone.

2343909 commented 4 months ago

This same issue seems to be reported to firefox https://github.com/mozilla/geckodriver/issues/1885

2343909 commented 4 months ago

Still Edge is not working so I will wait the documentation update

soulgalore commented 4 months ago

If you could ask in https://github.com/MicrosoftEdge/EdgeWebDriver/issues for how to set it up or if it is supposed to work, that would be great, then I could help trying to get it to work.