You use image from the internet on you mac app. Sometime you get this error.
OS Error: Operation not permitted, errno = 1) this error is related to the Operating System. So you can solve this error by giving the required permission to the app.
Let’s get started!
For Mac OS
Steps to Solve the OS Error: Operation not permitted, errno = 1) in mac OS:
- go to the macos/Runner/DebugProfile.entitlements file
- Give permissions that is missing like : com.apple.security.network.client
- Save
- Rebuild Project
Make sure you change it in both debug and release mode both
Debug Mode
go to macos/Runner/DebugProfile.entitlements
Add these lines
<key>com.apple.security.network.client</key>
<true/>
Release Mode
go to macos/Runner/Release.entitlements
Again add the lines
<key>com.apple.security.network.client</key>
<true/>
Rebuild the app
Android OS
Steps to solve OS Error: Operation not permitted, errno = 1) error on Android
- Go to the android/app/src/main/AndroidManifest.xml
- Add the permissions
- Save and rebuild
How to add permissions in android?
<uses-permission android:name="android.permission.INTERNET"/>
You can visit this page for more info about permissions.
Conclusion
Hope you solve this flutter error. Thanks