-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
resolution: fixedA fix has been merged or is pending merge from a PR.A fix has been merged or is pending merge from a PR.type: bugSomething isn't workingSomething isn't working
Description
Bug report
After updating Flutter to version 3.10.5 setting cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED stopped working, showing the error when running the app:
10.10.0 - [FirebaseFirestore][I-FST000001] Invalid argument: Cache size must be set to at least 1048576 bytes
libc++abi: terminating due to uncaught exception of type std::invalid_argument: Cache size must be set to at least 1048576 bytes
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001f5782558 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
-> 0x1f5782558 <+8>: b.lo 0x1f5782578 ; <+40>
0x1f578255c <+12>: pacibsp
0x1f5782560 <+16>: stp x29, x30, [sp, #-0x10]!
0x1f5782564 <+20>: mov x29, sp
Target 0: (Runner) stopped.
Sample code
FirebaseFirestore.instance.settings = const Settings(
persistenceEnabled: true,
sslEnabled: true,
cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED,
);
It works if I set a specific value for the cache size:
FirebaseFirestore.instance.settings = const Settings(
persistenceEnabled: true,
sslEnabled: true,
cacheSizeBytes: 1048576 * 10000,
);
Only on IOS.
Flutter doctor
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale pt-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.79.0)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Flutter dependencies
Click To Expand
cloud_firestore: ^4.8.1
firebase_core: ^2.14.0
Metadata
Metadata
Assignees
Labels
resolution: fixedA fix has been merged or is pending merge from a PR.A fix has been merged or is pending merge from a PR.type: bugSomething isn't workingSomething isn't working