Giter Site home page Giter Site logo

Comments (9)

samuelli avatar samuelli commented on May 13, 2024

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.

samuelli avatar samuelli commented on May 13, 2024

Wait its docker hmm.

from rendertron.

samuelli avatar samuelli commented on May 13, 2024

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.

trading-peter avatar trading-peter commented on May 13, 2024

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.

samuelli avatar samuelli commented on May 13, 2024

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 and docker exec bot-render-container ls /usr/bin/google-chrome-beta?

from rendertron.

trading-peter avatar trading-peter commented on May 13, 2024

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.

trading-peter avatar trading-peter commented on May 13, 2024

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.

trading-peter avatar trading-peter commented on May 13, 2024

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.

samuelli avatar samuelli commented on May 13, 2024

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)

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.