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:
opened 01:00PM - 09 Oct 24 UTC
closed 04:43PM - 09 Oct 24 UTC
I cloned the repository of rocket chat made some changes in the UI , all I try t… o 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'm facing errors with the Bugsnag so I tried to remove it completely , then one of my tries indeed worked the apk was created , but once you enter the app it crashed immediately.
error log:
> Task :app:processExperimentalFossReleaseMainManifest
/home/cyberdev/Documents/test-rocket-chat/Rocket.Chat.ReactNative/android/app/src/main/AndroidManifest.xml:24:5-80:19 Warning:
application@android:allowBackup was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
/home/cyberdev/Documents/test-rocket-chat/Rocket.Chat.ReactNative/android/app/src/main/AndroidManifest.xml Warning:
provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present
> Task :app:processBugsnagExperimental-foss-releaseManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processBugsnagExperimental-foss-releaseManifest'.
> Bugsnag: Your AndroidManifest.xml is missing one or more of
apiKey/versionCode/buildUuid/versionName/package, which are required to upload to bugsnag.
apiKey=null
versionCode=999999999
buildUUID=f8a85e92-ee08-4bcc-a5db-4d53051a1ea5
versionName=4.54.0
applicationId=chat.rocket.reactnative
Manifest file = /home/cyberdev/Documents/test-rocket-chat/Rocket.Chat.ReactNative/android/app/build/intermediates/merged_manifest/experimentalFossRelease/AndroidManifest.xml
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 4m 4s
1412 actionable tasks: 1399 executed, 13 up-to-date
I feel lost and really appreciate your help
I will appreciate your help.
Furret
October 28, 2024, 6:51am
2
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
Furret
October 28, 2024, 7:20am
4
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>
Furret
October 28, 2024, 8:26am
6
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?
Furret
October 28, 2024, 8:51am
8
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