Skip to content

On macOS Catalina unsigned binaries blocked by Gatekeeper e.g. kernel-service.dart.snapshot, analysis_server.dart.snapshot #36714

@christopherfujino

Description

@christopherfujino

For macOS Catalina, Apple has changed the way Gatekeeper verifies binaries downloaded from the internet (reference), and apparently disabled the "open anywhere" option from System Preferences. Currently, using the flutter tool is not possible unless the user runs sudo spctl --master-disable from the command line reference.

The following commands are flagged:

  1. flutter/bin/cache/dart-sdk/bin/dart binary
  2. flutter/bin/cache/dart-sdk/bin/snapshots/*.dart.snapshot

Here is some log output when issuing command flutter channel master:

flutter@macN1 flutter % bin/flutter channel master
Switching to flutter channel 'master'...
../../third_party/dart/runtime/bin/snapshot_utils.cc: 149: error: Failed to memory map snapshot: /Users/flutter/flutter/bin/cache/dart-sdk/bin/snapshots/kernel-service.dart.snapshot
 
version=2.4.0 (Wed Jun 19 11:53:45 2019 +0200) on "macos_x64"
thread=5891, isolate=(null)(0x0)
  pc 0x000000010bd945d5 fp 0x0000700006ee7c40 dart::Profiler::DumpStackTrace(void*)
  pc 0x000000010badfdc2 fp 0x0000700006ee7d20 dart::Assert::Fail(char const*, ...)
  pc 0x000000010bac2dfb fp 0x0000700006ee7dd0 dart::bin::Snapshot::TryReadAppSnapshot(char const*)
  pc 0x000000010bac7eea fp 0x0000700006ee7e50 dart::bin::CreateIsolateAndSetup(char const*, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**)
  pc 0x000000010bcdba48 fp 0x0000700006ee7f00 dart::RunKernelTask::Run()
  pc 0x000000010be36a0d fp 0x0000700006ee7f30 dart::ThreadPool::Worker::Loop()
  pc 0x000000010be36880 fp 0x0000700006ee7f70 dart::ThreadPool::Worker::Main(unsigned long)
  pc 0x000000010bd90fc1 fp 0x0000700006ee7fb0 dart::ThreadStart(void*)
  pc 0x00007fff73470cce fp 0x0000700006ee7fd0 _pthread_start
  pc 0x00007fff7346d72b fp 0x0000700006ee7ff0 thread_start
-- End of DumpStackTrace
bin/flutter: line 183:  8210 Abort trap: 6           "$DART" --packages="$FLUTTER_TOOLS_DIR/.packages" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"

Doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel master, v1.8.2-pre.133, on Mac OS X 10.15 19A512f, locale en-US)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Chrome - develop for the web
[!] Android Studio (version 3.4)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.36.1)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)

! Doctor found issues in 3 categories.
flutter@macN1 flutter % flutter doctor -v
[!] Flutter (Channel master, v1.8.2-pre.133, on Mac OS X 10.15 19A512f, locale en-US)
    • Flutter version 1.8.2-pre.133 at /Users/flutter/flutter
    • Framework revision d0238c711e (6 hours ago), 2019-07-22 12:14:27 -0400
    • Engine revision 849fe73170
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 a089199b93)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/flutter/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Users/flutter/Downloads/Xcode-beta.app/Contents/Developer
    • Xcode 11.0, Build version 11M374r
    • CocoaPods version 1.7.5

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS      • macOS                                    • darwin-x64     • Mac OS X 10.15 19A512f
    • Chrome     • chrome                                   • web-javascript • Google Chrome 75.0.3770.142

! Doctor found issues in 3 categories.

Metadata

Metadata

Labels

dependency: dartDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.‎‍platform-catalinaIssues related to macOS Catalina

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions