-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
Firebase Remote Config fetch(withExpirationDuration: ) calls are intermittently failing in lower environments (dev/QA), while production works reliably using the same codebase and configuration. The failure appears to be URLSession Timeout, introducing an explicit ~5-second delay before initiating the fetch improves the success rate in lower environments, but does not fully resolve the issue. Production does not require any delay and consistently fetches Remote Config values successfully.
Logged Error:
Domain=com.google.remoteconfig.ErrorDomain
Code=8003 "cancelled"
UserInfo={
NSLocalizedDescription=cancelled,
NSUnderlyingError=Error Domain=NSURLErrorDomain Code=-999 "cancelled"
}
The underlying NSURLErrorDomain (-999) cancellation resembles a URLSession timeout or cancellation scenario; however, no explicit timeout, cancellation, or session invalidation logic is implemented on our side. This suggests the cancellation may be originating internally from the Firebase Remote Config SDK rather than from application-level networking logic
Could this be a potential initialization, lifecycle, or network readiness issue causing the Remote Config request to be cancelled in non-production environments ?
Any help / suggestion is appreciated.
Few Qs
- Is the production ready app new? no (app is has been in production for years)
- could this be a configuration issue in lower env? no (it does succeed intermittently)
- Whate is expirationDuration set to? 3600
please let me know if i can provide any more information.
Reproducing the issue
- Add the RemoteConfig.RemoteConfig.remoteConfig().fetch(withExpirationDuration: expirationDuration) on appStart
- build and launch the app.
- notice the service throws
Firebase SDK Version
12.4.0
Xcode Version
26
Installation Method
Swift Package Manager
Firebase Product(s)
Remote Config, Analytics, App Distribution, Crashlytics
Targeted Platforms
iOS
Relevant Log Output
Error Error Domain=com.google.remoteconfig.ErrorDomain Code=8003 "cancelled" UserInfo={NSLocalizedDescription=cancelled, NSUnderlyingError=0x600000e54450 {Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://firebaseremoteconfig.googleapis.com/v1/projects/<app>/namespaces/firebase:fetch?key=<key>, NSErrorFailingURLKey=https://firebaseremoteconfig.googleapis.com/v1/projects/<app>/namespaces/firebase:fetch?key=<key>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <63E60F80-B822-4439-8D89-4E7D4D967226>.<1>, NSLocalizedDescription=cancelled}}}If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
Not used