Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-1020

kotlin.IllegalStateException: [RLM_ERR_FILE_PERMISSION_DENIED]

      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: ...

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: