Bug if you add root domain that breaks let's encrypt certs?

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.1.40.1
How are you able to access your server: SSH

Describe your issue

I think there might be a scenario where yunohost refuses to create let’s encrypt certs.
Steps:

  1. create yunohost instance on apps.example.org (and setup dns records including wildcard for creating more subdomains)
  2. install some apps to app1.apps.example.org , app2.apps.example.org (all done using the ‘subdomain’ option when creating a domain in yunohost)
  3. add example.org as a domain in yunohost
  4. Now if you try to add an app on app3.apps.example.org it’ll complain that it’s skipping lets encrypt because the main domain doesn’t have the wildcard (even though apps.example.org does have the wildcard and it’s been working fine like that before the main domain was added)

Share relevant logs or error messages

https://paste.yunohost.org/raw/porogojile
Had this issue when installing element-call after i had added my main domain to yunohost

Discussion continues over at If you add root domain later on you break any future wildcard let's encrypt cert creations · Issue #2823 · YunoHost/issues · GitHub.
Closing on request of OP.