Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to publish to netilfy from RStudio Cloud #1567

Open
7 tasks done
kippandrew opened this issue Jul 28, 2022 · 4 comments
Open
7 tasks done

Unable to publish to netilfy from RStudio Cloud #1567

kippandrew opened this issue Jul 28, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@kippandrew
Copy link

@kippandrew kippandrew commented Jul 28, 2022

Bug description

Attempting to publish to Netlify from RStudio Cloud via the RStudio Workbench terminal currently does not work:

/cloud/project/myblog$ quarto publish netlify
? Authorize (Y/n) › Yes
[403:403:0728/174441.766121:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[403:403:0728/174441.766172:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
/usr/bin/xdg-open: 869: firefox: not found
/usr/bin/xdg-open: 869: iceweasel: not found
/usr/bin/xdg-open: 869: seamonkey: not found
/usr/bin/xdg-open: 869: mozilla: not found
/usr/bin/xdg-open: 869: epiphany: not found
/usr/bin/xdg-open: 869: konqueror: not found
/usr/bin/xdg-open: 869: chromium: not found
/usr/bin/xdg-open: 869: chromium-browser: not found
[454:454:0728/174441.859915:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[454:454:0728/174441.859962:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
/usr/bin/xdg-open: 869: www-browser: not found
/usr/bin/xdg-open: 869: links2: not found
/usr/bin/xdg-open: 869: elinks: not found
/usr/bin/xdg-open: 869: links: not found
/usr/bin/xdg-open: 869: lynx: not found
/usr/bin/xdg-open: 869: w3m: not found
xdg-open: no method available for opening 'https://app.netlify.com/authorize?response_type=ticket&ticket=2b3242e1811b5d6fee5970013c7b8a1d'

I believe the issue is that quarto is not detecting the RStudio Workbench (Prairie Trillium) environment correctly when quarto is invoked from the terminal. See https://github.com/quarto-dev/quarto-cli/blob/90c7f3ba42ffdae3c2b13ad3d1814f8aaaa14b9f/src/core/platform.ts#L32:L35

The issue may be that the expected ENV vars are not present in the terminal session, so quarto is attempting to open a native browser window which fails due to lacking a display.

/cloud/project/myblog$ env | grep RS_
RS_RPOSTBACK_PATH=/usr/lib/rstudio-server/bin/rpostback
RS_SESSION_TMP_DIR=/var/run/rstudio-server/rstudio-rsession
RS_SERVER_RPC_SOCKET_PATH=/var/run/rstudio-server/rstudio-rserver/session-server-rpc.socket
RS_SERVER_LOCAL_SOCKET_PATH=/var/run/rstudio-server/rstudio-rserver/rserver.socket
RS_MONITOR_SOCKET_PATH=/var/run/rstudio-server/rstudio-rserver/rserver-monitor.socket
RS_SERVER_TMP_DIR=/var/run/rstudio-server/rstudio-rserver

Example project running on RStudio Cloud:
https://rstudio.cloud/content/4302652

quarto check Output

/cloud/project/myblog$ quarto check

[✓] Checking Quarto installation......OK
      Version: 1.0.35
      Path: /opt/quarto/1.0.35/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      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.2.1
      Path: /opt/R/4.2.1/lib/R
      LibPaths:
        - /cloud/lib/x86_64-pc-linux-gnu-library/4.2
        - /opt/R/4.2.1/lib/R/library
      rmarkdown: 2.14

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

quarto tools check Output

/cloud/project/myblog$ quarto tools check
[✓] Inspecting tools

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.07

Checklist

  • formatted your issue so it is easier for us to read?
  • included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • documented the quarto version you're running, by pasting the output from running quarto check in the "Quarto Check Output" text area?
  • documented the version of the quarto tools you're running, by providing the output from running quarto tools check in the "Quarto Tools Check Output" text area?
  • documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • documented which operating system you're running? If on Linux, please provide the specific distribution as well.
  • upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
@kippandrew kippandrew added the bug Something isn't working label Jul 28, 2022
@kippandrew
Copy link
Author

@kippandrew kippandrew commented Jul 28, 2022

@jthomasmock
Copy link

@jthomasmock jthomasmock commented Aug 2, 2022

Ran into this error today via quarto publish quarto-pub as well, will upvote!

@jjallaire
Copy link
Collaborator

@jjallaire jjallaire commented Aug 3, 2022

Note that in v1.1 we now detect server environments and just print the URL instead (we may be able to backport this fix but we haven't yet nominated fixes for backporting).

@kippandrew
Copy link
Author

@kippandrew kippandrew commented Aug 5, 2022

Another user reported a similar issue publishing to Quarto Pub:

https://community.rstudio.com/t/logging-in-and-publishing-to-quarto-pub/143511/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants