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

[tool_crash] ProcessException: Bad CPU type in executable Command: /Users/acacio/flutter/bin/cache/artifacts/engine/darwin-x64/impellerc, OS error code: 86 #114455

Closed
acacio opened this issue Nov 1, 2022 · 14 comments
Labels
a: first hour The first hour of using Flutter c: crash Stack traces logged to the console e: impeller Impeller rendering backend issues and features requests found in release: 3.4 Found to occur in 3.4 platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@acacio
Copy link

acacio commented Nov 1, 2022

Command

flutter test

Steps to Reproduce

  1. Fresh install Ventura, Mac Studio M1
  2. Fresh install Flutter
  3. try to build anything
    See doctor output below. Bad architecture binaries for arm64

Logs

ProcessException: Bad CPU type in executable Command: /Users/acacio/flutter/bin/cache/artifacts/engine/darwin-x64/impellerc, OS error code: 86

#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:401:33)
#1      Process.start (dart:io-patch/process_patch.dart:38:20)
#2      LocalProcessManager.start (package:process/src/interface/local_process_manager.dart:42:22)
#3      ErrorHandlingProcessManager.start.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:691:24)
#4      _run (package:flutter_tools/src/base/error_handling_io.dart:567:20)
#5      ErrorHandlingProcessManager.start (package:flutter_tools/src/base/error_handling_io.dart:690:12)
#6      ShaderCompiler.compileShader (package:flutter_tools/src/build_system/targets/shader_compiler.dart:72:60)
#7      writeBundle.<anonymous closure> (package:flutter_tools/src/bundle_builder.dart:184:46)
<asynchronous suspension>
#8      Future.wait.<anonymous closure> (dart:async/future.dart:522:21)
<asynchronous suspension>
#9      writeBundle (package:flutter_tools/src/bundle_builder.dart:162:3)
<asynchronous suspension>
#10     TestCommand._buildTestAsset (package:flutter_tools/src/commands/test.dart:479:7)
<asynchronous suspension>
#11     TestCommand.runCommand (package:flutter_tools/src/commands/test.dart:318:7)
<asynchronous suspension>
#12     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#15     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
<asynchronous suspension>
[!] Flutter (Channel stable, 3.3.6, on macOS 13.0 22A380 darwin-arm, locale en-CH)
    • Flutter version 3.3.6 on channel stable at /Users/acacio/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (7 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0
    ✗ 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 33.0.0)
    • Android SDK at /Users/acacio/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.0 22A380 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 107.0.5304.87

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Flutter Application Metadata

Type: app
Version: 1.0.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: stable
Creation framework version: d9111f6

@exaby73 exaby73 added the in triage Presently being triaged by the triage team label Nov 2, 2022
@exaby73
Copy link
Member

exaby73 commented Nov 2, 2022

Hello @acacio. Can you reproduce this issue on the master channel as well? You can upgrade to the master channel by running flutter channel master, then flutter upgrade. Please confirm if this is still an issue on master or not

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 2, 2022
@acacio
Copy link
Author

acacio commented Nov 2, 2022

Thx for the reply.
Here's the result, same issue:

$ flutter channel master
Switching to flutter channel 'master'...
git: From https://github.com/flutter/flutter
git:    85369313be..e99c9c7cd9  flutter-3.2-candidate.5 -> origin/flutter-3.2-candidate.5
git:    eadda3c393..9d9b0e5091  main                    -> origin/main
git:    eadda3c393..9d9b0e5091  master                  -> origin/master
git: Switched to a new branch 'master'
git: branch 'master' set up to track 'origin/master'.
Successfully switched to flutter channel 'master'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade'
acacio@MacStudonAcacio:turnmaker-flutter$ flutter upgrade
Downloading Darwin arm64 Dart SDK from Flutter engine 03d5b933164cec6db565f48b2604b07d1e838272...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  209M  100  209M    0     0  42.0M      0  0:00:04  0:00:04 --:--:-- 42.3M
Building flutter tool...
Flutter is already up to date on channel master
Flutter 3.5.0-12.0.pre.75 • channel master • https://github.com/flutter/flutter.git
Framework • revision 9d9b0e5091 (22 minutes ago) • 2022-11-02 05:31:00 -0400
Engine • revision 03d5b93316
Tools • Dart 2.19.0 (build 2.19.0-362.0.dev) • DevTools 2.19.0
acacio@MacStudonAcacio:turnmaker-flutter$ flutter doctor -v
Downloading Material fonts...                                      363ms
Downloading package sky_engine...                                  461ms
Downloading flutter_patched_sdk tools...                           525ms
Downloading flutter_patched_sdk_product tools...                   547ms
Downloading darwin-arm64 tools...                                1,058ms
Downloading darwin-arm64/font-subset tools...                      461ms
[!] Flutter (Channel master, 3.5.0-12.0.pre.75, on macOS 13.0 22A380 darwin-arm64, locale en-CH)
    • Flutter version 3.5.0-12.0.pre.75 on channel master at /Users/acacio/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9d9b0e5091 (23 minutes ago), 2022-11-02 05:31:00 -0400
    • Engine revision 03d5b93316
    • Dart version 2.19.0 (build 2.19.0-362.0.dev)
    • DevTools version 2.19.0
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information

    • If those were intentional, you can disregard the above warnings; however it is recommended to
      use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/acacio/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.0 22A380 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 107.0.5304.87

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 2, 2022
@exaby73
Copy link
Member

exaby73 commented Nov 2, 2022

Hello @acacio. Thank you for the information. Looks like the error is occuring because you installed the x64 version of Flutter. Please try to install the Apple Silicon version here and retry.

@exaby73 exaby73 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 2, 2022
@christopherfujino
Copy link
Member

[!] Flutter (Channel stable, 3.3.6, on macOS 13.0 22A380 darwin-arm, locale en-CH)
    • Flutter version 3.3.6 on channel stable at /Users/acacio/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (7 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information

So we do warn that pre-built binaries won't run. However, I'm thinking we can probably be more explicit and detect this particular situation, where the OS is right but architecture is wrong.

Although I'm not sure if there are legitimate situations where you intentionally want to run the x64 SDK in rosetta mode, WDYT @jmagman

@christopherfujino christopherfujino added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 2, 2022
@christopherfujino
Copy link
Member

Also, I wonder why we can run the Dart binary, but not downloaded executables.

@christopherfujino christopherfujino added the a: first hour The first hour of using Flutter label Nov 2, 2022
@jmagman
Copy link
Member

jmagman commented Nov 2, 2022

impellerc wasn't built for arm until #109892 in 3.4.0-18.0.pre, and this is in stable.

@acacio do you have Rosetta installed?
https://docs.flutter.dev/get-started/install/macos#system-requirements

@jmagman
Copy link
Member

jmagman commented Nov 2, 2022

impellerc wasn't built for arm until #109892 in 3.4.0-18.0.pre, and this is in stable.

Although I see now they also tried on master...

@jmagman
Copy link
Member

jmagman commented Nov 2, 2022

I'm not sure if there are legitimate situations where you intentionally want to run the x64 SDK in rosetta mode, WDYT

There's no reason not to allow this, if they install x64 Flutter and are using Rosetta and it works.

@exaby73 exaby73 added c: crash Stack traces logged to the console platform-mac Building on or for macOS specifically found in release: 3.4 Found to occur in 3.4 e: impeller Impeller rendering backend issues and features requests and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Nov 3, 2022
@jmagman
Copy link
Member

jmagman commented Nov 4, 2022

I have #114558 ready to review, but I want to hear from @acacio if the issue is that Rosetta isn't installed, or if something else is going on.

@markst
Copy link

markst commented Dec 7, 2022

thanks heaps @jmagman !

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 7, 2022
@kuhnroyal
Copy link

I have this crash on 3.3.8@stable but it seems to work with current 3.7.0-1.2.pre@beta.

@jmagman
Copy link
Member

jmagman commented Dec 28, 2022

@kuhnroyal

impellerc wasn't built for arm until #109892 in 3.4.0-18.0.pre

@github-actions
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: first hour The first hour of using Flutter c: crash Stack traces logged to the console e: impeller Impeller rendering backend issues and features requests found in release: 3.4 Found to occur in 3.4 platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

6 participants