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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

kotlin.IllegalStateException: [RLM_ERR_FILE_PERMISSION_DENIED] #1656

Closed
fngbala-luna opened this issue Feb 9, 2024 · 4 comments
Closed

kotlin.IllegalStateException: [RLM_ERR_FILE_PERMISSION_DENIED] #1656

fngbala-luna opened this issue Feb 9, 2024 · 4 comments
Labels
Encryption:Off Frequency:Sometimes More-information-needed More information needed from the reporter. The issue will autoclose if no more information is given. O-Community Repro:Sometimes T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@fngbala-luna
Copy link

fngbala-luna commented Feb 9, 2024

How frequently does the bug occur?

Sometimes

Description

Hi 馃憢
I am using realm-kotlin in a KMP project with Android and iOS.
For some time now, we've experienced a large number of crashes on iOS :
Caused by: kotlin.IllegalStateException: [RLM_ERR_FILE_PERMISSION_DENIED]: Failed to open file at path '/var/mobile/Containers/Data/Application/8709C61B-95B4-48BA-BB32-2BC399D5A03D/Documents/default.realm.lock': Operation not permitted

See bellow the full stacktrace (note that we use crashkIOS to have readable logs on Firebase Crashlytics : https://crashkios.touchlab.co/)

Stacktrace & log output

Could not create instance for '[Singleton:'fr.isic.enjoy.domain.usecase.user.GetUserAsFlowUseCase']' 
Caused by: org.koin.core.error.InstanceCreationException: 
Could not create instance for '[Singleton:'fr.isic.enjoy.domain.repository.UserRepository']'
 Caused by: org.koin.core.error.InstanceCreationException: Could not create instance for '[Singleton:'fr.isic.enjoy.repository.datasource.user.UserLocalDataSource']'
 Caused by: org.koin.core.error.InstanceCreationException: Could not create instance for '[Singleton:'fr.isic.enjoy.storage.dao.UserDao']' 
Caused by: org.koin.core.error.InstanceCreationException: Could not create instance for '[Singleton:'io.realm.kotlin.Realm']'
 Caused by: kotlin.IllegalStateException: [RLM_ERR_FILE_PERMISSION_DENIED]: Failed to open file at path '/var/mobile/Containers/Data/Application/8709C61B-95B4-48BA-BB32-2BC399D5A03D/Documents/default.realm.lock': Operation not permitted


Crashed: com.google.firebase.crashlytics.ios.exception
SIGABRT ABORT 0x00000001b8214964

Can you reproduce the bug?

Sometimes

Reproduction Steps

We never managed to reproduce it during development, however a lot of our users are experiencing it.

Version

1.12.0

What Atlas App Services are you using?

-- select --

Are you using encryption?

No

Platform OS and version(s)

iOS 15+

Build environment

Android Studio version: ...
Android Build Tools version: ...
Gradle version: ...

@kneth
Copy link
Member

kneth commented Feb 9, 2024

@fngbala-luna If you are using sync, upgrading to Realm Kotlin 1.12.0 might require that you manually delete some files (see https://github.com/realm/realm-kotlin/blob/main/CHANGELOG.md#1120-2023-11-02 for details).

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Feb 9, 2024
@fngbala-luna
Copy link
Author

Hi, thanks for your answer.
However we do not use the sync feature in our project.

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Feb 10, 2024
@kneth
Copy link
Member

kneth commented Feb 13, 2024

@fngbala-luna If the app is running as device is locked, you might have to relax the permissions.

@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Feb 13, 2024
@sync-by-unito sync-by-unito bot added the More-information-needed More information needed from the reporter. The issue will autoclose if no more information is given. label Apr 9, 2024
Copy link
Contributor

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Encryption:Off Frequency:Sometimes More-information-needed More information needed from the reporter. The issue will autoclose if no more information is given. O-Community Repro:Sometimes T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

2 participants