Flutter: OS Error: Operation not permitted, errno = 1) [Solved]

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:

  1. go to the macos/Runner/DebugProfile.entitlements file
  2. Give permissions that is missing like : com.apple.security.network.client
  3. Save
  4. 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

  1. Go to the android/app/src/main/AndroidManifest.xml
  2. Add the permissions
  3. 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

Hussain Humdani

Hussain Humdani

while ( ! ( succeed = try() ) );