Shiny application works fine locally, but I've an error when I publish it in shinyapps.io.

Hello, everyone

My shiny-app gives the following error:

An error has occurred. The application failed to start. Contact the author for more information.

I am aware that it is a very generic error, but checking the server log, I cannot find what the problem is. Could someone please tell me how I can fix the problem?

Thank you very much in advance.

2022-04-20T11:11:35.592894+00:00 shinyapps[6130581]: Running on host: 9b8b15dd367f
2022-04-20T11:11:35.593004+00:00 shinyapps[6130581]: LANG: C.UTF-8
2022-04-20T11:11:35.592934+00:00 shinyapps[6130581]: Server version: 2022.03.1
2022-04-20T11:11:35.593072+00:00 shinyapps[6130581]: Working directory: /srv/connect/apps/LabourMarket2
2022-04-20T11:11:35.593122+00:00 shinyapps[6130581]: R version: 4.1.3
2022-04-20T11:11:35.593201+00:00 shinyapps[6130581]: shiny version: 1.7.1
2022-04-20T11:11:35.593267+00:00 shinyapps[6130581]: httpuv version: 1.6.5
2022-04-20T11:11:35.593566+00:00 shinyapps[6130581]: jsonlite version: 1.8.0
2022-04-20T11:11:35.593627+00:00 shinyapps[6130581]: RJSONIO version: (none)
2022-04-20T11:11:35.593487+00:00 shinyapps[6130581]: knitr version: (none)
2022-04-20T11:11:35.593338+00:00 shinyapps[6130581]: rmarkdown version: (none)
2022-04-20T11:11:35.593697+00:00 shinyapps[6130581]: htmltools version: 0.5.2
2022-04-20T11:11:35.593768+00:00 shinyapps[6130581]: reticulate version: (none)
2022-04-20T11:11:35.593849+00:00 shinyapps[6130581]: Using pandoc: /opt/connect/ext/pandoc/2.16
2022-04-20T11:11:35.594237+00:00 shinyapps[6130581]: Starting R with process ID: '27'
2022-04-20T11:11:35.593991+00:00 shinyapps[6130581]: Using jsonlite for JSON processing
2022-04-20T11:11:35.594057+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594338+00:00 shinyapps[6130581]: Shiny application starting ...
2022-04-20T11:11:35.594464+00:00 shinyapps[6130581]: Attaching package: ‘dplyr’
2022-04-20T11:11:35.594402+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594527+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594586+00:00 shinyapps[6130581]: The following objects are masked from ‘package:stats’:
2022-04-20T11:11:35.594685+00:00 shinyapps[6130581]:     filter, lag
2022-04-20T11:11:35.594634+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594732+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594785+00:00 shinyapps[6130581]: The following objects are masked from ‘package:base’:
2022-04-20T11:11:35.594938+00:00 shinyapps[6130581]:     intersect, setdiff, setequal, union
2022-04-20T11:11:35.594874+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.594994+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.595061+00:00 shinyapps[6130581]: Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
2022-04-20T11:11:35.595137+00:00 shinyapps[6130581]: Please note that rgdal will be retired by the end of 2023,
2022-04-20T11:11:35.595203+00:00 shinyapps[6130581]: plan transition to sf/stars/terra functions using GDAL and PROJ
2022-04-20T11:11:35.595261+00:00 shinyapps[6130581]: at your earliest convenience.
2022-04-20T11:11:35.595312+00:00 shinyapps[6130581]: 
2022-04-20T11:11:35.595369+00:00 shinyapps[6130581]: rgdal: version: 1.5-28, (SVN revision 1158)
2022-04-20T11:11:35.595425+00:00 shinyapps[6130581]: Geospatial Data Abstraction Library extensions to R successfully loaded
2022-04-20T11:11:35.595478+00:00 shinyapps[6130581]: Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
2022-04-20T11:11:35.595586+00:00 shinyapps[6130581]: GDAL binary built with GEOS: TRUE 
2022-04-20T11:11:35.595530+00:00 shinyapps[6130581]: Path to GDAL shared files: /usr/share/gdal
2022-04-20T11:11:35.595645+00:00 shinyapps[6130581]: Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
2022-04-20T11:11:35.595690+00:00 shinyapps[6130581]: Path to PROJ shared files: /usr/share/proj
2022-04-20T11:11:35.595743+00:00 shinyapps[6130581]: Linking to sp version:1.4-6
2022-04-20T11:11:35.595800+00:00 shinyapps[6130581]: To mute warnings of possible GDAL/OSR exportToProj4() degradation,
2022-04-20T11:11:35.595860+00:00 shinyapps[6130581]: use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
1 Like

I have the same issue!!

I would guess that the log you shared is incomplete.
How are you accessing it ?
I would use the show logs function from rsconnect

I fixed it, many thanks. It was a problem in my server code.
Many thanks

Could you comment what was the problem in the server code? I have the same issue and it would help me a lot to know how I could solve it or to know if I have a similar error. Thanks in advance!