Electron app tries to create /mongodb-realm/ folder despite setting writable path

Hello, I’ve built an Electron app that uses a Realm synced database. I’m on macOs.
On development environment everything works fine.
But when I build the app for production, it tries to create a /mongodb-realm/ folder in the app folder.
I get the error: Uncaught Error: make_dir() failed: Read-only file system Path: /mongodb-realm/

But I’m setting the “path” of the Realm to get created in “Library/Application Support/myApp” so that it’s writable.
So in dev mode I see my realm db being created at this path but Realm still created a /mongodb-realm/ folder with some files in the app folder.
And of course this crashes when I build the app because it’s not a writable path.
Is there a way, a setting for this “mongodb-realm” folder to be created elsewhere? or am I missing something?

1 Like

I was able to resolve the issue thanks to this topic : https://www.mongodb.com/community/forums/t/realm-not-working-with-packaged-electron-app/15256/2

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.