Can't compile rocket chat on release version using white label repo

I cloned the repository of rocket chat made some changes in the UI , all I try to do now is to build the release version of the app so I’ll have the apk itself.
However I faced a lot of issues and error during my tries , on a Debug mode it works fine but it doesn’t help because I need the release apk.

I work on the white label repository even without making any changes in the code I tried to build a release apk and yet I face issues

I also opened an issue in github:

I will appreciate your help.

Are you accessing it over HTTPS using a reverse proxy? The debug version allows HTTP communication, but in the release version, it is not permitted.

This is only speculation. Please provide detailed information about the app, device, server, etc.

This is a local server running through http , this is an Ubuntu server

Please configure the following.
https://docs.rocket.chat/docs/configuring-ssl-reverse-proxy

You can also configure it to allow HTTP communication on specific domains, even in the release version. Since this involves security, it should be configured carefully.

This is my xml configuration:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config xmlns:tools="http://schemas.android.com/tools">
    <base-config cleartextTrafficPermitted="false">
        <trust-anchors>
            <certificates src="system" />
            <certificates src="user"
                tools:ignore="AcceptsUserCertificates" />
        </trust-anchors>
    </base-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">10.0.2.2</domain>
        <domain includeSubdomains="true">localhost</domain>
	</domain-config>
</network-security-config>

I strongly recommend setting up a reverse proxy. However, if you must change the network security settings, please refer to the following.

What beneift will come from setting a reverse proxy?
By changing the xml you have mentioned I will be able to run the release version through http communication if that is the case , what changes should I make to achieve that?

What beneift will come from setting a reverse proxy?
By changing the xml you have mentioned I will be able to run the release version through http communication if that is the case , what changes should I make to achieve that?

Everything is written in the documents I have linked so far. Please read them.

I will check those options and update later thank you