-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
'default.realm.lock': open() failed: Operation not permitted #7943
Comments
Could you share the block you use to set the file protections? I know you linked @dianaafanador3 's Obj-c example from 7874, but in case your using swift or changed it up. I'm wondering if you're hitting something like this. Create a custom sub-directory, if you're not already, and set those protections. Setting the protections for the app's default Documents might not stick. |
Thanks for your reply. It's this we tried to set those protections to default Documents. If we will do this we should move all realm files to this sub-directory, you know if there is other file/directory related to realm to move ? |
Yes should be those three. Keep in mind that some of these files might get created and deleted by realm system processes, so you can't just apply the protections to the file. Do it to the whole sub-directory. Like mentioned in the earlier link, I think the sub-directory has to be created by you, and not the Documents/. |
yes thank you |
@MarouMhz just checking in to see if you have any feedback after implementing the above suggestions? |
We always have crashes reported on Crashlytics even by moving the realm files to
|
@MarouMhz this is not a valid iOS directory. Can you show us where you are setting the Realm path and tell us why you need to be setting it to a custom path? |
@MarouMhz do you have any follow up on our last question? |
Closing due to no response from user. |
@MarouMhz did you ever find a solution for this? |
How frequently does the bug occur?
Sometimes
Description
We have tracked in our Crashlytics that some users (approximately 300 users) failed to create Realm file with this error
'default.realm.lock': open() failed: Operation not permitted
We have tried to fix this according to this solution, we have set protection at none to the folder that contain default.realm and default.realm.lock before opening realm
Stacktrace & log output
Can you reproduce the bug?
Not yet
Reproduction Steps
This crash is found on the Firebase console, we can't reproduce it. According to the Firebase, it happens more than 300 times and affects more than 200 users. we tried many solutions like this but we still have this issue:
#7874 (comment)
Version
Realm 10.28.2 and earlier
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS15
Build environment
Xcode version: XCode 13.4
Dependency manager and version: cocoapods 1.11.3
The text was updated successfully, but these errors were encountered: