realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

Failed to open file: Permission Denied

Open abbottkilroy opened this issue 5 months ago • 1 comments

How frequently does the bug occur?

Sometimes

Description

We've been seeing a non-trivial amount of crashes (1000+) in Crashlytics:

Libre3/RealmDatabase.swift:124: Fatal error: RealmDatabase: Failed to get a Realm object, key size=64, error=Error Domain=io.realm Code=3 "Failed to open file at path '/var/mobile/Containers/Data/Application/BB17F8F2-01AA-4604-8791-F8E251DDD8E3/Documents/trident.realm.lock': Operation not permitted" UserInfo={Error Code=3, NSFilePath=/var/mobile/Containers/Data/Application/BB17F8F2-01AA-4604-8791-F8E251DDD8E3/Documents/trident.realm.lock, Error Name=PermissionDenied, NSLocalizedDescription=Failed to open file at path '/var/mobile/Containers/Data/Application/BB17F8F2-01AA-4604-8791-F8E251DDD8E3/Documents/trident.realm.lock': Operation not permitted}

We've not seen this issue on our end in testing. Note we do write to our DB from the background when our CGM app gets a reading via BT.

Stacktrace & log output

No response

Can you reproduce the bug?

No

Reproduction Steps

No response

Version

iOS 10.49.2

What Atlas Services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

iOS 17.6.1 and earlier

Build environment

Xcode version: 15.4

abbottkilroy avatar Sep 26 '24 19:09 abbottkilroy