Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Supplementary JS files are not being uploaded to Quarto Pub via quarto publish #6828

Open
coatless opened this issue Sep 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working publishing-quartopub triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone.
Milestone

Comments

@coatless
Copy link
Contributor

coatless commented Sep 14, 2023

Bug description

The issue is an elevation of the original discussion post regarding supplementary files and quarto pub, c.f. #6487

So, I've tried to publish a demo Qmd file onto Quarto pub with the updated structure now; but, even with using quarto.doc.add_html_dependency(), I'm getting a similar error on page load.

Missing webr service workers

You can see the document here:

https://coatless.quarto.pub/webr-enabled-code-cells/

Is there a way to see what files are being uploaded onto Quarto Pub? Or what files are present with a quarto.pub site?

I published to https://quarto.pub using the publishing command with QUARTO_PUB_AUTH_TOKEN.

Steps to reproduce

In particular, we have:

# Create a directory and change into it
mkdir quarto-publish-bug && cd $_

# Obtain the extension
quarto add coatless/quarto-webr@0.3.2

# Download demo document
curl --location --remote-header-name --remote-name https://github.com/coatless/quarto-webr/webr-demo.qmd

# Set quarto-pub token obtained from
# https://quartopub.com/profile/
export QUARTO_PUB_AUTH_TOKEN="not-telling1"

# Render and publish the document
quarto publish quarto-pub webr-demo.qmd

Gives:

? Publish with account: › QUARTO_PUB_AUTH_TOKEN
? Document name: › webr-enabled-code-cells

[✓] Creating quarto-pub document

Rendering for publish:

processing file: webr-demo.qmd
1/5                  
2/5 [unnamed-chunk-1]
3/5                  
4/5 [unnamed-chunk-2]
5/5                  
output file: webr-demo.knit.md

Warning messages:
1: In grSoftVersion() :
  unable to load shared object '/usr/local/lib/R/modules//R_X11.so':
  libXt.so.6: cannot open shared object file: No such file or directory
2: In get_engine(options$engine) :
  Unknown language engine 'webr' (must be registered via knit_engines$set()).
pandoc 
  to: html
  output-file: webr-demo.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  toc: true
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: webR-enabled code cells
  
[✓] Preparing to publish document
[✓] Uploading files (complete)
[✓] Deploying published document
[✓] Published document: https://coatless.quarto.pub/webr-enabled-code-cells
[✓] Account site updated: https://coatless.quarto.pub

This was built and published using quarto-1.4.358 and quarto-webr @ v0.3.2

Expected behavior

Ideally, the javascript service workers generated -- webr-serviceworkers.js and webr-workers.js -- should be present on Quarto pub. When files are being uploaded onto Quarto pub, it would be great to be able to also see a list of whats being sent. Similarly, it would be good to understand the files being stored on quarto.pub.

Actual behavior

The javascript service workers are not available on quarto pub.

Your environment

  • IDE: VS Code
  • OS: macOS Ventura 13.5.2
  • Quarto: 1.4.358

Quarto check output

Quarto 1.4.358
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.7: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.358
      Path: /opt/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/rstudio/.TinyTeX/bin/x86_64-linux
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/bin/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:
        - /usr/local/lib/R/site-library
        - /usr/local/lib/R/library
      knitr: 1.43
      rmarkdown: 2.24

[✓] Checking Knitr engine render......OK
@coatless coatless added the bug Something isn't working label Sep 14, 2023
@cscheid
Copy link
Collaborator

cscheid commented Sep 14, 2023

I don't think we have a way to produce the list of uploaded files to a publishing target (but we should!)

@coatless
Copy link
Contributor Author

coatless commented Sep 21, 2023

This issue is also biting documents with shinylive, c.f.

https://coatless-quarto.github.io/r-shinylive-demo/

Missing service worker...

Edit after some hacking:

Well... Looks like if I add the resources key into the HTML file this ensures the service worker is uploaded. Could the add_html_dependency() not be syncing with the resources key?

  html:
    resources: 
      - shinylive-sw.js

@cderv cderv added the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Sep 21, 2023
@cscheid cscheid added this to the v1.5 milestone Nov 30, 2023
@cscheid cscheid modified the milestones: v1.5, Future Jun 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working publishing-quartopub triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone.
Projects
None yet
Development

No branches or pull requests

4 participants