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: /usr/local/bin/openssl, OS error code: 86 #115691

Closed
llliang opened this issue Nov 19, 2022 · 8 comments
Labels
c: crash Stack traces logged to the console platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@llliang
Copy link

llliang commented Nov 19, 2022

Command

flutter create -t module flutter_module

Steps to Reproduce

  1. ...
  2. ...
  3. ...

Logs

ProcessException: Bad CPU type in executable Command: /usr/local/bin/openssl, 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:692:24)
#4      _run (package:flutter_tools/src/base/error_handling_io.dart:568:20)
#5      ErrorHandlingProcessManager.start (package:flutter_tools/src/base/error_handling_io.dart:691:12)
#6      _DefaultProcessUtils.start (package:flutter_tools/src/base/process.dart:427:28)
#7      _getCodeSigningIdentityDevelopmentTeam (package:flutter_tools/src/ios/code_signing.dart:232:53)
<asynchronous suspension>
#8      CreateCommand.runCommand (package:flutter_tools/src/commands/create.dart:296:25)
<asynchronous suspension>
#9      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1257:27)
<asynchronous suspension>
#10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
<asynchronous suspension>
#15     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
<asynchronous suspension>
�[32m[✓]�[39m Flutter (Channel master, 3.6.0-6.0.pre.22, on macOS 13.0.1 22A400 darwin-x64, locale zh-Hans-CN)
    �[32m•�[39m Flutter version 3.6.0-6.0.pre.22 on channel master at /Users/Neo/flutter/flutter
    �[32m•�[39m Upstream repository https://github.com/flutter/flutter.git
    �[32m•�[39m Framework revision 633d7ef046 (87 minutes ago), 2022-11-19 03:27:24 -0500
    �[32m•�[39m Engine revision 916fd798de
    �[32m•�[39m Dart version 2.19.0 (build 2.19.0-406.0.dev)
    �[32m•�[39m DevTools version 2.19.0
    �[32m•�[39m Pub download mirror https://pub.flutter-io.cn
    �[32m•�[39m Flutter download mirror https://storage.flutter-io.cn

�[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    �[32m•�[39m Android SDK at /Users/Neo/Library/Android/sdk
    �[32m•�[39m Platform android-31, build-tools 31.0.0
    �[32m•�[39m Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    �[32m•�[39m All Android license
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Nov 21, 2022
@darshankawar
Copy link
Member

There's a related issue but with different stacktrace: #114455
Keeping this issue open for team's attention.

@darshankawar darshankawar added c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. platform-ios iOS applications specifically and removed in triage Presently being triaged by the triage team labels Nov 21, 2022
@jmagman
Copy link
Member

jmagman commented Nov 21, 2022

"Bad CPU type in executable Command" means you are trying to run an ARM executable on an Intel x64 machine, or you're trying to run an x64 executable on an ARM machine without Rosetta installed. In this case reporter is on an Intel x64 machine.

@christopherfujino wonder why the tool is using the openssl version on the PATH instead of directly calling bin/cache/artifacts/openssl?

const <String>['openssl', 'x509', '-subject']);

@llliang on my machine open ssl is at /usr/bin/ and contains x86_64 and arm64e, but yours is in /usr/local/bin/. How did you install openssl on your machine? brew? Did you compile it?
What's the output of file /usr/local/bin/openssl? You likely have a corrupted install.

@jmagman
Copy link
Member

jmagman commented Nov 21, 2022

wonder why the tool is using the openssl version on the PATH instead of directly calling bin/cache/artifacts/openssl?

Never mind, there is no openssl executable in that artifacts directory, only libcrypto and libssl.

@fanchou
Copy link

fanchou commented Nov 25, 2022

/Users/zhoufan/Documents/workshop/actions-runner/_work/_tool/flutter/3.3.9-stable/x64/bin/internal/shared.sh: line 225: /Users/zhoufan/Documents/workshop/actions-runner/_work/_tool/flutter/3.3.9-stable/x64/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable

@jmagman
Copy link
Member

jmagman commented Nov 28, 2022

@fanchou that looks like the wrong version of dart was installed on your machine, this is tracking the openssl executable, can you file a new issue and completely fill out the template?

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

jmagman commented Nov 28, 2022

Waiting for customer response re:

@llliang on my machine open ssl is at /usr/bin/ and contains x86_64 and arm64e, but yours is in /usr/local/bin/. How did you install openssl on your machine? brew? Did you compile it?
What's the output of file /usr/local/bin/openssl? You likely have a corrupted install.

@llliang
Copy link
Author

llliang commented Nov 29, 2022

Waiting for customer response re:

@llliang on my machine open ssl is at /usr/bin/ and contains x86_64 and arm64e, but yours is in /usr/local/bin/. How did you install openssl on your machine? brew? Did you compile it?
What's the output of file /usr/local/bin/openssl? You likely have a corrupted install.

My machine has multiple versions openssl,When I remove the version from /usr/local/bin/ , it does work correctly, thx

@llliang llliang closed this as completed Nov 29, 2022
@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 29, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 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 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants