Why does heatmap work locally but not on server?

Locally is fine. It works every time, but when I try exactly the same heamap for the same data, but on server I got error "An error has occurred. Check your logs or contact the app author for clarification". Any idea?

We would have to look at your logs (at a minimum) to give an informed opinion.
Could be a package version issue, could be a memory issue, could be many things.

my advice is to start with rsconnect::showLogs() function