Is it possible to publish a quarto blog to netlify from RStudio cloud?
My Rstudio cloud project of the example blog is: https://rstudio.cloud/content/4302652
The error I receive is:
/cloud/project/myblog$ quarto publish netlify
? Authorize (Y/n) › Yes
[3159:3159:0727/213735.233585:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[3159:3159:0727/213735.233635: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
[3209:3209:0727/213735.349186:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[3209:3209:0727/213735.349248: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=d2e96e3bdbd10545f54d74a157a203ad'
The sample blog published from my desktop version of RStudio using the same command (quarto publish netlify
) in the terminal (here ).
Thanks for any help!
Hi there,
I'm sorry to hear you're having trouble publishing to Quarto Pubs on RStudio Cloud.
It looks like quarto is trying to open a local web browser, which doesn't work on RStudio Cloud.
Can you try publishing using the --no-browser
option?
quarto publish --no-browser
If this resolves the issue, I'll file a bug with quarto to get that fixed.
-Andy
Hi, thanks for the reply,
I tried
quarto publish --no-browser netlify
and received the same errors.
I made my cloud project https://rstudio.cloud/content/4302652 public.
Hi there,
I've opened an issue with quarto to investigate this further:
opened 05:55PM - 28 Jul 22 UTC
closed 02:36AM - 14 Aug 22 UTC
bug
### Bug description
Attempting to publish to Netlify from RStudio Cloud via the… RStudio Workbench terminal currently does not work:
```bash
/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
```block
/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
```bash
/cloud/project/myblog$ quarto tools check
[✓] Inspecting tools
Tool Status Installed Latest
chromium Not installed --- 869685
tinytex Not installed --- v2022.07
```
### Checklist
- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] 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.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] 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?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
-Andy
system
Closed
August 4, 2022, 5:56pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.