ERROR: UrlLoadError: Failed to load/verify on speedtest.io when trying to test something on localhost - speed-test

When I try to run tests on my localhost using speedtest.io I get the following output:
Google Chrome 71.0.3578.80
Mozilla Firefox 64.0
[2019-02-02 19:50:35] INFO: Versions OS: linux 4.9.125-linuxkit nodejs: v10.13.0 sitespeed.io: 7.7.3 browsertime: 3.11.1 coach: 2.4.0
[2019-02-02 19:50:35] INFO: Starting chrome for analysing http://localhost:5000/issues/44 8 time(s)
[2019-02-02 19:50:35] INFO: Testing url http://localhost:5000/issues/44 iteration 1
[2019-02-02 19:50:39] ERROR: UrlLoadError: Failed to load/verify http://localhost:5000/issues/44 uri:chrome-error://chromewebdata/
at SeleniumRunner.loadAndWait (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:200:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
I ran speedtest with the following command: docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:7.7.3 --config config.json http://localhost:5000/issues/44
My config.json file has the following configs:
{
"browsertime": {
"iterations": 8,
"browser": "chrome"
},
"utc": true,
"outputFolder": "edited_chrome"
}
If I try to test a website like github.com or anything else in the web, this configuration works fine.

I was using the wrong command.
I was running the website on my computer and sitespeed on docker, so docker couldn't see my localhost
Fortunately there is an easy solution for this if you're on a Mac, simply use something like:
docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:8.2.3 -b firefox http://host.docker.internal:4000/

Related

Problem launching TYPO3 via DDEV on Linux: Call to undefined function Composer\Autoload\includeFile()

I need to setup ddev with TYPO3 10.4 on public server (I know it's not a good practise, it's just to show a demo to the client). On my local machine (Windows + WSL2 + Docker + DDEV + Composer) everything works perfect, but when I start my project on the Linux suddenly there are some errors.
I have checked permissions, there is a newest version of composer, docker and ddev installed.
Errors:
[ Error ]
Call to undefined function Composer\Autoload\includeFile()
Failed to execute command vendor/bin/typo3cms extension:activate site: exit status 1
Task failed: Exec command 'cd frontend && npm ci && npm run prod' in container/service 'web': exit status 130
Task failed: Exec command 'vendor/bin/typo3cms database:updateschema' in container/service 'web': exit status 1
It looks like it can't execute commands, but I can't find any meaningful reason why. I will be glad for any ideas.
You need to install most new version of typo3-console.
Your problem is described here:
https://github.com/TYPO3-Console/TYPO3-Console/issues/1081

Start minikube with Docker driver in rootless not working because of fuse-overlay unit

I have an issue using Minikube with rootless docker.
I recently upgraded my Debian 10 to a Debian 11 with a 5.10.0-16-amd64 kernel version.
Then I have set up a rootless Docker, and its currently working well.
I have followed the documentation of Kubernetes about rootless docker.
But I am facing an error :
🤦 StartHost failed, but will try again: creating host: create: creating: create kic node: container name "minikube": log: 2022-08-03T16:19:15.374997860Z + echo 'INFO: enabling containerd-fuse-overlayfs service'
2022-08-03T16:19:15.375006741Z INFO: enabling containerd-fuse-overlayfs service
2022-08-03T16:19:15.375013843Z + systemctl enable containerd-fuse-overlayfs
2022-08-03T16:19:15.398783149Z Failed to enable unit, unit containerd-fuse-overlayfs.service does not exist.: container exited unexpectedly
So I search on the Internet and found this Github repository explaining how to install containerd-fuse-overlayfs.service that should resolve my problem.
I did not understand well the first option, so I have chosen to use the second option.
When I run the containerd-rootless-setuptool.sh install command (after installed them into /usr/bin). But I got an error too:
mount: /tmp/tmp.aecGG0JEwg/m: permission denied.
[rootlesskit:child ] error: command [mount -t overlay -o lowerdir=/tmp/tmp.aecGG0JEwg/l,upperdir=/tmp/tmp.aecGG0JEwg/u,workdir=/tmp/tmp.aecGG0JEwg/w overlay /tmp/tmp.aecGG0JEwg/m] exited: exit status 32
[rootlesskit:parent] error: child exited: exit status 32
[WARNING] Overlayfs is not enabled, consider installing fuse-overlayfs snapshotter (`/usr/bin/containerd-rootless-setuptool.sh install-fuse-overlayfs`), or see https://rootlesscontaine.rs/how-it-works/overlayfs/ to enable overlayfs.
So I decided to execute the next command anyway :
$ containerd-rootless-setuptool.sh install-fuse-overlayfs
containerd-fuse-overlayfs-grpc (https://github.com/containerd/fuse-overlayfs-snapshotter) needs to be present under $PATH
But I do not understand the error.
Anyone got an idea ? Thank you :)

How to run tests in Pytest in parallel inside the Docker container?

I ran into a problem when running GUI tests in parallel inside a Docker container. I use a bunch: Selenium webdriver + Pytest + Xdist + Chrome.
I use following command to run the tests:
pytest -v -n=4 --headless=True --production=True --browser=chrome --dist=loadfile --junitxml=test.xml
But all the tests fail. If I do the same outside the docker container or use 1 thread - it's working fine.
So, how can I resolve this problem and execute tests in parallel inside the docker container? Thanks a lot)
I have this in logs:
selenium.common.exceptions.WebDriverException: Message: chrome not reachable (Session info: headless chrome=73.0.3683.86) (Driver info: chromedriver=73.0.3683.20 (8e2b610813e167eee3619ac4ce6e42e3ec622017),platform=Linux 4.15.0-46-generic x86_64)
Try to use boxed processes + tx flag: (--tx 3*popen//python=python3.6 --boxed, so run your tests with the command below:
pytest -v --headless=True --production=True --browser=chrome --dist=loadfile --junitxml=test.xml --tx 3*popen//python=python3.6 --boxed
More information of how you can run your tests in parallel is available under that SO answer .
Good Luck !

Container circleci/node:10.14-browsers - ERROR: euid != 0,directory /tmp/.X11-unix will not be created

I’m trying to run browser testing on CircleCi using TestCafe. I have followed this documentation. The major problem is that the chrome browser isn't able to open. CircleCi is able to successfully download the image because the spin environment is passed.
I am facing problem in the next step (Container circleci/node:11.6.0-browsers) on CircleCi which throws an error :
$ _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Job was canceled
And later on the UI test step throws this error:
$ testcafe chrome:headless uitests/tests/* -r xunit:/tmp/test-results/res.xml -e
ERROR Was unable to open the browser "chrome:headless" due to an error.
Error: Unable to run the browser. The browser path or command template is not specified.
at checkBrowserPath$ (/rp-web/node_modules/testcafe-browser-tools/lib/api/open.js:47:23)
at tryCatch (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:72:40)
at Generator.invoke [as _invoke] (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:334:22)
at Generator.prototype.(anonymous function) [as next] (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:105:21)
at tryCatch (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:72:40)
at invoke (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:146:20)
at /rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:191:11
at new Promise (<anonymous>)
at new F (/rp-web/node_modules/core-js/library/modules/$.export.js:30:36)
at callInvokeWithMethodAndArg (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:190:16)
Type "testcafe -h" for help.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1
this is how my yml looks like:
jobs:
build-and-test:
working_directory: /repo
docker:
- image: node:10.5.0
- image: circleci/node:11.6-browsers
Also, tried the run command with no sandbox but got the same error:
testcafe chrome:headless uitests/tests/* -r xunit:/tmp/test results/res.xml -e --no-sandbox
I'm successfully able to run things locally but unable to run on CircleCi. Can anyone help with this on how to fix this?
I think removing the "- image: node:10.5.0" line from your config will fix these errors. I've created an example project (https://github.com/AndreyBelym/testcafe-example-circle-ci) and configured CircleCI builds (https://circleci.com/gh/AndreyBelym/testcafe-example-circle-ci) to test my assumption.
If you specify multiple container images in a build job configuration, the first image will be considered as a primary container and all other images as secondary containers. All build steps are executed in the primary container, and secondary containers are started in the background and accessible to the build steps only via the shared network. You can read more about it in Choosing an Executor Type - Using Multiple Docker Images.
Your build job configuration:
jobs:
build-and-test:
working_directory: /repo
docker:
- image: node:10.5.0
- image: circleci/node:11.6-browsers
means that you try to run TestCafe in the node:10.5.0 that doesn't have any browsers installed. That's why TestCafe can't find a browser and gives you the "Error: Unable to run the browser. The browser path or command template is not specified." error.
Also because the node:10.5.0 uses a special user account with reduced privileges, the node:11.6.0-browsers gives you the "_XSERVTransmkdir: ERROR: euid != 0" error because it needs administrator privileges to start Xvfb - a virtual X11 server (i.e. virtual desktop).

Not able to connect multiple appium node to selenium grid

I want to run appium scripts in parallel on multiple devices but always the second node fails to connect to the selenium server.
This is my selenium server logs which starts and registers perfectly
D:\Appium>java -jar selenium-server-standalone-2.52.0.jar -port 4444 -role hub m
axInstances=2 maxSession=2 -timeout 30000
15:17:45.215 INFO - Launching Selenium Grid hub
2016-02-25 15:17:45.810:INFO::main: Logging initialized #732ms
15:17:45.818 INFO - Will listen on 4444
15:17:45.856 INFO - Will listen on 4444
2016-02-25 15:17:45.859:INFO:osjs.Server:main: jetty-9.2.z-SNAPSHOT
2016-02-25 15:17:45.879:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletC
ontextHandler#b0ed20{/,null,AVAILABLE}
2016-02-25 15:17:45.893:INFO:osjs.ServerConnector:main: Started ServerConnector#
76c8cd{HTTP/1.1}{0.0.0.0:4444}
2016-02-25 15:17:45.894:INFO:osjs.Server:main: Started #816ms
15:17:45.894 INFO - Nodes should register to http://10.51.25.88:4444/grid/regist
er/
15:17:45.894 INFO - Selenium Grid hub is up and running
15:18:13.259 INFO - Registered a node http://10.51.25.88:4724
15:18:25.289 INFO - Marking the node http://10.51.25.88:4724 as down: cannot rea
ch the node for 2 tries
This is my Json file to create node and set capabilites
{"capabilities":[{"deviceName":"0009aec74c7a5f","browserName":"chrome","maxInstances":1,"version":"4.1.2","platform":"ANDROID"}],"configuration":{"proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","cleanUpCycle":2000,"port":4724,"host":"10.51.25.88","maxSession":1,"hubHost":"10.51.25.88","registerCycle":5000,"hubPort":4444,"timeout":30000,"url":"http:\/\/10.51.25.88:4724\/wd\/hub","register":true}}
Hence in the similar way when I try to connect my second appium node it fails to register in appium grid without any command prompt error logs
I have two physical devices connected through USB and devices detected through adb.I am using the latest version of Appium 1.4 and the latest selenium standalone server jar file 2.52.
I am able to register my appium node to selenium server for every first node , either of the device , but when I try to connect my second appium node It fails to connect closing the command promt without giving any error logs.
This same commands and configuration used to work for previous version of Appium (about one year Old), but for the new Appium version second node is not getting registered.
Is there any alternative method to register appium node to selenium grid , or Is there something I am missing above ?
I have built library that generates .json and .bat file for each Appium node. It is tested well and work so cool. So I believe you are missing boot strapping port number to connect another instance of Appium.
Json File:
{
"capabilities":
[
{
"DeviceManufacturer":"LGE",
"DeviceModel":"Nexus 5",
"DeviceOS":"Android",
"OSVersion":"6.0.1",
"DeviceType":"Real",
"deviceName":"038d1797094778a8",
"browserName":"Real_LGE_Nexus 5_Android_6.0.1",
"platform":"Android"
}],
"configuration":
{
"nodeTimeout":120,
"port":4723,
"hubPort":4444,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"http://192.168.1.246:4723/wd/hub",
"hub": "192.168.1.246:4444/grid/register",
"hubHost":"192.168.1.246",
"nodePolling":2000,
"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":5
}
}
You must be observing that I am using multiple capabilities but I am using all of them by overriding matches method of org.openqa.grid.internal.utils.DefaultCapabilityMatcher class. so when I call main method of org.openqa.grid.selenium.GridLauncher class. I am keeping my overriding jar in same class path and It worked for customizing matching node.
.bat file:
Notice this in .bat file -> --bootstrap 6024
node.exe "C:\Program Files (x86)\Appium\node_modules\appium\bin\appium.js" --address 192.168.1.132 --port 4830 --bootstrap 4830 -U 038d1797094778a8 --nodeconfig D:\MobileBaseProjectRepository\Grid\Node\nodeConfig_192.168.1.132_2.json --session-override
so, coming back to your question use --bootstrap 6024 while invoking appium node, you will through.

Resources