From 8f61e0d4086f42ce81ea92c9d9cd81557ec2fa70 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 1 Jul 2026 17:36:46 -0300 Subject: [PATCH 1/6] chore: bump @rocket.chat/mobile-crypto to BouncyCastle build Pin the mobile-crypto dependency to the commit that migrates the Android implementation from the unmaintained SpongyCastle fork to BouncyCastle (bcprov-jdk18on 1.84). Refreshes pnpm-lock.yaml and iOS Podfile.lock (MobileCrypto 0.3.0 -> 0.4.0). --- ios/Podfile.lock | 6 +++--- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2a2b7e38842..5b12425dead 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -248,7 +248,7 @@ PODS: - MMKV (2.2.4): - MMKVCore (~> 2.2.4) - MMKVCore (2.2.4) - - MobileCrypto (0.3.0): + - MobileCrypto (0.4.0): - boost - DoubleConversion - fast_float @@ -4023,7 +4023,7 @@ SPEC CHECKSUMS: libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 MMKV: 1a8e7dbce7f9cad02c52e1b1091d07bd843aefaf MMKVCore: f2dd4c9befea04277a55e84e7812f930537993df - MobileCrypto: 382f541e04405f45c323b11a404d3cc4546d0669 + MobileCrypto: cbe4be11a33b5888e77861de9346fa5d3fccc8ac nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 NitroMmkv: 4a2d747ce97a4ae740b3cb3a3853366813faf831 NitroModules: 18e41c298d86fc753fc754969fa9f84044e70711 @@ -4136,6 +4136,6 @@ SPEC CHECKSUMS: Yoga: 1e91d83a5286cfd3b725eade59274c92270540d4 ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: 4a928f36cea73defa438bb62e3a52a85a0b5f71a +PODFILE CHECKSUM: 9ef0d302aac0150cec49089c7c416db32bb9d3ec COCOAPODS: 1.15.2 diff --git a/package.json b/package.json index 37b8c598ebd..6b68a64ad8a 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@react-navigation/native-stack": "^7.17.5", "@rocket.chat/media-signaling": "1.0.0-rc.1", "@rocket.chat/message-parser": "0.31.31", - "@rocket.chat/mobile-crypto": "RocketChat/rocket.chat-mobile-crypto#main", + "@rocket.chat/mobile-crypto": "RocketChat/rocket.chat-mobile-crypto#adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5", "@rocket.chat/sdk": "RocketChat/Rocket.Chat.js.SDK#mobile", "@rocket.chat/ui-kit": "^0.39.0", "axios": "0.30.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8f5cc92591..a1b3a6a4e66 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,8 +88,8 @@ importers: specifier: 0.31.31 version: 0.31.31 '@rocket.chat/mobile-crypto': - specifier: RocketChat/rocket.chat-mobile-crypto#main - version: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/5a390be1271bfe3d4b4e8c7ae870249f2c9a8cb0(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0) + specifier: RocketChat/rocket.chat-mobile-crypto#adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5 + version: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0) '@rocket.chat/sdk': specifier: RocketChat/Rocket.Chat.js.SDK#mobile version: https://codeload.github.com/RocketChat/Rocket.Chat.js.SDK/tar.gz/b6d2b3f25b0ff8283dd71faf6dae720c47fecd8f @@ -2447,9 +2447,9 @@ packages: '@rocket.chat/message-parser@0.31.31': resolution: {integrity: sha512-YWHdin2ejndwgQJXlHIzAmQB+xvZLeEOqOkPq8RxdyTjAaGo1DbBCrc0aU7u0LOUnGN+jm3H4grnYdI9SPwitA==} - '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/5a390be1271bfe3d4b4e8c7ae870249f2c9a8cb0': - resolution: {gitHosted: true, integrity: sha512-gk3YAmpBh34zGwDH+j5gjFFvHyvkXCm3jdTUe1EdLfyjzhi9sU6xUYH8JjgVlJ6NnGxxCO5hmsdn6QRkB3vL7g==, tarball: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/5a390be1271bfe3d4b4e8c7ae870249f2c9a8cb0} - version: 0.3.0 + '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5': + resolution: {gitHosted: true, integrity: sha512-SG6J3uBJycW9YPMEYoD5d20cpxuLMVLy5sAWiGG1jQwMJddq8FCCB7ixTrfAaKiX5VlDoI7Ch4G//ocjczqGOQ==, tarball: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5} + version: 0.4.0 peerDependencies: react: '*' react-native: '*' @@ -10462,7 +10462,7 @@ snapshots: dependencies: tldts: 5.7.112 - '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/5a390be1271bfe3d4b4e8c7ae870249f2c9a8cb0(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)': + '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)': dependencies: react: 19.1.0 react-native: 0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0) From 31212d0a047353668e368330886920b6a8f1618e Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 1 Jul 2026 17:50:54 -0300 Subject: [PATCH 2/6] fix(android): exclude BouncyCastle from Jetifier bcprov-jdk18on:1.84 ships Java 25 multi-release classes that Jetifier's bundled ASM cannot parse (Unsupported class file major version 69), failing the release Kotlin compile of mobile-crypto. BouncyCastle is already AndroidX-clean and needs no jetifying, so add it to the jetifier ignorelist. --- android/gradle.properties | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/gradle.properties b/android/gradle.properties index 10c0243a7bf..ce8b83a17d2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -21,6 +21,9 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true +# Skip Jetifier for BouncyCastle: it is AndroidX-clean and ships Java 25 multi-release +# classes that Jetifier's bundled ASM cannot parse (unsupported class file major version 69) +android.jetifier.ignorelist=bcprov-jdk18on # Use this property to specify which architecture you want to build. # You can also override it from the CLI using From c793066c727b5afeeb7ebb782344a1b68fda20e0 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 1 Jul 2026 19:06:52 -0300 Subject: [PATCH 3/6] ci(android): add BouncyCastle to Jetifier ignorelist in generated gradle.properties CI regenerates android/gradle.properties from scratch (echo > ...), so the android.jetifier.ignorelist entry committed to the checked-in file is discarded for CI builds. Add it to both gradle.properties generators (the build-android composite action and the e2e-build-android workflow) so the release build can resolve bcprov-jdk18on:1.84 without Jetifier choking on its Java 25 multi-release classes. --- .github/actions/build-android/action.yml | 1 + .github/workflows/e2e-build-android.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 5d9b95e8471..3947acdc50f 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -49,6 +49,7 @@ runs: echo -e "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" >> ./gradle.properties echo -e "android.useAndroidX=true" >> ./gradle.properties echo -e "android.enableJetifier=true" >> ./gradle.properties + echo -e "android.jetifier.ignorelist=bcprov-jdk18on" >> ./gradle.properties echo -e "reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64" >> ./gradle.properties echo -e "newArchEnabled=true" >> ./gradle.properties echo -e "hermesEnabled=true" >> ./gradle.properties diff --git a/.github/workflows/e2e-build-android.yml b/.github/workflows/e2e-build-android.yml index b10a1292a7c..7a30637c0d1 100644 --- a/.github/workflows/e2e-build-android.yml +++ b/.github/workflows/e2e-build-android.yml @@ -101,6 +101,7 @@ jobs: echo -e "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" >> ./gradle.properties echo -e "android.useAndroidX=true" >> ./gradle.properties echo -e "android.enableJetifier=true" >> ./gradle.properties + echo -e "android.jetifier.ignorelist=bcprov-jdk18on" >> ./gradle.properties echo -e "reactNativeArchitectures=x86_64" >> ./gradle.properties echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties echo -e "newArchEnabled=true" >> ./gradle.properties From 123607aefa46fffa4e2ce6e07e6ae9c883af9e81 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 1 Jul 2026 20:33:39 -0300 Subject: [PATCH 4/6] fix(android): drop duplicate OSGi manifest from BouncyCastle jars bcprov-jdk18on:1.84 and its transitive org.jspecify both bundle META-INF/versions/9/OSGI-INF/MANIFEST.MF inside their multi-release jars, so mergeReleaseJavaResource fails with a DuplicateRelativeFileException. Exclude that OSGi bundle manifest (unused on Android) via a packaging block. --- android/app/build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5acff2ba4d2..1fbbffbc9dd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -95,6 +95,14 @@ android { manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String] } + packaging { + resources { + // bcprov-jdk18on and its transitive jspecify both ship this OSGi bundle + // manifest inside their multi-release jars; it is unused on Android. + excludes += ["META-INF/versions/9/OSGI-INF/MANIFEST.MF"] + } + } + signingConfigs { release { v1SigningEnabled false From 7d86f019fa6b9a63abde5e2e89d2695ee743c20c Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 2 Jul 2026 10:40:24 -0300 Subject: [PATCH 5/6] chore: re-trigger CI to confirm e2e-encryption stability The mobile-crypto SpongyCastle to BouncyCastle change is a pure package rename with no algorithm change and no JCE provider registration, so it cannot alter crypto output. Re-running the pipeline to confirm the prior E2E Run Android shard-3 (e2e-encryption) failure was environmental. From a4a26a5d15c634a6c487c236a0ef84514882e2a2 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 3 Jul 2026 10:42:13 -0300 Subject: [PATCH 6/6] chore: point @rocket.chat/mobile-crypto to main after BouncyCastle merge --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6b68a64ad8a..37b8c598ebd 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@react-navigation/native-stack": "^7.17.5", "@rocket.chat/media-signaling": "1.0.0-rc.1", "@rocket.chat/message-parser": "0.31.31", - "@rocket.chat/mobile-crypto": "RocketChat/rocket.chat-mobile-crypto#adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5", + "@rocket.chat/mobile-crypto": "RocketChat/rocket.chat-mobile-crypto#main", "@rocket.chat/sdk": "RocketChat/Rocket.Chat.js.SDK#mobile", "@rocket.chat/ui-kit": "^0.39.0", "axios": "0.30.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1b3a6a4e66..55b107cf318 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,8 +88,8 @@ importers: specifier: 0.31.31 version: 0.31.31 '@rocket.chat/mobile-crypto': - specifier: RocketChat/rocket.chat-mobile-crypto#adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5 - version: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0) + specifier: RocketChat/rocket.chat-mobile-crypto#main + version: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/69a0a250dd7c6ff0808eb659d7202be1cae7fa1c(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0) '@rocket.chat/sdk': specifier: RocketChat/Rocket.Chat.js.SDK#mobile version: https://codeload.github.com/RocketChat/Rocket.Chat.js.SDK/tar.gz/b6d2b3f25b0ff8283dd71faf6dae720c47fecd8f @@ -2447,8 +2447,8 @@ packages: '@rocket.chat/message-parser@0.31.31': resolution: {integrity: sha512-YWHdin2ejndwgQJXlHIzAmQB+xvZLeEOqOkPq8RxdyTjAaGo1DbBCrc0aU7u0LOUnGN+jm3H4grnYdI9SPwitA==} - '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5': - resolution: {gitHosted: true, integrity: sha512-SG6J3uBJycW9YPMEYoD5d20cpxuLMVLy5sAWiGG1jQwMJddq8FCCB7ixTrfAaKiX5VlDoI7Ch4G//ocjczqGOQ==, tarball: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5} + '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/69a0a250dd7c6ff0808eb659d7202be1cae7fa1c': + resolution: {gitHosted: true, integrity: sha512-v3uaVCYlj9gGZkAZe3JWQkhlGaRyahmnagbMSKtSnl+6WuLNxaPOf0GjJKVuxBdqkXPPhr23JIihVlch3FVeCQ==, tarball: https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/69a0a250dd7c6ff0808eb659d7202be1cae7fa1c} version: 0.4.0 peerDependencies: react: '*' @@ -10462,7 +10462,7 @@ snapshots: dependencies: tldts: 5.7.112 - '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/adbcf7cde4469f31efe1d4bc72a98a0ced1b80f5(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)': + '@rocket.chat/mobile-crypto@https://codeload.github.com/RocketChat/rocket.chat-mobile-crypto/tar.gz/69a0a250dd7c6ff0808eb659d7202be1cae7fa1c(react-native@0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)': dependencies: react: 19.1.0 react-native: 0.81.5(@babel/core@7.25.9)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.81.5(@babel/core@7.25.9))(@types/react@19.1.17)(react@19.1.0)