-
Notifications
You must be signed in to change notification settings - Fork 135
[ERROR] Flutter desktop macOS: Storage error "Operation not permitted" (code 1) #248
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
Comments
Thanks for bumping this to a standalone issue out of #166 - I'll repeat my last comment from there:
|
I followed the steps on the supplied link but still get the same error as original poster reported. |
There's a macOS specific section in the Flutter Desktop docs: https://flutter.dev/desktop#macos-specific-support Haven't tried yet, but seems like a different approach... |
Thanks for that link, I've updated the following lines to FALSE in my DebugProfile.entitlements and Release.entitlements file: |
However, that means you won't be able to distribute the app through app store, right? |
I did the same thing and turned off app-sandbox temporary so I can continue working on my app but I will have to enable it when it's done. From what I understood it's a special security thing from Apple that doesn't allow you to write/read files outside of your app's container folder without the user's consent. But no matter the path I'm giving to ObjectBox it keeps throwing me this error while just creating a simple file at that same path works. |
Yeah, I'm 99.9 % sure it's not about the path but some of the other native API calls that are being executed during store setup. We'll have to take app-sandboxing as a known limitation for now until we figure out what permissions to set up so that it works. And I'm pretty sure it will, since the same native code is used for objectbox-swift... |
The com.apple.security.cs.disable-library-validation entitlement is a candidate for causing the error:
Not exactly sure what Flutter does with the ObjectBox lib; depending on that there may be a mismatch... Maybe someone likes to try this entitlement and report back? |
I just tried it, but I still get the exception. |
problem solved |
@sunilpandit2 For development this is fine. But to build a release app, you might want to set a |
Okay
Thank you for responding
… On 22 Apr 2024, at 12:47 PM, Uwe - ObjectBox ***@***.***> wrote:
@sunilpandit2 <https://github.com/sunilpandit2> For development this is fine. But to build a release app, you might want to set a macosApplicationGroup as described in the Store docs <https://pub.dev/documentation/objectbox/latest/objectbox/Store/Store.html>.
—
Reply to this email directly, view it on GitHub <#248 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AMNYFVWNBQLUIY4F7R3PPTDY6S2O3AVCNFSM45ELNLS2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBWHA3DKNZSGI4Q>.
You are receiving this because you were mentioned.
|
This works for me:
Update in DebugProfile.entitlements and Release.entitlements |
@greenrobot-team I opened runner in xcode and in signing and capabilities added "App Groups". Still it did not work. Did I do it right or do I have to do something else? I have also structured my objectbox like this: Still nothing seems to be working. |
@vaind this was a fix and not the solution. Did you happen to find a solution for this? |
@Shashwat2708 Maybe this: the application group value must be 19 characters or shorter. If that is not the issue, please open a new issue with enough information so we can reproduce this. |
The text was updated successfully, but these errors were encountered: