Shiny app no longer deploys (lwgeom)

#1

Shiny app loads locally but cannot publish. Worked fine yesterday but no longer works today.

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/R/3.4.3/lib/R/library/sf/libs/sf.so':
/opt/R/3.4.3/lib/R/library/sf/libs/sf.so: undefined symbol: _ZN17GDALDriverManager14GetDriverCountEv
ERROR: lazy loading failed for package ‘lwgeom’

  • removing ‘/opt/R/3.4.3/lib/R/library/lwgeom’
    ################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 613557907 failed: Error building image: Error building lwgeom (0.1-6). Build exited with non-zero status: 1
    Execution halted
3 Likes

Error with sf package when uploading to shinyapps.io
App crashes after deployment with package error: package or namespace load failed for ‘rgdal’
#2

I am experiencing the same issue with rgdal. Deployments worked fine until today.

0 Likes

#3

Similar issue here when using the SF package in a Shiny deployment. App worked fine last week, made minor change to a text box today, but now every redeployment errors-out.

Error in value[[3L]](cond) : package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/opt/R/3.6.0/lib/R/library/sf/libs/sf.so': /opt/R/3.6.0/lib/R/library/sf/libs/sf.so: undefined symbol: _ZN17GDALDriverManager14GetDriverCountEv Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted

Does anyone know of any work-arounds or temporary fixes?

0 Likes

#4

I have the same issue :frowning:

Any ideas or workarounds would be much appreciated

0 Likes

#5

I am having the same issue. Error message below.

Error in value[[3L]](cond) : 
  package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/R/3.4.4/lib/R/library/sf/libs/sf.so':
  /opt/R/3.4.4/lib/R/library/sf/libs/sf.so: undefined symbol: _ZN17GDALDriverManager14GetDriverCountEv
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

Any kind of work around would be great thanks.

1 Like

#6

Same issue but with rgdal.

0 Likes

#7

I ran into the same problem yesterday: everything works locally, fails while deploying to shinyapps.io
Instead of lwgeom, the failure from the sf shared object with that undefined symbol comes when trying to lazy load geogrid. My app doesn't call sf neither geogrid, but I think these come up due to my use of geofacet...

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/R/3.5.0/lib/R/library/sf/libs/sf.so':
/opt/R/3.5.0/lib/R/library/sf/libs/sf.so: undefined symbol: _ZN17GDALDriverManager14GetDriverCountEv
ERROR: lazy loading failed for package ‘geogrid’

  • removing ‘/opt/R/3.5.0/lib/R/library/geogrid’################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 613846027 failed: Error building image: Error building geogrid (0.1.1). Build exited with non-zero status: 1
    Execution halted
0 Likes

#8

Not sure if this is what fixed it or not, but in shinyapps.io under the app's advanced settings I unchecked Package Cache and then redeployed, this fixed my errors with rgdal.

4 Likes

#9

@ergz This worked, thanks! I actually tried disabling the cache yesterday, but didn't do a full redeploy from rstudio afterwards.

0 Likes

#11

This kind of works, thanks!

I noticed you deleted the later post in which you said to turn back on the Package Cache in order to speed up, I guess because you realized that made the error show up again (at least for me it did).

I will live with the slow deploying without Package Cache for now but it would be great if there could be a "faster" solution.

0 Likes

#12

Awesome, this works - thanks!!

0 Likes