Serving a shiny app
まだ誰も着手していません。
評価
調査の方向性
Reproduce the report using plumber.R, the shiny/app.R example, and the api_shiny() help example, then run the shown plumber2 API command. Inspect how the @shiny route handles the app's websocket connection and plot output. Done means either interactive rendering works at /my_app/ without the reported websocket error, or the supported behavior and limitation are clearly documented.
索引モデルが issue の本文から書いたものです。
説明
Thanks a lot for this great R package! I am new to plumber(2) and am experimenting with serving a shiny app.
I copied the app.R example app into a shiny subdirectory and defined the following plumber.R file:
#* @shiny /my_app/
shiny::shinyAppDir("./shiny")
When I start the API with
library(plumber2)
pa <- plumber2::api("plumber.R")
pa |> plumber2::api_run(showcase = FALSE)
I get the following message, confirming that the server is running:
plumber2 server started at http://127.0.0.1:8080
When I navigate to http://127.0.0.1:8080/my_app/ in chrome, I see the title and the interactive slider of the app, but no plot. When I reload the page in the browser, I get the following error in the R console:
Error in websocket callback: A payload contained invalid data
Error executing onWSMessage (1011)
I might be misunderstanding how shiny apps are intended to be used with plumber2. Perhaps you can point me in the right direction? The minimal example on the help page for api_shiny() was helpful, but I am not sure if I should expect a fully interactive plot?
Many thanks for any pointers!
Session Information
R version 4.5.1 (2025-06-13)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.6.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Los_Angeles
tzcode source: internal
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] shiny_1.11.1 plumber2_0.1.0
loaded via a namespace (and not attached):
[1] xfun_0.53 bslib_0.9.0 processx_3.8.6 websocket_1.4.4 firestorm_0.1.0
[6] callr_3.7.6 ps_1.9.1 vctrs_0.6.5 tools_4.5.1 curl_7.0.0
[11] parallel_4.5.1 tibble_3.3.0 pkgconfig_2.0.3 mirai_2.5.0 lifecycle_1.0.4
[16] compiler_4.5.1 stringr_1.5.2 textshaping_1.0.3 brio_1.1.5 codetools_0.2-20
[21] brotli_1.3.2 sodium_1.4.0 httpuv_1.6.16 routr_1.0.0 htmltools_0.5.8.1
[26] sass_0.4.10 later_1.4.4 pillar_1.11.1 jquerylib_0.1.4 cachem_1.1.0
[31] mime_0.13 parallelly_1.45.1 digest_0.6.37 stringi_1.8.7 future_1.67.0
[36] purrr_1.1.0 listenv_0.9.1 fastmap_1.2.0 cli_3.6.5 magrittr_2.0.4
[41] base64enc_0.1-3 triebeard_0.4.1 withr_3.0.2 promises_1.3.3 roxygen2_7.3.3
[46] globals_0.18.0 ragg_1.5.0 reqres_1.0.0 webutils_1.2.2 memoise_2.0.1
[51] evaluate_1.0.5 knitr_1.50 rlang_1.1.6 urltools_1.7.3.1 Rcpp_1.1.0
[56] nanonext_1.7.0 xtable_1.8-4 glue_1.8.0 xml2_1.4.0 renv_1.1.5
[61] svglite_2.2.1 fiery_1.3.0 firesafety_0.1.0 jsonlite_2.0.0 R6_2.6.1
[66] systemfonts_1.2.3 fs_1.6.6 rapidoc_9.3.4
- 主要言語
- R
- スター
- 119
- フォーク
- 17
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
posit-dev/plumber2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
`except` argument in `Plumber2$add_shiny` method is not respected対応中かも @cgiachalis が 139 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
Development Roadmapオープン
難易度 2/5 1時間未満 初心者へのやさしさ 20/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
posit-dev/plumber2 の issue をすべて見る
似ている issue
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothオープンarea/ode-pde good first issue help wanted kind/contract severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Apich-Organization/rssn#383 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PRL-PRG/r-compile-server#70 · コメント 1 件 ·
-
dependencies docker enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
posit-dev/images-workbench#257 ·
メンテナーはふだん 1 日以内に返信
-
dependencies docker enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
posit-dev/images-package-manager#188 ·
メンテナーはふだん 1 日以内に返信
-
dependencies docker enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
posit-dev/images-connect#222 ·
メンテナーはふだん 1 日以内に返信