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

Update - I still face the same issue I have a Rocket Chat server that run behind https , the release version has the network problem.
Im really clueless.

In which case I suggest you spend some serious time reading and educating yourself.

This might help - read all of it, including the links on asking smart questions, how to document issues properly, and the XY Problem.

Also this - some stuff is the same plus some extra links.

The problem is that you want someone to magically make this work for you, and that is not going to happen.

No one is going to be able to help you unless you fully document what you have done.

So server setup and information, how you built and deployed it, network setup etc etc etc

Make it easy for others to understand what is going on.

Right now we have a vague idea you built it yourself somehow and possibly have a proxy/https.

We need a lot more than that.