realm / realm-kotlin

Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.
Apache License 2.0
878 stars 52 forks source link

RLM_ERR_FILE_PERMISSION_DENIED Failed to open at path /default.lock: Read-only file system #1743

Open mehmetakify opened 1 month ago

mehmetakify commented 1 month ago

How frequently does the bug occur?

Always

Description

Dmg file is created and installed with compose desktop, after start the app this error occurs and app crashes in App Silicon device.

Executable file in the Application Contents works.

./gradlew run works. ./gradlew packageDmg works and creates dmg file. Dmg file can install. After start the app, app crashes. I tried the change the realm file directory but problem does not solve.

Also running in the command-line at /Applications/<PACKAGE_NAME>.app/Contents/MacOS/<PACKAGE_NAME> works without any error.

Itried also realm-kotlin version 1.10.2, and 1.16.0.

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

1.10.2 - 1.16.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Mac Sonoma 14.4.1

Build environment

Android Studio version: Iguana 2023.2.1 Gradle version: 8.3.2

sync-by-unito[bot] commented 1 month ago

➤ PM Bot commented:

Jira ticket: RKOTLIN-1078

rorbech commented 1 month ago

Hi @mehmetakify. Thanks for the report. We are using the platform API's to obtain the default path for storing application specific data. For MacOS it is done with this API.

I don't know if the dmg-installer somehow returns something unexpected, but you can also override the directory of the realm yourself with `RealmConfiguration.Builder.directory.