quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.95k stars 326 forks source link

Typst: minimize external package dependencies to ameliorate third-party SSL issues #8701

Open adrian-gadient opened 9 months ago

adrian-gadient commented 9 months ago

What would you like to do?

Report an issue on quarto.org

Description

Problem

When trying to render a document in the typst format, callout boxes lead to an error because the fontawesome package is ostensibly missing. I tried to install the package but haven't found a way to achieve this.

Any suggestions to fix this would be very much appreciated!

Details

Simple qmd file to replicate the error:

---
title: "Untitled"
format:
  typst:
    papersize: a4
---

## Slide 1

Bla bla bla. Bla bla bla. Bla bla bla.

::: {.callout-note icon="false" title="In plain language"}
blalalal
:::

Error message:

[typst]: Compiling delete.typ to delete.pdf...downloading @preview/fontawesome:0.1.0 error: failed to download package (https://packages.typst.org/preview/fontawesome-0.1.0.tar.gz: Connection Failed: tls connection init failed: invalid peer certificate: UnknownIssuer) ┌─ delete.typ:245:8 │ 245 │ #import "@preview/fontawesome:0.1.0": * │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Quarto check returns the following:

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.549
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/local/texlive/bin/linux
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /tmp/RtmpAhlipE/rstudio/terminal/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /usr/local/lib/R
      LibPaths:
        - .../renv/library/R-4.3/x86_64-pc-linux-gnu
        - .../.cache/R/renv/sandbox/R-4.3/x86_64-pc-linux-gnu/25ebdc09
      knitr: 1.45
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK
cscheid commented 9 months ago

Connection Failed: tls connection init failed: invalid peer certificate: UnknownIssuer

This appears to be an issue with your computer and its SSL configuration.

adrian-gadient commented 9 months ago

Connection Failed: tls connection init failed: invalid peer certificate: UnknownIssuer

This appears to be an issue with your computer and its SSL configuration.

Thank you, that's a helpful starting point. Could you give me some pointers for how to deal with this?

cscheid commented 9 months ago

Thank you, that's a helpful starting point. Could you give me some pointers for how to deal with this?

If I had to guess, I'd say you likely have a computer that's controlled by corporate IT. You'll have to ask them about how they install and manage SSL certificates.

xi commented 2 days ago

I have the same issue when using the docker image ghcr.io/quarto-dev/quarto:1.6.25 in gitlab CI. So if it is an issue with SSL config it also needs to be fixed in the docker image.

mcanouil commented 2 days ago

@xi Could you provide the steps to reproduce? SSL issues might not be with the Docker image but without your network.

xi commented 2 days ago

This is the .gitlab-ci.yml I am using:

image: ghcr.io/quarto-dev/quarto:1.6.25

check:
  script:
  - quarto render
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
mcanouil commented 2 days ago

This does not help without the actual document being rendered. Note also that GitLab CI is a special environment.

Try to use the image and the command on your document outside of GitLab CI if you don't wish to share a small fully reproducible example to reproduce the issue.