Giter Club home page Giter Club logo

Comments (3)

caseycarroll avatar caseycarroll commented on August 23, 2024

Seeing this as well.

When I run a test on google.com, I notice these logs immediately after the test kicks off.

2024-03-29 23:59:23 06:59:23.367 - [{'command': 'navigate', 'target': 'https://www.google.com', 'record': True}]
2024-03-29 23:59:23 06:59:23.367 - Preparing browser
2024-03-29 23:59:23 06:59:23.368 - Terminating all instances of chrome
2024-03-29 23:59:23 chrome: no process found
2024-03-29 23:59:23 06:59:23.370 - Flushing DNS
2024-03-29 23:59:23 dnsmasq: unrecognized service
2024-03-29 23:59:23 sudo: rndc: command not found
2024-03-29 23:59:23 sudo: systemd-resolve: command not found
2024-03-29 23:59:23 sd_bus_open_system: No such file or directory
2024-03-29 23:59:23 06:59:23.399 - Clearing profile /wptagent/work/b509392c2d8f-172.18.0.2/browser.240330_BN_6.1

After these logs the devtools websocket eventually connects and that's when the agent navigates the brower to http:\/\/127.0.0.1:8888\/orange.html.

At a high level, I see:

  1. navigate command (set to google.com)
  2. prepare browser step (includes flushing dns)
  3. open chrome
  4. some errors i.e. failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
  5. devtools websocket connects
  6. browser navigates to start_page
    • {"id":5,"method":"Page.navigate","params":{"url":"http:\/\/127.0.0.1:8888\/orange.html"}}

Maybe there's something to the "could not parse server address" errors...

BTW, to get the docker-compose set up to work on my windows machine, I had to manually add these changes from the following PRs:

from webpagetest.agent.

caseycarroll avatar caseycarroll commented on August 23, 2024

Actually, I do eventually see the logs indicate a navigate command was passed to the agent. It seems like the video recording stops immediately after the navigation command is sent.

2024-03-29 23:59:25 06:59:25.607 - <- {"id":21,"result":{}}
2024-03-29 23:59:25 06:59:25.607 - Processing script command:
2024-03-29 23:59:25 06:59:25.607 - {'command': 'navigate', 'target': 'https://www.google.com', 'record': True}
2024-03-29 23:59:25 06:59:25.607 - -> {"id":22,"method":"Browser.grantPermissions","params":{"origin":"https:\/\/www.google.com","permissions":["geolocation","videoCapture","audioCapture","sensors","idleDetection","wakeLockScreen"]}}
2024-03-29 23:59:25 06:59:25.609 - <- {"id":22,"result":{}}
2024-03-29 23:59:26 06:59:26.345 - ffmpeg: frame=    9 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
2024-03-29 23:59:26 06:59:26.610 - Stopping video capture
2024-03-29 23:59:26 06:59:26.610 - -> {"id":23,"method":"DOMSnapshot.captureSnapshot","params":{"computedStyles":["background-image"],"includePaintOrder":false,"includeDOMRects":true}}
2024-03-29 23:59:26 06:59:26.612 - <- {"id":23,"result":{"documents":[{"documentURL":0,"title":1,"baseURL":0,"contentLanguage":-1,"encodingName":2,"publicId":-1,"systemId":-1,"frameId":3,"nodes":{"parentIndex":[-1,0,1,2,2,4,2,2,7,2,1,1,11
2024-03-29 23:59:26 06:59:26.612 - -> {"id":24,"method":"Tracing.end","params":{}}

from webpagetest.agent.

caseycarroll avatar caseycarroll commented on August 23, 2024

Aha! In my case I did not set up traffic shaping on my host. This means I had to turn off traffic shaping when running the docker container. After disabling traffic shaping, I had to explicitly select "Native Connection" in the "Advanced Configuration" Connection dropdown before running my test.

To turn off traffic shaping, you will need to add the environment variable SHAPER=none when you run the agent container. (standalone or via docker-compose in the main project).

When a WPT test runs, it starts at the orange page. The browser controller then receives a navigation command with the target url. The browser navigation is triggered by a script. At a high level, that script is something like window.location = targetUrl. This script will not run if an error is present. If there is something misconfigured with your traffic shaping, an error occurs and the script will not run. In my case, my Advanced Configuration/Connection was set to Cable when the agent was configured for no traffic shaping. Once the advanced configuration matched my agent's traffic configuration, the script ran and my test executed as expected.

I'm running this on a Windows machine. The docker instructions don't provide guidance for windows machines, so I'm not sure how to proceed at the moment. https://github.com/catchpoint/WebPageTest.agent/blob/master/docs/docker.md

At least I finally ran a successful test on my local machine!

from webpagetest.agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.