Setting up gmail in Nextcloud 21.0.1

Im having issues seting up my gmail account in Nextcloud 21.0.1

The error is unexpected error during account creation

Im pretty surprised there is nothing in the logs

While writing this I found this page and this has worked for me

Hi, here you can find some docs on how to troubleshoot the mail app: mail/ at master ¡ nextcloud/mail ¡ GitHub
You can use this to debug your connection attempts.