After loosing quite some time I want to share this with you. If you experience problems with Emacs and you installed it from Flathub, try from another source. It seems like permissions are causing troubles. In my case, I couldn’t get LSP for Erlang and Emacs work and error messages weren’t helping.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!