quarto-dev / quarto-cli

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

Adding extensions to Quarto causes Deno to panic due to invalid certificate in Windows 11 #10130

Open pedrohbraga opened 4 weeks ago

pedrohbraga commented 4 weeks ago

Bug description

I have been having a recurrent issue where I am unable to add extensions to Quarto, nor see its tools.

I am able to render documents, but not being able to add new extensions has been a problem.

I have uninstalled RStudio, uninstalled Quarto, reinstalled RStudio in multiple versions. Cloning the repository and compiling Quarto has not helped. Installing different versions for Quarto has not helped as well., and reproducing the error outside RStudio also has not solved the problem. Attempting to use different terminals and command prompts has not helped as well.

Steps to reproduce

Execute in the Terminal:

quarto add quarto-ext/lightbox

or

quarto tools

Expected behavior

To be able to add extensions without issues.

Actual behavior

C:\Users\phper\OneDrive - Concordia University - Canada (1)\Doctorat\DoctoralThesis>quarto tools
(|) Inspecting tools
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.41.0
Args: ["C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\tools\\x86_64\\deno", "run", "--unstable-ffi", "--no-config", "--cached-only", "--allow-read", "--allow-write", "--allow-run", "--allow-env", "--allow-net", "--allow-ffi", "--v8-flags=--enable-experimental-regexp-engine,--max-old-space-size=8192,--max-heap-size=8192", "--importmap", "C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\vendor\\import_map.json", "C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\quarto.js", "tools"]

thread 'main' panicked at cli\args\mod.rs:596:14:
Failed to add platform cert to root cert store: InvalidCertificate(BadEncoding)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

AND

C:\Users\phper\OneDrive - Concordia University - Canada (1)\Doctorat\DoctoralThesis>quarto add quarto-ext/lightbox

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.41.0
Args: ["C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\tools\\x86_64\\deno", "run", "--unstable-ffi", "--no-config", "--cached-only", "--allow-read", "--allow-write", "--allow-run", "--allow-env", "--allow-net", "--allow-ffi", "--v8-flags=--enable-experimental-regexp-engine,--max-old-space-size=8192,--max-heap-size=8192", "--importmap", "C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\vendor\\import_map.json", "C:\\Program Files\\RStudio\\resources\\app\\bin\\quarto\\bin\\quarto.js", "add", "quarto-ext/lightbox"]

thread 'main' panicked at cli\args\mod.rs:596:14:
Failed to add platform cert to root cert store: InvalidCertificate(BadEncoding)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Your environment

Windows 11 Pro version 24H2

RStudio 2024.07.0 - "Cranberry Hibiscus" Daily (3ba33883, 2024-06-25) for Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.07.0-daily+250 Chrome/124.0.6367.243 Electron/30.1.2 Safari/537.36, Quarto 1.5.47 (C:/Program Files/RStudio/resources/app/bin/quarto/bin/quarto.exe)

Quarto check output

C:\Users\phper\OneDrive - Concordia University - Canada (1)\Doctorat\DoctoralThesis>quarto check
Quarto 1.5.47
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.5.47
      Path: C:\Program Files\RStudio\resources\app\bin\quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\phper\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2023

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

[>] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: C:/Users/phper/AppData/Local/Programs/Python/Python312/python.exe      Jupyter: (None)

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

[>] Checking R installation...........OK
      Version: 4.3.3
      Path: C:/PROGRA~1/R/R-43~1.3RC
      LibPaths:
        - C:/Users/phper/OneDrive - Concordia University - Canada (1)/Doctorat/DoctoralThesis/renv/library/R-4.3/x86_64-w64-mingw32
        - C:/Users/phper/AppData/Local/R/cache/R/renv/sandbox/R-4.3/x86_64-w64-mingw32/eba411ea
      knitr: 1.43
      rmarkdown: 2.24

[>] Checking Knitr engine render......OK
cscheid commented 3 weeks ago

This is unfortunately a bug on Deno that we can't easily work around. It usually comes up when IT installs a new root certificate on your machine. Do you know if that's the case?

pedrohbraga commented 14 hours ago

Thank you, @cscheid! I appreciate your response! This computer is indeed managed by my organization, and I believe they prevent the installation of new root certificates on my machine.

I worked around this issue by copying the files from the GitHub repositories of desired quarto libraries and copying them to the local quarto directory containing these tools.

cderv commented 2 hours ago

For reference this was already reported in the past, so linking all issues