Comments (7)
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.
I haven't tried it with GHA. Are you installing Chrome?
from chromote.
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.
Just wanted to add - Google Chrome is already installed in GHA. find_chrome()
returns path.
from chromote.
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.
@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.
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)
- Error in startup(): ! Chrome debugging port not open after 10 seconds. HOT 18
- Fill html fields HOT 5
- Click DOWNLOAD button via coordinates and save download-file using CHROMOTE HOT 3
- [docs] Add documentation for web scraping functions HOT 1
- Expose current url? HOT 1
- Clicking on select elements doesn't work HOT 2
- Debugging connection was c;losed. Reason: WebSocket disconnected.
- How to increase timeout to fix: Chromote: timed out waiting for response to command Page.disable HOT 1
- chromote should set a user-specific crash dump directory
- The platform failed to initialize. Exiting.
- Allow enable() methods to be called manually
- Release chromote 0.2.0
- Click DOWNLOAD button via coordinates and save download-file using CHROMOTE (old: #126) HOT 2
- Chromote: timed out waiting for response to command Runtime.evaluate HOT 4
- Chrome Extensions HOT 1
- chromote failing to launch in Workbench HOT 1
- Improve error message on failure to launch
- Connecting to a website with a non valid certificate HOT 4
- Problem with chromote package HOT 12
- Use option to set default timeout
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 chromote.