PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
203 stars 235 forks source link

SHINY App Errors -EPIC ISSUE for SHINY Code Hardening on VM #2057

Open tonygardella opened 6 years ago

tonygardella commented 6 years ago

Smaller Issues will linked to this Epic Issue for each Shiny App. The goal is to have them all loading and working by AGU, starting with WorkflowPlot for release 1.6.0.

Describe the bug Loading of SHINY app pages out of the box on the VM results in varying levels of success and behavior if something is going wrong. BenchmarkingReport - Error with message pointing to check out logs and contact the app author BrowDog - Loading Fine Data-Ingest - Error with "The application failed to start. The application exited during initialization." Expert Elicitation - Error with Grey screen saying "Disconnected from the server" Global Sensitivity - Error with Grey screen saying "Disconnected from the server" PEcAn.depend - Error with Proxy, "The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET/shiny/Pecan.depend/. Reason:Error reading from remote server". ViewMet - Loading Fine WorkflowPlot- Error with Grey screen saying "Disconnected from the server"

To Reproduce Steps to reproduce the behavior:

  1. Open Web GUI with pecan VM running by going to http://localhost:6480/ in local browser
  2. Click on 'Output Visualization'
  3. Click on each Shiny app
  4. See error for each one

Expected behavior An interactive page that allows for

Screenshots If applicable, add screenshots to help explain your problem. image

Machine (please complete the following information):

Additional context Add any other context about the problem here.

robkooper commented 6 years ago

Following code will preserve the log files on the VM:

sudo -s
echo "preserve_logs true;" >> /etc/shiny-server/shiny-server.conf
service shiny-server restart
tonygardella commented 6 years ago

VM is missing these R packages that SHINY apps need: 'shinytoastr' for Data-Ingest 'SHELF' for Elicitation 'graph' then 'CodeDepends' for Pecan.depend

For BenchmarkReport an object "results" is missing so the page doens't load. I believe that's because I haven't done a benchmark run. Need @bcow 's expertise here.

tonygardella commented 6 years ago

@robkooper Went to add packages and saw all of them are in the DESCRIPTION File of their respective shiny directories, listed under "depends". Is that the wrong place? Also saw your latest commit to the release branch. Does that solve this?

robkooper commented 6 years ago

Nope that is the right place, problem is that you don't install the shiny packages, and thus the depends is not parsed, good to know that they are listed there.

serbinsh commented 6 years ago

I suppose we dont yet consider viewMet stable to be released so posting this new bug here?

2018-08-27 09:02:24 DEBUG  [server.R#148: PEcAn.logger::logger.debug] :
2018-08-27 09:02:25 DEBUG  [server.R#25: PEcAn.logger::logger.debug] : Site 76 selected
2018-08-27 09:02:48 DEBUG  [server.R#25: PEcAn.logger::logger.debug] :
   Site 1000000146 selected
2018-08-27 09:03:07 DEBUG  [server.R#109: PEcAn.logger::logger.debug] :
   Loading AmerifluxLBL_CF_gapfill
2018-08-27 09:03:07 DEBUG  [server.R#110: PEcAn.logger::logger.debug] : Loading 2005
Warning in postgresqlExecStatement(conn, statement, ...) :
  RS-DBI driver warning: (unrecognized PostgreSQL field type geometry (id:77969) in column 17)
2018-08-27 09:03:07 WARN   [server.R#124: query.format.vars] :
   Units not convertible for precipitation_flux with units of Kg/m2/s .
   Please make sure the varible has units that can be converted to kg m-2
   s-1

Attaching package: ‘PEcAn.utils’

The following object is masked from ‘package:utils’:

    download.file

Attaching package: ‘lubridate’

The following objects are masked from ‘package:data.table’:

    hour, isoweek, mday, minute, month, quarter, second, wday, week,
    yday, year

The following object is masked from ‘package:base’:

    date

udunits system database read
Warning in dat %in% as.numeric(format$na.strings) :
  NAs introduced by coercion
Error in str_detect(t.units, "ince\\s[0-9]{4}[.-][0-9]{2}[.-][0-9]{2}.*\\s-\\d+") :
  could not find function "str_detect"
bcow commented 6 years ago

@serbinsh I think what you posted is actually a udunits parsing problem - some of the oldest variables in bety have units that can't be parsed. So I think the best solution is to go fix the entries whenever this comes up.

> ud.is.parseable("Kg/m2/s")
[1] FALSE
bcow commented 6 years ago

Also, udunits2 will not parse Kg.

> ud.is.parseable("Kg")
[1] FALSE
> ud.is.parseable("kg")
[1] TRUE
mdietze commented 6 years ago

Agree with @bcow that the solution is to fix Bety entries. Would be good to open a separate issue about running a check on all bety variable units so we can go back and fix old entries. Also, FWIW I had Liam put this exact check in the formats variables part of his new data Ingest app to help avoid this moving forward

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 365 days with no activity.

infotroph commented 4 years ago

@mdietze @bcow @robkooper Is this still active? Maybe something to revisit as part of implementing #2162?

mdietze commented 4 years ago

When's our next release scheduled? I'd say that we should tag this one to the next release to make sure we've got all Shiny apps working then, and make sure we close this at that point.