denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.81k stars 5.38k forks source link

Deno Panic when Running quarto publish #26888

Open JohnHoltrane opened 4 hours ago

JohnHoltrane commented 4 hours ago

Summary When attempting to run the command quarto publish quarto-pub demo_slides.qmd, Deno encounters a panic with the error message: Failed to add platform cert to root cert store: InvalidCertificate(BadEncoding). This results in a failure to execute the quarto publish operation.

Steps to Reproduce Run the following command in the terminal: quarto publish quarto-pub demo_slides.qmd The error occurs and the following panic message appears.

Expected Behavior The quarto publish command should execute successfully, publishing the demo_slides.qmd file without any errors related to certificate issues or Deno panicking.

Actual Behavior The following panic error message appears:

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 x86_64
Version: 1.41.0
Args: ["/Applications/quarto/bin/tools/x86_64/deno", "run", "--unstable-ffi", "--no-config", "--allow-read", "--allow-write", "--allow-run", "--allow-env", "--allow-net", "--allow-ffi", "--no-check", "--v8-flags=--enable-experimental-regexp-engine,--max-old-space-size=8192,--max-heap-size=8192", "--importmap=/Applications/quarto/bin/vendor/import_map.json", "/Applications/quarto/bin/quarto.js", "publish", "quarto-pub", "demo_slides.qmd"]

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

Environment Platform: macOS x86_64 Deno Version: 2.0.6 Quarto Version: 1.5.57 Command Used: quarto publish quarto-pub demo_slides.qmd

Additional Information The error specifically mentions a failure to add a platform certificate to the root cert store due to InvalidCertificate(BadEncoding). Running quarto publish with other files or different commands does not reproduce the error. The issue persists after restarting the system and re-running the command.

JohnHoltrane commented 4 hours ago

Logs Full stack trace (from RUST_BACKTRACE=1):

error: Module not found "file:///Users/Mac/Documents/GitHub/test/quarto".

Stack backtrace:
   0: std::backtrace::Backtrace::capture
   1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   2: deno_core::error::custom_error
   3: <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next
   4: deno::graph_util::graph_valid
   5: deno::module_loader::ModuleLoadPreparer::prepare_module_load::{{closure}}
   6: <deno::module_loader::CliModuleLoader<TGraphContainer> as deno_core::modules::loaders::ModuleLoader>::prepare_load::{{closure}}
   7: deno_core::modules::recursive_load::RecursiveModuleLoad::prepare::{{closure}}
   8: deno::worker::CliMainWorker::execute_main_module::{{closure}}
   9: deno::worker::CliMainWorker::run::{{closure}}
  10: deno::tools::run::run_script::{{closure}}
  11: deno::spawn_subcommand::{{closure}}
  12: <deno_unsync::tokio::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
  13: tokio::runtime::task::raw::poll
  14: deno::main
  15: std::sys::backtrace::__rust_begin_short_backtrace
  16: _main