I'm using Flutter in Visual Studio Code and Android Studio with a Pixel 6a emulator with Android 13 to preview the app.
Despite I could connect to other services of Firebase (Authentication, Storage, App Check), when arriving to Firestore, I have a certificate error that I'm not being able to solve :
After searching, I've read I would need to use an Android Emulator with Google Play services active to be able to have the correct certificates and also that only Android 13 and 14 are stable enough to have these certificates integrated in the image. So I've changed my emulator, previously a Pixel 6 with Android 16 and Google APIs, to a Pixel 6a with Android 13 and Google Play Services.
When I was working with Storage service of Firebase this seemed to solve the SSL problem, but now that I've started with Firestore, the problem appeared again.
I've already generated a self signed certificate, put it in assets/certs and in res/raw of the project, created a network_security_config.xml in res/xml, with the content :
<network-security-config>
<domain-config>
<domain includeSubdomains="true">com.example.chat_app</domain>
<trust-anchors>
<certificates src="@raw/chat_app_certificate_name"/>
</trust-anchors>
</domain-config>
</network-security-config>
and pointed to it in my android manifest :
<application
android:label="chat_app"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:networkSecurityConfig="@xml/network_security_config">
Finally, I've installed this certificate with the private key in the emulator, but the error continue. Moreover, I've tried to install the other certificate I have from android keystore in the emulator but this is not accepted to be installed without a private key.
So, beside trying to create a true certificate from a trusted CA, I'm getting out of options.
Is it really needed al this configuration to connect to Firestore while developing?
