API 500 errors when publishing qmd to html on quarto pubs

I hope someone might be able to help me with API 500 js errors (see below) when trying to publish a qmd to quarto pubs.

I am using a personal PC Windows 11 computer with administrative privileges. I have the current R (4.3.1) and Posit 2023-9-1 Build 494. I have the current version of Java (which I checked after seeing the js errors below). Some qmds publish fine, others throw this error consistently.

I understand API 500 errors are usually a read/write permission error code. So, thought it was either the APIs I was using in two of the qmds to get data or the leaflot plot in the other one. Removing API code snippets and replacing with downloaded data did not resolve the problem and neither did removing the leaflet code snippet.

Here is the yaml:
format:
html:
toc: true
code-fold: true
code-copy: true
execute:
warning: false
messages: false

Here is the error:
[>] Preparing to publish document
ERROR: API Error: 500 - Internal Server Error
Error: API Error: 500 - Internal Server Error
at QuartoPubClient.uploadDeployFile (file:///C:/Program%20Files/Quarto/bin/quarto.js:111414:23)
at async file:///C:/Program%20Files/Quarto/bin/quarto.js:109047:13
at async withSpinner (file:///C:/Program%20Files/Quarto/bin/quarto.js:56614:9)
at async handlePublish (file:///C:/Program%20Files/Quarto/bin/quarto.js:109040:5)
at async publishDocument (file:///C:/Program%20Files/Quarto/bin/quarto.js:121352:38)
at async publish5 (file:///C:/Program%20Files/Quarto/bin/quarto.js:121448:132)
at async doPublish (file:///C:/Program%20Files/Quarto/bin/quarto.js:121404:13)
at async publishAction (file:///C:/Program%20Files/Quarto/bin/quarto.js:121415:9)
at async Command.fn (file:///C:/Program%20Files/Quarto/bin/quarto.js:121392:9)
at async Command.execute (file:///C:/Program%20Files/Quarto/bin/quarto.js:8437:13)

2 Likes

Have this exact same error. Worked last week. On a mac, with no API calls or leaflet maps. I think there is something going on with their server. Did you manage to find a fix?

Same here...

running xelatex - 2
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode

[>] Preparing to publish site
ERROR: API Error: 500 - Internal Server Error

Error: API Error: 500 - Internal Server Error
at QuartoPubClient.uploadDeployFile (file:///E:/Rstudio/bin/quarto.js:111414:23)
at async file:///E:/Rstudio/bin/quarto.js:109047:13
at async withSpinner (file:///E:/Rstudio/bin/quarto.js:56614:9)
at async handlePublish (file:///E:/Rstudio/bin/quarto.js:109040:5)
at async publishSite (file:///E:/Rstudio/bin/quarto.js:121230:38)
at async publish5 (file:///E:/Rstudio/bin/quarto.js:121448:61)
at async doPublish (file:///E:/Rstudio/bin/quarto.js:121404:13)
at async publishAction (file:///E:/Rstudio/bin/quarto.js:121440:13)
at async Command.fn (file:///E:/Rstudio/bin/quarto.js:121392:9)
at async Command.execute (file:///E:/Rstudio/bin/quarto.js:8437:13)

UPDATE: If you see a note in the the terminal window that you do not have the most recent version of deno and are instructed to use deno upgrade, that might be the problem. I finally looked up what deno was and learned it is an alternative to js nodes, which are the core problem with our API 500 errors. Apparently, Posit allows deno scripts: Quarto - Project Scripts. I think our problem is that some qmds must require deno even if the user does not specify. So far, my yaml has contained quarto manual code so there must be some under-the-hood reliance on deno. That said, deno is not installed with quarto (I have quarto in Posit and as a stand-alone). Last week before the holiday, I used cmd to install via the deno page: Installation | Deno Docs and tested it. I then went into Posit and tested the deno upgrade command in terminal. It said I had the latest version. I managed to publish my file using the downloaded data without API calls and updated the file today after adding back in the API calls. I did notice that I needed a deno upgrade today though. So, my advice is close Posit, install deno using cmd, reopen posit and try to publish again. Hope it works for all of you!

Well, I posted too soon. I got one doc published but not the other. The other is still throwing errors.

This topic was automatically closed 21 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.