jhelvy / jhelvy/renderthis

Error messages format

Open
#12 6 comments 0 reactions 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

Hi!

First of all, congratulations for this release. This package has all the xaringan related functions I've been wanting for.

I just have a suggestion regarding the format of the error messages. I guess some of them are quite easy to understand for developers but they may not be to the wide public to which I'm sure this package is aimed.

In my first contact with the package I tried to compile the template obtained from xaringanthemer to PDF.

> library(xaringanBuilder)
> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
Error in pagedown::chrome_print(input = input, output = output_file) : 
  The browser is not executable: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

The error was obviously because I didn't have Google Chrome installed. Maybe a message indicating that this browser must be installed should be given.

I installed it and then get:

> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
Error in is_remote_protocol_ok(debug_port, verbose = verbose) : 
  Cannot find headless Chrome after 20 attempts

I was executing the code before opening Google Chrome (again, if this is necessary maybe it should be shown in a message). After opening Google Chrome I executed the code again. The slides were correct but I got an error though (which this time I could not understand).

> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
[2021-02-18 09:58:56] [error] handle_read_frame error: asio.system:54 (Connection reset by peer)

One of the slides runs out of the frame (it also does in the html version). May that be the reason?

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

Start at the build_pdf() entry point and reproduce the reported commands with pagedown::chrome_print. Review how missing Chrome, Chrome startup, and the connection-reset error are surfaced. Done means the relevant failures provide actionable guidance, including whether Chrome must be installed or opened.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.