jhelvy / jhelvy/renderthis

`assert_chrome_installed()` could give better advice

Open
#36 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
178
Forks
13
PR merge metrics
No merged PRs in 30d

Description

As pointed out by @yyzeng in this comment

The underlied chromote::find_chrome() just CAN'T find chrome.exe's path in my computer, but I have checked and found the path is in the Register with key "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\", 😭 So, I have to set Sys.setenv("CHROMOTE_CHROME" = "C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe") before using xaringanBuilder::build_pdf("Test.Rmd"), then everything is ok.)

we could add some advice about setting the CHROMOTE_CHROME env variable if Chrome is installed but not found by chromote::find_chrome(). I guess this is something that should be handled by chromote::find_chrome(), but we use our own error message since the underlying error isn't very user friendly.

Our current error message reads

Error: This function requires a local installation of the Chrome browser. 
  You can also use other browsers based on Chromium, such as Chromium itself, 
  Edge, Vivaldi, Brave, or Opera.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect R/utils.R around the current assert_chrome_installed() error message at lines 35–46. Update the advice to mention setting CHROMOTE_CHROME when Chrome is installed but not found, and verify that the resulting error message includes this guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.