Forecast error when deploying shiny app in shinyapps.io

The app (app.r, there isn't an app.ui file) works fine locally (on my windows 10 machine, running R 3.4.0, Rstudio 1.1.456). When deploying an app to shinyappsio, I get this error and the deployment fails:

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/R/3.4.0/lib/R/library/fracdiff/libs/fracdiff.so':
libRblas.so: cannot open shared object file: No such file or directory
ERROR: lazy loading failed for package �forecast�

  • removing �/opt/R/3.4.0/lib/R/library/forecast�
    ################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 558084009 failed: Error building image: Error building forecast (8.4). Build exited with non-zero status: 1
    Execution halted
  • The output of "rsconnect::appDependencies()" is cited below:

rsconnect::appDependencies()
pandoc-citeproc: Could not find C:/Users/bprice/Documents/bib/harrelfe.bib
CallStack (from HasCallStack):
error, called at src\Text\CSL\Pandoc.hs:224:39 in pandoc-citeproc-0.10.4-1dO0Nlam7tLEohTuW2LNs:Text.CSL.Pandoc
pandoc.exe: Error running filter pandoc-citeproc
Filter returned error status 1
pandoc.exe: Could not fetch mystyle.css
mystyle.css: openBinaryFile: does not exist (No such file or directory)
pandoc.exe: Could not fetch mystyle.css
mystyle.css: openBinaryFile: does not exist (No such file or directory)
pandoc.exe: Could not fetch mystyle.css
mystyle.css: openBinaryFile: does not exist (No such file or directory)
pandoc.exe: Could not fetch mystyle.css
mystyle.css: openBinaryFile: does not exist (No such file or directory)
Error in loadNamespace(name) : there is no package called ‘pinp’
In addition: Warning messages:
1: In fileDependencies.R(file) :
Failed to parse C:/Users/bprice/AppData/Local/Temp/RtmpodHe9J/file201c78507e8e/R/WQA/app.r ; dependencies in this file will not be discovered.
2: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS examples.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc201c2b40d2a --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template "C:\Users\bprice\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\rmarkdown-str201c2347651.html" --mathjax --variable "mathjax-url ://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --variable code_folding=show --variable source_embed=examples.Rmd --include-after-body "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\file201ccd53cd2.html" --variable code_men [... truncated]
3: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Debugging.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc201c375a301d --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\bprice\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --css mystyle.css --include-in-header "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\rmarkdown-str201c746d4463.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 67
4: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Introduction.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc201c6b882174 --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\bprice\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --css mystyle.css --include-in-header "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\rmarkdown-str201c78be4.html" --mathjax --variable "mathjax-url mathjax.rstudiocom/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 67
5: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Performance.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc201c3cc335d5 --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\bprice\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --css mystyle.css --include-in-header "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\rmarkdown-str201c5c833dc0.html" --mathjax --variable "mathjax-mathjax.rstudiocom/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 67
6: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Portable.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc201c6ca33ef1 --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\bprice\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --css mystyle.css --include-in-header "C:\Users\bprice\AppData\Local\Temp\RtmpodHe9J\rmarkdown-str201c5b1e172.html" --mathjax --variable "mathjax-url mathjax.rstudiocom/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 67
7: In fileDependencies.R(file) :
Failed to parse C:/Users/bprice/AppData/Local/Temp/RtmpodHe9J/file201c78507e8e/R/win-library/3.4/RCurl/examples/CIS/cis.R ; dependencies in this file will not be discovered.

I appreciate any input on this error and any help deploying this app. Thanks!

This is likely due to a badly built fracdiff that has been cached. I removed it from the cache and hopefully things will work now.

You might be running appDependencies in the wrong directory?

Hi Josh,
Thank you for the quick reply. Unfortunately, I am still unable to deploy the app. A modal appears the reads: You content could not be published because of a problem on the server. More information may be available on the server's home page: https://api.shinyapps.io/
If the problem persists, contact the server's administrator (Error code: 504)

Below is what appears in Deploy on Rstudio:
Preparing to deploy application...DONE Uploading bundle for application: 519423...DONE Deploying bundle: 1648175 for application: 519423 ... Waiting for task: 558118870 building: Parsing manifest building: Building image: 1690438 building: Installing system dependencies building: Fetching packages building: Building package: fracdiff building: Building package: forecast Error: HTTP 504 GET https://api.shinyapps.io/v1/tasks/558118870 <html> <head><title>504 Gateway Time-out</title></head> <body bgcolor="white"> <center><h1>504 Gateway Time-out</h1></center> </body> </html> Execution halted

Yes, poor timing. There was just short outage that we are investigating. Please try again.

Hi Josh,
I was able to deploy the app and it appears to work normally. Thank you for your help.

Brian

1 Like