Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Config doesn't work if the device is locked (due to File Protection settings) #8807

Closed
cooksimo opened this issue Oct 14, 2021 · 1 comment · Fixed by #8897
Closed
Assignees

Comments

@cooksimo
Copy link

cooksimo commented Oct 14, 2021

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.4
  • Firebase SDK version: 8.7.0
  • Installation method: CocoaPods
  • Firebase Component: Remote Config

[REQUIRED] Step 2: Describe the problem

If the app is started in the background (eg a background fetch or silent notification) then the remote config database is unable to be opened and all config settings return their default value. This is due to the file protection settings in the open database call here: https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfig/Sources/RCNConfigDBManager.m#L217

Steps to reproduce:

Run an app that uses remote config on a real device with a passcode set, lock the device after the app has been installed and is just starting up.

Observe errors like the following in the logs:

[Firebase/RemoteConfig][I-RCN000015] Error message: authorization denied. Error code: 23.
[Firebase/RemoteConfig][I-RCN000016] Failed with SQL: SELECT bundle_identifier, namespace, key, value FROM main WHERE bundle_identifier = ?.

I have fixed this issue by changing the flag file protection flag to SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION but I'm unsure of the reasons this is explicitly set to SQLITE_OPEN_FILEPROTECTION_COMPLETE currently

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@firebase firebase locked and limited conversation to collaborators Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants