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

Port shiny app to jake's account #129

Open
jhofman opened this issue Dec 9, 2021 · 20 comments
Open

Port shiny app to jake's account #129

jhofman opened this issue Dec 9, 2021 · 20 comments
Assignees
Labels
priority next action r

Comments

@jhofman
Copy link
Contributor

jhofman commented Dec 9, 2021

No description provided.

@jhofman
Copy link
Contributor Author

jhofman commented Dec 16, 2021

Looks like I'm having an renv issue running the shiny app. Here's the output from clicking "Run App: in app.R:

> shiny::runApp()
Loading required package: shiny
Warning in loadSupport(appDir, renv = sharedEnv, globalrenv = NULL) :
  Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.Loading datamations
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'dplyr' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'gganimate' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'magick' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'purrr' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'vegawidget' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'forcats' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'tidyselect' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'reactable' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'shinyWidgets' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'shinydashboard' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'shinyAce' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'palmerpenguins' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'golem' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'styler' not available.
Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package 'shinyjs' not available.
Error: Dependency package(s) 'dplyr','gganimate','magick','purrr','vegawidget','forcats','tidyselect','reactable','shinyWidgets','shinydashboard','shinyAce','palmerpenguins','golem','styler','shinyjs' not available.
Run `rlang::last_error()` to see where the error occurred.

@sharlagelfand
Copy link
Collaborator

Sounds like you need to run the renv setup first to catch up your package library - renv::restore()

@sharlagelfand
Copy link
Collaborator

@giorgi-ghviniashvili here is the shiny app URL for debugging: https://sharlagelfand.shinyapps.io/datamations/

@giorgi-ghviniashvili
Copy link
Collaborator

Hi @sharlagelfand , I see that this function is not called at all when I click Go:

image

No breakpoints are hit and nothing is printed in console. Can you make sure that this function is fired and app is really initialized?

Also would be great to save app in window using window.app, but first make sure that it is really called.

@sharlagelfand
Copy link
Collaborator

thanks @giorgi-ghviniashvili - that's the issue I was seeing, that the JS code is not called at all in the deployed version. It works fine locally but somehow the function is never called when deployed. Thanks for confirming! Will see if I can debug any more today, or at least roll back to a version where it was working.

@sharlagelfand
Copy link
Collaborator

Not having any luck deploying earlier versions either, unfortunately (cc @jhofman) - even versions from the summer! Wondering if something is up with shinyapps.io

@jhofman
Copy link
Contributor Author

jhofman commented Dec 17, 2021

That's super strange!

I can confirm that it works fine locally for me as well.

Do you think it's worth trying to get a simple reprex of this that we could post on the Shinyapps support form?

@sharlagelfand
Copy link
Collaborator

I have a repo here with a minimal example that I can't get deployed at all - curious if you can @jhofman, or if not could be a good candidate for debugging the deployment, then using as a minimal example for posting.

@jhofman
Copy link
Contributor Author

jhofman commented Jan 11, 2022

interestingly it now looks like https://sharlagelfand.shinyapps.io/datamations/ is mostly working, but it generates a NULL legend for the default datamation that shouldn't be there. (unclear to me which version of datamations is actually pushed to sharla's shiny app account.)

this legend issue might be fixed in the gemini2 branch, but there's something else broken in the shiny app on that branch. (undefined type in spec.sequence.length and source.sequence.length).

@giorgi-ghviniashvili will run the shiny app locally in the gemini2 branch and debug these console error messages.

once we get that done we can push the shiny app to my account.

p.s. for future reference, we had to update the htmlwidgets yaml file to include custom-animation.

@giorgi-ghviniashvili
Copy link
Collaborator

@jhofman managed to run the app, but now getting this error. Do you have any idea what error it is?

"Invalid First Argument"

image

@jhofman
Copy link
Contributor Author

jhofman commented Jan 18, 2022

i'm able to run the shiny app on both the main branch (commit 06aa36) and the gemini2 branch (commit 76d6b05).

@giorgi-ghviniashvili: can you try to debug and see what fittings[[1]] is set to when that breaks?

@giorgi-ghviniashvili
Copy link
Collaborator

@jhofman fittings[[1]] = small_salary

image

But when I do get(fittings[[1]]), it has an error:

image

My understanding is that maybe get function comes from a different version of R package. So version mismatch might be a problem and can't find out how to solve.

@jhofman
Copy link
Contributor Author

jhofman commented Feb 11, 2022

@willdebras, can you check that this is working for you on shinyapps.io?

@willdebras
Copy link
Collaborator

FYI, the app itself runs fine for me, but I have been running into deployment errors:

Error: Unhandled Exception: Child Task 1101457254 failed: Error parsing manifest: GithubUsername must be specified for GitHub package source
Execution halted

I can't quite isolate if there are issues with my renv environment. I've tried fresh restore of renv, updating and snapshotting of renv after updating rsconnect (since this issue seemed prominent in past versions).

rstudio/renv#308

renv.lock file seems fine. Has anybody else ran into this error?

@willdebras
Copy link
Collaborator

Weirdly rsconnect::writeManifest does not write a json object for the datamations package. I'm not certain this is expected?

@jhofman
Copy link
Contributor Author

jhofman commented Feb 16, 2022

we discussed a debugging strategy here to figure out if it's something about renv, about datamations, or something else.

current thinking is first to try to deploy the simplified test app that doesn't use renv at all: https://github.com/sharlagelfand/datamationstest

from there we can try the same but using renv to manage packages and then expand to the full shiny app both with and without renv if need be.

@willdebras
Copy link
Collaborator

Currently have the full demo app without renv and without golem deployed to shinyapps.io. Working on deploying the golem based application without renv and this version with renv to isolate issues with the environment.

@jhofman
Copy link
Contributor Author

jhofman commented Mar 10, 2022

we still have the issue of @giorgi-ghviniashvili not being able to run the R code as per this earlier comment: #129 (comment)

@giorgi-ghviniashvili, can you re-pull main and try to re-install the library?

steps for @giorgi-ghviniashvili:

  1. Re-run devtools::install_github("microsoft/datamations") or clone the repo and run R CMD build. More here for command line or using Rstudio.
  2. If there are errors, run sessionInfo() and paste that here so we know what package versions had trouble, along with the error message.

if it's still broken, @willdebras, can you see if you can help?

@jhofman
Copy link
Contributor Author

jhofman commented Mar 17, 2022

@giorgi-ghviniashvili, can you post the error message you're getting from R here?

@jhofman
Copy link
Contributor Author

jhofman commented Mar 29, 2022

@willdebras has redesigned the shiny app, will send instructions to @jhofman on how to run locally and on shinyapps.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority next action r
Projects
None yet
Development

No branches or pull requests

4 participants