Comments (4)
I gave it a spin. The executable path is not set correctly.
Try this:
puppeteer = require('puppeteer');
(async () => {
// Launch the browser and open a new blank page
const browser = await puppeteer.launch({
executablePath: "/usr/bin/chromium-browser",
args: [ '--disable-gpu', '--disable-setuid-sandbox', '--no-sandbox', '--headless', ]
});
const page = await browser.newPage();
// Navigate the page to a URL
await page.goto('https://todo-app:3000/');
})();
This should at least open the browser. Connecting to the domain I did not check. Hopefully this gets you to the next step.
from green-metrics-tool.
What base OS are you running on and what architecture do you have?
We have seen this error before when running puppeteer on a macOS or windows system and/or on a non-x64 architecture.
The base image we provide under greencoding/puppeteer-chrome
is only build for amd64. If you are running an arm system or under macOS / windows I suggest you rather use our Playwright container with python bindings. See an example where we use it here
However you are also free to use any other puppeteer / playwright container. Our tool is agnostic in that.
You should just verify that you can start the puppeteer / playwright with the container normally on your system by entering the container and starting the browser process directly in headless mode.
Hope this helps. Please follow up if not with more details.
from green-metrics-tool.
Ah, apologies, I should have included that detail.
I'm running Linux Mint 21.2 Cinnamon on an old laptop with a Intel Core 5-4210U CPU @ 1.70GHz. I tried a variety of puppeteer containers and got similar errors.
from green-metrics-tool.
Yes, that worked - thank you! :)
from green-metrics-tool.
Related Issues (20)
- Tests run_until should trigger automatic cleanup HOT 2
- Tests are not always using test containers HOT 5
- Enable testing on Mac HOT 5
- Pytest must be stopped when not triggered in subdir
- Tests have race condition with random path HOT 1
- Add Formbricks to energy-id
- Add configured metric providers to status page
- Restricted user rights for cluster
- Constant value for network transmission energy calculation HOT 9
- API endpoint /compare does not work anymore HOT 6
- Feature request: Allow comparisons of different usage scenarios and commits
- Add error reporting for frontend HOT 1
- Feature request: support named volumes HOT 4
- Make the carbonDB_add deduplication function faster HOT 3
- Update to the new Ubuntu 24.04 LTS version HOT 1
- HTML escaping inefficient and inconsistent
- Cluster timing checks HOT 1
- Adding a no-backend option for checking a site HOT 2
- cgroupfs support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from green-metrics-tool.