Comments (9)
What OS are you using? At the moment this was built for Ubuntu platforms and I assume chrome gets installed as /usr/bin/google-chrome-beta
. Probably needs to be tuned for other platforms.
from rendertron.
Wait its docker hmm.
from rendertron.
Can you try docker build -t bot-render-container --no-cache=true
? I just tried and I was having a (different) issue and that fixed it for me.
from rendertron.
Here's what I tried just now
docker rm bot-render-container
docker build -t bot-render . --no-cache=true
docker run --name bot-render-container bot-render
docker exec bot-render-container curl http://localhost:8080/?url=https://dynamic-meta.appspot.com
The result remains the same.
I'm using Docker version 17.05.0-ce, build 89658bed64
Is there any more information I can give you?
from rendertron.
Hmm not sure what it is.
- What OS are you using?
- Can you run
docker exec bot-render-container curl http://localhost:9222/json/list
anddocker exec bot-render-container ls /usr/bin/google-chrome-beta
?
from rendertron.
I'm on Linux Arch (Antergos to be precise).
I opened a shell on the container and executed ls -ahl /usr/bin/google-chrome-beta
.
Output:
lrwxrwxrwx 1 root root 42 May 31 07:44 google-chrome-beta -> /opt/google/chrome-beta/google-chrome-beta
Chrome is there. I then tried to start it manually in the shell of the container:
# /usr/bin/google-chrome-beta --headless --disable-gpu --remote-debugging-port=9222
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)
from rendertron.
I tried --no-sandbox
. This seems to work. Chrome then starts and accepts requests.
# /usr/bin/google-chrome-beta --headless --disable-gpu --remote-debugging-port=9222 --no-sandbox
[0601/194042.967214:WARNING:audio_manager.cc(293)] Multiple instances of AudioManager detected
[0601/194042.967310:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager detected
[0601/194042.967983:ERROR:devtools_http_handler.cc(759)] Error writing DevTools active port to file
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Operation not permitted
Then tried to fetch some url
$ docker exec bot-render-container curl http://localhost:8080/?url=https://dynamic-meta.appspot.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1038 100 1038 0 0 320 0 0:00:03 0:00:03 --:--:-- 320
<head><!-- Shady DOM styles for custom-style --><!-- Shady DOM styles for dom-template --><!-- Shady DOM styles for dom-repeat --><!-- Shady DOM styles for array-selector --><!-- Shady DOM styles for dom-if --><!-- Shady DOM styles for dynamic-meta-app --><style scope="dynamic-meta-app">dynamic-meta-app {
display: block;
}</style><style>body {transition: opacity ease-in 0.2s; }
body[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; }
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>dynamic-meta</title>
<script src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="/dynamic-meta-app.html">
<meta property="og:title" content="The Rock"><meta property="og:type" content="video.movie"><meta property="og:url" content="http://www.imdb.com/title/tt0117500/"><meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg"></head>
Found that info here: jessfraz/dockerfiles#65
To disable sandbox is of course not really a good thing to do...
from rendertron.
Seems the cause is that arch doesn't have userspaces enabled by default.
jessfraz/dockerfiles#65 (comment)
And the arch devs say this isn't going to change by default: https://bugs.archlinux.org/task/36969
That means if I want to use the docker container with arch I have to change my kernel config or run it with "open doors" if I get this right. As my arch machine is only for development I will not change my kernel and just run this project locally without docker. That does it for me.
Feel free to close this issue if you don't want to dig deeper into this.
from rendertron.
I see, thanks for investigating!
If you want to disable sandbox in docker, you can add --no-sandbox
flag to the config https://github.com/samuelli/bot-render/blob/master/chromium.js#L13
from rendertron.
Related Issues (20)
- Server not responding after running 1 or 2 days, suspect memory leak HOT 3
- Script monitor-inspect points to non existing file src/main.js HOT 1
- the memory of chrome process keeps increasing HOT 3
- Rendertron on Google Cloud Platform - Cloud Run HOT 1
- Rendertron returning base href of Angular application as "https://null" HOT 3
- Password protection / authentication HOT 1
- restrictedUrlPattern does not exist in the latest published npm package 3.1.0 HOT 1
- [Project Status?] Is @AVGP still working on this project? HOT 8
- Website has css missing and API calls don't get fulfilled when rendering it through Rendertron HOT 2
- Question: What is the reason of cutting pathname in rendertron which is used in <base> as a page default URL HOT 2
- Set custom user agent HOT 1
- cant get rendertron to work. HOT 1
- Case-sensitivity of refreshCache HOT 1
- Build is failing - is this project still maintained? HOT 3
- SSRF on rendertron HOT 1
- Add timeout options for screenshots HOT 3
- ERROR: newTree.optimize is not a function
- problem with metadata HOT 1
- Not working for deep pages HOT 1
- https://render-tron.appspot.com/ is down 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 rendertron.