Shiny app no longer deploys - error with lwgeom

Hi all

I am having a problem deploying a shiny app that was working up to yesterday. I am also getting the same error to deploy a similar shiny app using the same R packages. The apps run perfectly, the problem is just during deployment. The error is this:

[2020-04-16T13:28:58.140382839+0000] Building R package: lwgeom (0.2-3)
/mnt/packages/build /mnt

  • installing to library ‘/opt/R/3.6.3/lib/R/library’
  • installing source package ‘lwgeom’ ...
    ** package ‘lwgeom’ successfully unpacked and MD5 sums checked
    ** using staged installation
    configure: CC: gcc
    configure: CXX: g++ -std=gnu++11
    configure: pkg-config proj exists, will use it
    checking proj_api.h usability... no
    checking proj_api.h presence... no
    checking for proj_api.h... no
    configure: error: proj_api.h not found in standard or given locations.
    ERROR: configuration failed for package ‘lwgeom’
  • removing ‘/opt/R/3.6.3/lib/R/library/lwgeom’
    ################################# End Task Log #################################
    Error: Unhandled Exception: Child Task 717002723 failed: Error building image: Error building lwgeom (0.2-3). Build exited with non-zero status: 1
    Execution halted

I am working on a Mac-Catalina 10.15.4

I honestly do not know what is going on. I searched everywhere, reinstall R, RStudio and all packages and still get the error. I suspect it may be related to rgdal or sf packages that were giving me a headache. I fixed those but now the deployment is failing.

This is where proj is located. Maybe the problem is there?
PROJ_LIB /Library/Frameworks/R.framework/Versions/3.6/Resources/library/sf/

I will appreciate any help.

Let me know if I did not provide much info. It is the first time trying to reach out to the community with help as I could not find any help in previous posts.

Thank you!

1 Like

i have the same probleme

Erreur : Unhandled Exception: Child Task 721558044 failed: Error building image: Error building lwgeom (0.2-3). Build exited with non-zero status: 1 De plus : Warning message: Error detecting locale: Error in read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'raw' (Using default: en_US)

I'm confused, your app runs locally but deployment is failing. Where are you deploying to? shinyapps.io perhaps, or your own shiny server ?
You mention installing and reinstalling, but is that on your local machine or the shiny server? If local then I'm not sure that's relevant. Deployment is a failure to to deploy onto a foreign machine right... Can you explain this to me ?

The app works fine in the local computer. I have been looking into this and apparently the problem is related to the last update of the lwgeom package related to sf package. The package lwgeom does not work with shiny anymore, but I believe they are working on it, and it should be fixed sometime soon.

It worked!! You are my new GOD!!! Thank you so much.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

No. I contacted Shiny developers and they could not tell me either. I just saw that there is a new beta version for the package sf. I could not install the beta version on my mac (got some error), but hopefully it will be uploaded to CRAN soon, and I hope that will solve the issue.

I figured it out!

Uninstalled my local version of lwgeom and installed the previous build instead:

install.packages("https://cloud.r-project.org/src/contrib/Archive/lwgeom/lwgeom_0.2-1.tar.gz", repo=NULL, type="source")

Have there been any updates to this? I'm having the same issue.