Can not connect to Home Assistant

I have installed the android app on a Samsung A51 smartphone (Android 11 version). The app does not connect to my HA. I get the error ‘Unable to communicate with Home Assistant due to an SSL error. Make sure your certificate is valid’. But if I use the browser for the connection it works. It works if I use the public ip of my router and if I use the dns name with duckdns of my HA. However, when the app starts, it correctly identifies the ddns name. My version of HA is: core-2021.6.5, supervisor-2021.06.3. Some idea?
Thanks.

Do you have the mobile_app integration in your configuration.yaml file ?

is your certificate valid? do you need to accept the certifcate in chrome? Android apps need a certificate that is not only valid but is valid by a trusted CA.

Some tips can be seen here

The app also reads the internal/external URL configurations so those also get pulled in

Thank you mat44150. No I didn’t insert the integration because it should be available by default if :default_config is present. In any case I have inserted it but the result is the same.
:unamused: