You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request (#11057) has been merged in v10.9.0, but the initializer of FIRPersistentCacheSettings has the following check, and passing FirestoreCacheSizeUnlimited throws an exception and crashes.
if (size.longLongValue < Settings::MinimumCacheSizeBytes) {
ThrowInvalidArgument("Cache size must be set to at least %s bytes",
Settings::MinimumCacheSizeBytes);
}
// The default cache size threshold is 100 MB. Configure "cacheSizeBytes"
// for a different threshold (minimum 1MB) or set to "FirestoreCacheSizeUnlimited"
// to disable clean-up.
let settings = Firestore.firestore().settings
// Set cache size to 1MB
settings.cacheSettings = PersistentCacheSettings(sizeBytes: 1_000_000)
Firestore.firestore().settings = settings
The 1,000,000 bytes specified here is less than Settings::MinimumCacheSizeBytes (1,048,576 bytes), which causes an exception and a crash.
2023-06-03 09:21:10.197299+0900 example[8810:736834] - <AppMeasurement>[I-ACS036001] Analytics screen reporting is disabled. UIViewController transitions will not be logged.
2023-06-03 09:21:10.431050+0900 example[8810:736568] <SKPaymentQueue: 0x282b34460>: No observers found that respond to "paymentQueue:shouldAddStorePayment:forProduct:", will not check for purchase intents
2023-06-03 09:21:10.434977+0900 example[8810:736568] [Firebase/Crashlytics] Version 10.10.0
2023-06-03 09:21:10.465225+0900 example[8810:736840] 10.10.0 - [FirebaseAnalytics][I-ACS023007] Analytics v.10.10.0 started
2023-06-03 09:21:10.465296+0900 example[8810:736840] 10.10.0 - [FirebaseAnalytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2023-06-03 09:21:10.509624+0900 example[8810:736840] 10.10.0 - [FirebaseMessaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messagingto ensure proper integration.2023-06-03 09:21:10.512571+0900 example[8810:736568] *** Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Cache size must be set to at least 1048576 bytes'*** First throw call stack:(0x19f43ccb4 0x19855c3d0 0x101cf29c4 0x101cf2540 0x101d2f5a8 0x101d2f548 0x10095e008 0x10095b920 0x10095af7c 0x10095bba0 0x1a17f77e4 0x1a17f6f1c 0x1a17f5ef8 0x1a17f5b70 0x1a184066c 0x1a183f6c4 0x1a183f34c 0x1a7ec30b0 0x10095cce8 0x10095cc60 0x10095dfb0 0x1be9a2dec)libc++abi: terminating due to uncaught exception of type NSException(lldb)
If using Swift Package Manager, the project's Package.resolved
Description
This pull request (#11057) has been merged in v10.9.0, but the initializer of FIRPersistentCacheSettings has the following check, and passing FirestoreCacheSizeUnlimited throws an exception and crashes.
In the documentation at https://cloud.google.com/firestore/docs/manage-data/enable-offline?hl=en#configure_cache_size there is a code example below.
The 1,000,000 bytes specified here is less than Settings::MinimumCacheSizeBytes (1,048,576 bytes), which causes an exception and a crash.
Reproducing the issue
Firebase SDK Version
10.10.0
Xcode Version
14.3
Installation Method
Swift Package Manager
Firebase Product(s)
Firestore
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetIf using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: