Skip to content

Problem installing extension #9466

Closed
Closed

Description

@neuwirthe

Bug description

I am trying to install an extension with
quarto install extension juliantao/qletter
I get errors (log is enclosed).

When I do this on my second machine, things work.
I have no idea what I need to change on my main machine to make things work.

(base) Maxwell:pisa_data neuwirth$ quarto install extension juliantao/qletter
⚠️  The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags

============================================================
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: macos aarch64
Version: 1.42.4
Args: ["/Applications/quarto/bin/tools/aarch64/deno", "run", "--unstable", "--no-config", "--allow-read", "--allow-write", "--allow-run", "--allow-env", "--allow-net", "--allow-ffi", "--no-check", "--importmap=/Applications/quarto/bin/vendor/import_map.json", "/Applications/quarto/bin/quarto.js", "install", "extension", "juliantao/qletter"]

thread 'main' panicked at cli/args/mod.rs:632:14:
Failed to add platform cert to root cert store: InvalidCertificate(BadEncoding)
stack backtrace:
   0:        0x1017e430c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0aa20ca08aeb683c
   1:        0x1009fbf24 - core::fmt::write::h168dbafcf35bac68
   2:        0x1017b7f3c - std::io::Write::write_fmt::hdb0dd3f09dcf2281
   3:        0x1017e6448 - std::sys_common::backtrace::print::h57b289e4b951ee17
   4:        0x1017e6174 - std::panicking::default_hook::{{closure}}::h783b6c512154ec65
   5:        0x1017e5d34 - std::panicking::default_hook::hcdfa9e1e0f234a4f
   6:        0x1008abdf0 - deno::setup_panic_hook::{{closure}}::hb96a6dc4fa15e542
   7:        0x1017e6ddc - std::panicking::rust_panic_with_hook::h9aea678ca49d64cf
   8:        0x1017e6b9c - std::panicking::begin_panic_handler::{{closure}}::ha16c3377e66deceb
   9:        0x1017e6b00 - std::sys_common::backtrace::__rust_end_short_backtrace::hea8fdda1ea8a4c0e
  10:        0x1017e6af4 - _rust_begin_unwind
  11:        0x1009fa2cc - core::panicking::panic_fmt::h1cb43b60f5788132
  12:        0x100a00d08 - core::result::unwrap_failed::h71a35eff74d84b68
  13:        0x100748c3c - deno::args::get_root_cert_store::h0efade9267b8b059
  14:        0x10071eea4 - once_cell::imp::OnceCell<T>::initialize::{{closure}}::h253e39bcb72f7d73
  15:        0x101685978 - once_cell::imp::initialize_or_wait::h0b9b987411522c9d
  16:        0x100747db0 - <deno::args::CliRootCertStoreProvider as deno_tls::RootCertStoreProvider>::get_or_try_init::h927b39ac8b4fbace
  17:        0x100c7adb8 - deno_fetch::Options::root_cert_store::hd2819423ef29bd68
  18:        0x100c7b59c - deno_fetch::get_or_create_client_from_state::h1b0ab323ee5377d3
  19:        0x101356748 - deno_fetch::op_fetch::op_fetch<FP>::v8_fn_ptr::h2a9907d86e41fa08

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

RStudio Version 2023.12.1+402 (2023.12.1+402)
macOS Sonoma 14.4.1

Quarto check output

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

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

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /Library/TeX/texbin
Version: 2024

⚠️ The Deno.dlopen API was used with --unstable flag. The --unstable flag is deprecated and will be removed in Deno 2.0. Use granular --unstable-ffi instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.14 (Conda)
Path: /Users/neuwirth/Library/r-miniconda-arm64/bin/python
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with conda install jupyter

[✓] Checking R installation...........OK
Version: 4.3.3
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/neuwirth/Library/R/arm64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.46
rmarkdown: 2.26

[✓] Checking Knitr engine render......OK

Activity

  1. added
    bug
    on Apr 24, 2024
  2. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    That's not how to install an extension.
    The correct command is quarto add ....

    See quarto --help or the documentation at https://quarto.org/docs/extensions/managing.html#installation
    image

    The readme of https://github.com/juliantao/qletter is outdated, please report there.

  3. added
    extensions
    support
    and removed
    bug
    on Apr 24, 2024
  4. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author
  5. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    Hum, I missed the error message which i don't believe should ever happen as Quarto 1.5 uses Deno 1.41.0, but in your environment it says Deno 2.0.

    How did you install Quarto?
    This is the real issue here, not the failed installation of extensions.
    You already have a message/error in the quarto check output.

    PS: when replying by email, do not include the previous messages. Thank you!

  6. added
    deno
    and removed
    extensions
    on Apr 24, 2024
  7. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author
  8. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    I don't think installing 1.5 will change something here, but go to "Release notes and more downloads" on the same page then the tab "pre-release".

    1. The --unstable flag is deprecated and will be removed in Deno 2.0. Use granular --unstable-* flags instead.
      Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags

      You should not see this message.

    2. Failed to add platform cert to root cert store: InvalidCertificate(BadEncoding)

      Do you use a proxy/VPN or something like that?

    3. Platform: macos aarch64
      Version: 1.42.4

      That's the Deno release from last week, so here Quarto seems to use a system version of Deno instead of the one embedded.
      For instance Quarto 1.5 uses Deno 1.41.0.

    I suggest to take the following steps:

    1. Remove/uninstall completely Quarto
    2. Ensure you don't have environment variables related to Quarto set: QUARTO_*
    3. Reinstall Quarto (stable or pre-release)
    4. Try again: quarto check should not display a message (and the wrong Deno version) as you shared.
  9. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author
  10. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author
  11. 14 remaining items

  12. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    I did

    sudo find /Applications -name deno
    /Applications/quarto/bin/tools/aarch64/deno
    /Applications/quarto/bin/tools/x86_64/deno
    /Applications/quarto/bin/vendor/deno-land/x/puppeteer@9-0-2/src/deno
    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/deno-aarch64-apple-darwin/deno
    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/deno-x86_64-apple-darwin/deno
    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/vendor/deno-land/x/puppeteer@9-0-2/src/deno
    

    Should I delete these additional versions of deno?

    None of these should be in your PATH, so no.
    And from your quarto check output, now Quarto is using the right version (the internal Deno).

  13. cscheid commented on Apr 24, 2024

    @cscheid
    Member
    Quarto 1.4.553
    [✓] Checking versions of quarto binary dependencies...
    Pandoc version 3.1.11: OK
    Dart Sass version 1.69.5: OK
    Deno version 1.42.4: OK
    

    ☝️ I really don't understand how that could have happened. That's very strange.

  14. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author

    Some more information.
    I removed
    /Applications/quarto
    and
    /Applications/RStudio
    Then, I installed Rstudio 2023.12.1-402
    and not yet quarto.
    RStudio brings its own version of quarto in /Applications/RStudio.app/Contents/Resources/app/quarto/bin

    bin ./quarto --version 
    1.3.450
    

    qmd files will be rendered, but quarto --version entered in RStudio Terminal window produces

    quarto --version
    bash: quarto: command not found
    

    Similarly

    quarto add juliantao/qletter
    bash: quarto: command not found
    

    Ath this point, I notice that bash is being called despite the fact that MaxOS now uses zsh as default shell.

    Rstudio also brings its own versions of deno in

    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/deno-aarch64-apple-darwin/deno
    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/deno-x86_64-apple-darwin/deno
    /Applications/RStudio.app/Contents/Resources/app/quarto/bin/vendor/deno-land/x/puppeteer@9-0-2/src/deno
    

    Like calling quarto --version callling deno --version cannot find deno.

    Installing quarto from quarto-1.4.553-macos.pkg creates a link to quarto in /usr/local/bin to /Applications/quarto/bin/quarto, therefore quarto is on the path.
    However, this install does not create a link for deno in /usr/local/bin, therefore deno is not in the path and cannot be called from the command line.

    Executing sudo ln -s /Applications/quarto/bin/tools/aarch64/deno . in /usr/local/bin creates a link and then deno can be run from the command line,
    but the InvalidCertificate error persists.

  15. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    However, this install does not create a link for deno in /usr/local/bin, therefore deno is not in the path and cannot be called from the command line.

    Deno is only for internal use inside Quarto. That is intended behaviour.
    There are no reasons for you to use it.

    You had an installation issue where Quarto was not using its Deno but another one from your environment.
    Here you are messing up your installation.
    Do not touch anything inside /Applications/quarto unless you know what you are doing!

    Please read carefully and completely our previous replies.

  16. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author

    The only thing I added was the link to deno in /usrlocal/bin. I removed it afterwards.
    You told me to try and tun deno --version. To be able to test that, I created the link.
    In my previous post I describe that RStudio also also installs a version of quarto.
    Perhaps there is some interaction between the native quarto installation and the one from RStudio.

  17. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    I only said to test it, not to make it work by any means necessary.
    Again, Quarto was not using its own version of Deno but another one which had to come from your environment. deno --version would have show 1.42.4 being used wrongly by Quarto.

    You had in your Quarto check output:

    Deno version 1.42.4: OK

    instead of:

    Deno version 1.37.2: OK

    As already stated in #9466 (comment).

    This is one issue.

    And again, regarding the certificate issue, see previous replies such as #9466 (comment).

  18. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    To summarise:

    • at least before you played with the Quarto install, the output was correct, so you had a proper installation. (the somehow corrupted installation you had could have lead to many unpredictable issues).
    • the certificate is an upstream issue that cannot be solved by Quarto.
  19. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author

    I can run quarto, that is not the issue. The certificate issue was there before I "played", and it is still there.

  20. mcanouil commented on Apr 24, 2024

    @mcanouil
    Collaborator

    It seems we might be going in circles, and I believe it would be beneficial for us for you to take a step back and carefully review the previous messages.

    There are two key issues in your original report:

    1. Quarto Installation: There is a factual issue with your Quarto installation. This isn’t a question but rather something that needs attention from you. Please do carefully review the previous messages about this. As stated before, this seemed solved before you played with your installation. Please do check that quarto check output for Quarto 1.4.553 is reporting Deno version 1.37.2: OK.

    2. Certificate Issue: As stated several times, this is an upstream issue that cannot be solved in Quarto and is already reported ('quarto publish confluence' throws 'Failed to add platform cert to root cert store' #7292).

    To ensure we make progress, could you please re-examine our earlier correspondence?
    Thank you for your understanding and cooperation.

    As a workaround, you can install extension from an archive as described in https://quarto.org/docs/extensions/distributing.html#archive-distribution.

  21. neuwirthe commented on Apr 24, 2024

    @neuwirthe
    Author

    I think I followed all your instructions, and this is what I get
    with quarto check

    Quarto 1.4.553
    [✓] 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.553
          Path: /Applications/quarto/bin
    
    [✓] Checking tools....................OK
          TinyTeX: (not installed)
          Chromium: (not installed)
    
    [✓] Checking LaTeX....................OK
          Using: Installation From Path
          Path: /Library/TeX/texbin
          Version: 2024
    
    [✓] Checking basic markdown render....OK
    
    [✓] Checking Python 3 installation....OK
          Version: 3.10.14 (Conda)
          Path: /Users/neuwirth/Library/r-miniconda-arm64/bin/python
          Jupyter: (None)
    
          Jupyter is not available in this Python installation.
          Install with conda install jupyter
    
    [✓] Checking R installation...........OK
          Version: 4.3.3
          Path: /Library/Frameworks/R.framework/Resources
          LibPaths:
            - /Users/neuwirth/Library/R/arm64/4.3/library
            - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
          knitr: 1.46
          rmarkdown: 2.26
    
    [✓] Checking Knitr engine render......OK
    

    I can render quarto files without problems.

    My workaround for getting extensions is installing them on my other machine - where quarto add ... works - and copying them to my main machine.

  22. added this to the Future milestone on Jun 5, 2024
  23. cscheid commented on Oct 2, 2024

    @cscheid
    Member

    This is fixed on 1.6.19.

  24. modified the milestones: Future, v1.6 on Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdenoupstream

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions