Giter Site home page Giter Site logo

Comments (7)

cderv avatar cderv commented on September 28, 2024 2

In GHA, Google Chrome should be installed, even on Windows runner https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#browsers-and-webdrivers

I have successfully used webshot2 in GHA already which uses chromote.

Chrome should not be an issue. FWIW, the other similar package crrri is tested using GHA for CI and it works fine. (mentioning as you have asked there also: RLesur/crrri#106)

Is the url you want to reach an open url ? It gives me error 403 in my browser and in R

> curlGetHeaders("https://www.cowin.gov.in/home/")
[1] "HTTP/1.1 403 Forbidden\r\n"              "Server: awselb/2.0\r\n"                 
[3] "Date: Wed, 05 May 2021 10:11:40 GMT\r\n" "Content-Type: text/html\r\n"            
[5] "Content-Length: 118\r\n"                 "Connection: keep-alive\r\n"             
[7] "\r\n"                                   
attr(,"status")
[1] 403

It is then possible that Github Action can't access this url either by default. It may work on your computer because your local environment is already setup to get access to this website. Just some thoughts.

from chromote.

wch avatar wch commented on September 28, 2024

I haven't tried it with GHA. Are you installing Chrome?

from chromote.

markwsac avatar markwsac commented on September 28, 2024

Thanks for your detailed response. I also observed it returns 403 error in GHA. I tried setting custom headers and user-agent but no success. It works fine on my local.

from chromote.

markwsac avatar markwsac commented on September 28, 2024

Just wanted to add - Google Chrome is already installed in GHA. find_chrome() returns path.

from chromote.

dmurdoch avatar dmurdoch commented on September 28, 2024

This sounds like it might be a different issue, but when I rendered the README.Rmd file (https://github.com/dmurdoch/rgl/blob/master/README.Rmd) for rgl in GHA, the top image came out black. That's a result of webshot2 getting an image produced using WebGL.

from chromote.

wch avatar wch commented on September 28, 2024

@dmurdoch I've read there are various flags you may be able to use to get headless chrome to render webGL, but I haven't tried it myself. --disable-gpu might work.

You can pass in the argument like this:

m <- Chromote$new(browser = Chrome$new(args = "--disable-gpu"))

# Set this Chromote object as the default. Then any
# ChromoteSession$new() will be spawned from it.
set_default_chromote_object(m)

Also see:

https://stackoverflow.com/questions/39040370/how-do-i-enable-webgl-in-headless-chrome-in-ubuntu
https://stackoverflow.com/questions/62575117/force-headless-chromium-chrome-to-use-actual-gpu-instead-of-google-swiftshader

from chromote.

cderv avatar cderv commented on September 28, 2024

I also observed it returns 403 error in GHA. I tried setting custom headers and user-agent but no success. It works fine on my local.

@markwsac it is not only on GHA. I can't access it on my side locally. I believe there could be special security on this website preventing access for other than the allowed users / IP / or else. You may need to reach out to the admin of this website to understand how this works. Then you'll be able to configure or maybe whitelist GHA for your need. I am not sure this is related directly to chromote or GHA.

from chromote.

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.