Skip to content
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

OS Error: Operation not permitted #546

Closed
MichelDiz opened this issue Sep 9, 2019 · 5 comments
Closed

OS Error: Operation not permitted #546

MichelDiz opened this issue Sep 9, 2019 · 5 comments

Comments

@MichelDiz
Copy link

Describe the bug
Local http communications aren't working.
I've tried gRPC, Dio, HTTP and all of them return the same error.

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DioError [DioErrorType.DEFAULT]: SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = localhost, port = 8080

Doctor Output
Please provide the output of flutter doctor -v:

flutter doctor -v
[✓] Flutter (Channel master, v1.10.1-pre.41, on Mac OS X 10.14.6 18G95, locale pt-BR)
    • Flutter version 1.10.1-pre.41 at /flutter
    • Framework revision 5a3a46ada2 (26 hours ago), 2019-09-07 18:37:41 -0400
    • Engine revision c9ea4dba8d
    • Dart version 2.5.0 (build 2.5.0-dev.4.0 ec7ec4ecf7)

[!] Android toolchain - develop for Android devices
    • Android SDK at /usr/local/Caskroom/android-platform-tools/29.0.2
    • Android NDK location not configured (optional; useful for native profiling support)
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.

    • ANDROID_SDK_ROOT = /usr/local/share/android-sdk
    ✗ No valid Android SDK platforms found in /usr/local/Caskroom/android-platform-tools/29.0.2/platforms. Directory was empty.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/setup/#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] VS Code (version 1.38.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.4.1

[✓] Connected device (1 available)
    • macOS • macOS • darwin-x64 • Mac OS X 10.14.6 18G95

! Doctor found issues in 2 categories.
@stuartmorgan
Copy link
Collaborator

As announced, macOS is now sandboxed by default. You need to add the appropriate entitlement (com.apple.security.network.client).

@MichelDiz

This comment has been minimized.

@stuartmorgan
Copy link
Collaborator

As it says in the documentation linked from the announcement: "Unless you have a very specific reason, you should always make identical changes to both files."

If you only edited that file, then your Release builds will still have the same error.

@MichelDiz

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants