Error Publishing to shinyapps.io - Bioconductor package ChemmineOB not found.

I am trying to publish an app that works locally on my machine but it's failing when I publish it to shinyapps.io. My app uses a package from bioconductor: ChemmineR. I have included library(ChemmineR) in the app.R file. I have been able to publish the app to shinyapps but when I run it, the app crashes and I get the following error in the logs:

2019-10-28T15:37:39.992962+00:00 shinyapps[1237533]: ChemmineOB not found, falling back to web service version. This will be much slower
2019-10-28T15:37:40.173662+00:00 shinyapps[1237533]:
2019-10-28T15:37:40.179588+00:00 shinyapps[1237533]: 97:
2019-10-28T15:37:40.173659+00:00 shinyapps[1237533]: Warning: Error in : Forbidden

After seeing this error, I have tried to include library(ChemmineOB) in app.R but anytime I try to deploy the app online, I get another error but this time in RStudio.

[2019-10-28T15:43:18.743393908+0000] Building R package: ChemmineOB (1.22.0)
/mnt/packages/build /mnt

  • installing to library ‘/opt/R/3.6.1/lib/R/library’
  • installing source package ‘ChemmineOB’ ...
    ** using staged installation
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for OPENBABEL... no
    checking for OPENBABEL... no
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -E
    configure: creating ./config.status
    config.status: creating src/Makevars
    ** libs
    g++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I"/opt/R/3.6.1/lib/R/library/BH/include" -I"/opt/R/3.6.1/lib/R/library/Rcpp/include" -I/usr/local/include -I/usr/include/eigen3 -DUSE_BOOST -fpic -g -O2 -c ChemmineOB.cpp -o ChemmineOB.o
    g++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I"/opt/R/3.6.1/lib/R/library/BH/include" -I"/opt/R/3.6.1/lib/R/library/Rcpp/include" -I/usr/local/include -I/usr/include/eigen3 -DUSE_BOOST -fpic -g -O2 -c canonical.cpp -o canonical.o
    canonical.cpp:2:35: fatal error: openbabel/babelconfig.h: No such file or directory
    compilation terminated.
    /opt/R/3.6.1/lib/R/etc/Makeconf:176: recipe for target 'canonical.o' failed
    make: *** [canonical.o] Error 1
    make: *** Waiting for unfinished jobs....
    ChemmineOB.cpp:745:31: fatal error: openbabel/generic.h: No such file or directory
    compilation terminated.
    /opt/R/3.6.1/lib/R/etc/Makeconf:176: recipe for target 'ChemmineOB.o' failed
    make: *** [ChemmineOB.o] Error 1
    ERROR: compilation failed for package ‘ChemmineOB’
  • removing ‘/opt/R/3.6.1/lib/R/library/ChemmineOB’
    ################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 662224848 failed: Error building image: Error building ChemmineOB (1.22.0). Build exited with non-zero status: 1
    Execution halted

I have tried to compile the ChemmineOB from source on Windows but I'm receiving the following error when I get to the part that "For x64 builds: ... Run:

C:\openbabel\build\x64>cmake -G "Unix Makefiles" -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_RC_COMPILER=c:/Rtools/mingw_64/bin/gcc.exe -DBUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=c:/openbabel/bin/x64 -DZLIB_INCLUDE_DIR=C:/Users/kbronson/Documents/R/win-library/3.6/zlibbioc/include -DZLIB_LIBRARY=C:/Users/kbronson/Documents/R/win-library/3.6/zlibbioc/libs/x64/zlib1bioc.dll c:/openbabel/src/x64
CMake Error: The source directory "C:/openbabel/src/x64" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

I cannot seem to get this app working on shinyapps and I would love some help. If anybody is seeing some issue I'm doing wrong or can help me get this bioconductor package working, I'd greatly appreciate it.

The output of rsconnect::appDependencies() is as follows:

rsconnect::appDependencies()
package version source
1 BH 1.69.0-1 CRAN
2 BiocGenerics 0.30.0 Bioconductor
3 BiocManager 1.30.9 CRAN
4 ChemmineOB 1.22.0 Bioconductor
5 ChemmineR 3.36.0 Bioconductor
6 ClearanceTool 0.0.0.9000 github
7 DBI 1.0.0 CRAN
8 DT 0.9 CRAN
9 Deriv 3.9.0 CRAN
10 FNN 1.1.3 CRAN
11 MASS 7.3-51.4 CRAN
12 Matrix 1.2-17 CRAN
13 R6 2.4.0 CRAN
14 RColorBrewer 1.1-2 CRAN
15 RCurl 1.95-4.12 CRAN
16 RSQLite 2.1.2 CRAN
17 Rcpp 1.0.2 CRAN
18 askpass 1.1 CRAN
19 assertthat 0.2.1 CRAN
20 backports 1.1.5 CRAN
21 base64enc 0.1-3 CRAN
22 bit 1.1-14 CRAN
23 bit64 0.9-7 CRAN
24 bitops 1.0-6 CRAN
25 blob 1.2.0 CRAN
26 chemdoodle 0.3.0 github
27 chron 2.3-54 CRAN
28 cli 1.1.0 CRAN
29 clipr 0.7.0 CRAN
30 clisymbols 1.2.0 CRAN
31 colorspace 1.4-1 CRAN
32 crayon 1.3.4 CRAN
33 crosstalk 1.0.0 CRAN
34 curl 4.2 CRAN
35 desc 1.2.0 CRAN
36 digest 0.6.22 CRAN
37 dplyr 0.8.3 CRAN
38 ellipsis 0.3.0 CRAN
39 fansi 0.4.0 CRAN
40 fastmap 1.0.1 CRAN
41 fingerprint 3.5.7 CRAN
42 fs 1.3.1 CRAN
43 ggplot2 3.2.1 CRAN
44 gh 1.0.1 CRAN
45 git2r 0.26.1 CRAN
46 glue 1.3.1 CRAN
47 gridExtra 2.3 CRAN
48 gsubfn 0.7 CRAN
49 gtable 0.3.0 CRAN
50 hms 0.5.1 CRAN
51 htmltools 0.4.0 CRAN
52 htmlwidgets 1.5.1 CRAN
53 httpuv 1.5.2 CRAN
54 httr 1.4.1 CRAN
55 ini 0.3.1 CRAN
56 iterators 1.0.12 CRAN
57 itertools 0.1-3 CRAN
58 jsonlite 1.6 CRAN
59 labeling 0.3 CRAN
60 later 1.0.0 CRAN
61 lattice 0.20-38 CRAN
62 lazyeval 0.2.2 CRAN
63 magrittr 1.5 CRAN
64 memoise 1.1.0 CRAN
65 mgcv 1.8-30 CRAN
66 mime 0.7 CRAN
67 miniUI 0.1.1.1 CRAN
68 munsell 0.5.0 CRAN
69 neuralnet 1.44.2 CRAN
70 nlme 3.1-141 CRAN
71 openssl 1.4.1 CRAN
72 pillar 1.4.2 CRAN
73 pkgconfig 2.0.3 CRAN
74 plogr 0.2.0 CRAN
75 plyr 1.8.4 CRAN
76 png 0.1-7 CRAN
77 prettyunits 1.0.2 CRAN
78 promises 1.1.0 CRAN
79 proto 1.0.0 CRAN
80 purrr 0.3.3 CRAN
81 rJava 0.9-11 CRAN
82 rcdk 3.4.7.1 CRAN
83 rcdklibs 2.0 CRAN
84 readr 1.3.1 CRAN
85 reshape2 1.4.3 CRAN
86 rjson 0.2.20 CRAN
87 rlang 0.4.1 CRAN
88 rprojroot 1.3-2 CRAN
89 rstudioapi 0.10 CRAN
90 rsvg 1.3 CRAN
91 scales 1.0.0 CRAN
92 shiny 1.4.0 CRAN
93 shinyBS 0.61 CRAN
94 shinydashboard 0.7.1 CRAN
95 shinydashboardPlus 0.7.0 CRAN
96 shinyjs 1.0 CRAN
97 sourcetools 0.1.7 CRAN
98 sqldf 0.4-11 CRAN
99 stringi 1.4.3 CRAN
100 stringr 1.4.0 CRAN
101 sys 3.3 CRAN
102 tibble 2.1.3 CRAN
103 tidyselect 0.2.5 CRAN
104 usethis 1.5.1 CRAN
105 utf8 1.1.4 CRAN
106 vctrs 0.2.0 CRAN
107 viridisLite 0.3.0 CRAN
108 whisker 0.4 CRAN
109 withr 2.1.2 CRAN
110 xtable 1.8-4 CRAN
111 yaml 2.2.0 CRAN
112 zeallot 0.1.0 CRAN
113 zlibbioc 1.30.0 Bioconductor

I am running setRepositories(addURLs = c(BioC = "https://bioconductor.org/packages/3.9/bioc")) each time I restart R to push the application but I'm still running into these issues.

ChemmineOB has a system requirement on OpenBabel, which is not installed by default in shinyapps.io.

You can open an issue per the documentation, but for faster turn around you may want to supply a pull request. My guess is that this system dependency is what is needed.

Thanks @josh. I have submitted a pull request and I was able to get ChemmineOB to install correctly in the test.R file but I had to edit a couple other packages' test.R files because of deprecated functions being used to test the packages. My pull request was finally able to pass the Travis CI build check but I am not sure if updating all of the packages was necessary. Now that I have the bit of code that I need to install openbabel and ChemmineOB inside of the pull request, is there anything else that needs to be done additionally or differently or do I just have to wait until it is merged by somebody with write permissions to rstudio's github?