Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: disable NativeAdapter on Android to fix background sync

Prateek Sunal99c7ce950cb2
diff --git a/mobile/apps/photos/lib/core/network/network.dart b/mobile/apps/photos/lib/core/network/network.dart
index b73f548b63..800294a6c4 100644
--- a/mobile/apps/photos/lib/core/network/network.dart
+++ b/mobile/apps/photos/lib/core/network/network.dart
@@ -39,7 +39,12 @@ class NetworkClient {
),
);
- _enteDio.httpClientAdapter = NativeAdapter();
+ // Only use NativeAdapter on iOS. On Android, Cronet (used by NativeAdapter)
+ // doesn't work in background tasks on Android 15, causing CronetException
+ // during background sync. Use default adapter on Android instead.
+ if (Platform.isIOS) {
+ _enteDio.httpClientAdapter = NativeAdapter();
+ }
_setupInterceptors(endpoint);