Shiny app not working

オープン
#68 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
r
領域
api, backend

調査の方向性

Reproduce the issue with the R example, first checking the @shiny /devApp endpoint and then the api_shiny('/ui/', ...) pipeline through api_run(). Compare the working echo endpoint with the Shiny responses and verify whether the @shiny tag is available in autocomplete; done means the Shiny endpoint runs without 404 or Internal Server Error.

索引モデルが issue の本文から書いたものです。

説明

Hello,

Let me start by saying I think it's great what's possible in this new version of Plumber!

I was particularly interested in running a Shiny app through the API, but unfortunately I cannot seem to make this work. Below is my (hopefully) reproducible example

#* Echo the parameter that was sent in
#*
#* @get /echo/<msg>
#*
#* @param msg:string The message to echo back.
#*
function(msg) {
  list(
    msg = paste0("The message is: '", msg, "'")
  )
}

#* @shiny /devApp
shiny::shinyAppDir(system.file("examples-shiny", "01_hello", package = "shiny"))

When I now click the Run API button in R Studio, the server starts, and the echo endpoint is working. However, if I navigate to the devApp endpoint I get {"error":"404 - Resource Not Found"}

Also the @shiny tag is not suggested in autocomplete and seems to be absent from the package

When I tried running

api() |>
  api_shiny(
    "/ui/",
    shiny::shinyAppDir(
      system.file("examples-shiny", "01_hello", package = "shiny")
    )
  ) |>
  api_run()

This did initially work when I navigated to the UI endpoint. However, now it's also broken giving me Internal Server Error (I tried installing the dev version and the the original one again so maybe that's the reason here?)

Thanks again for creating this new version!
PJ

主要言語
R
スター
119
フォーク
17
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/plumber2 のほかの issue

posit-dev/plumber2 の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。