这是indexloc提供的服务,不要输入任何密码
Skip to content

"Most recently fetched config is already activated" after remote config activate() call #3586

@b-onc

Description

@b-onc

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10.3
  • Firebase SDK version: 6.6.0
  • Firebase Component: Remote Config
  • Component version: 4.2.1

[REQUIRED] Step 3: Describe the problem

We fetch and activate remote config with the following code:

let expirationDuration: TimeInterval
#if DEBUG
expirationDuration = 0
#else
expirationDuration = 3600
#endif
firebaseRemoteConfig.fetch(withExpirationDuration: expirationDuration) { [unowned self] (status, error) in
    if status == .success {
        log.info("Remote Config fetched")
        self.firebaseRemoteConfig.activate(completionHandler: { (error) in
            if let error = error {
                log.error(error)
            }
        })
    } else {
        log.error("Remote Config could not be fetched. \(String(describing: error))")
    }
}

We call this part of the code only one, in AppDelegate during didFinishLaunchingWithOptions

In the wild, we see lots of Remote config errors reported, they're pretty straightforward:

ActivationFailureReason: Most recently fetched config is already activated
Code: 8003

Is it an error to try to activate fetched config when it's the same as active one? If yes, which approach should we take?
We can't use the fetchAndActivate since it doesn't have the expirationDuration parameter.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions