From 54c96bd7370f572a9b3a5216355a50d6decac218 Mon Sep 17 00:00:00 2001 From: Rebroad Date: Sun, 4 Jan 2026 01:41:38 -0500 Subject: [PATCH] Fix: Add @ConscryptMode annotation to FileTransferTest to resolve UnsatisfiedLinkError (#543) Robolectric 4.9+ uses Conscrypt as the default security provider, which requires native libraries that aren't available in the test environment. Adding @ConscryptMode(Mode.OFF) disables Conscrypt and uses BouncyCastle instead, which resolves the test failures. This fixes the build failures in FileTransferTest where all 9 tests were failing with UnsatisfiedLinkError when Conscrypt tried to load native libraries. Fixes #542 --- app/src/test/kotlin/com/bitchat/FileTransferTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/test/kotlin/com/bitchat/FileTransferTest.kt b/app/src/test/kotlin/com/bitchat/FileTransferTest.kt index 1798f5fe..31131540 100644 --- a/app/src/test/kotlin/com/bitchat/FileTransferTest.kt +++ b/app/src/test/kotlin/com/bitchat/FileTransferTest.kt @@ -8,12 +8,14 @@ import org.junit.Assert.assertNotNull import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.ConscryptMode import java.io.File import java.nio.ByteBuffer import java.nio.ByteOrder import java.util.Date @RunWith(RobolectricTestRunner::class) +@ConscryptMode(ConscryptMode.Mode.OFF) // Disable Conscrypt to avoid native library loading issues class FileTransferTest { @Test