Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter GitHub Actions Bad CPU type in executable

Hi I am currently using this GitHub Action for CI/CD for my flutter project

Which runs-on: macOS-latest which I assume will be apple silicon. When it runs the flutter pub get in build_ios: I get this error.

/Users/runner/hostedtoolcache/flutter/2.13.0-0.1.pre-dev/x64/bin/internal/shared.sh: line 225: 
/Users/runner/hostedtoolcache/flutter/2.13.0-0.1.pre-dev/x64/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable

Now I think the problem may be to do with not having rosseta stone installed on the GitHub action?

Any thoughts on how to install rosseta stone, or if this is a different error?

like image 511
GILO Avatar asked Jun 11 '26 21:06

GILO


2 Answers

Make sure you specify architecture: arm64

- uses: subosito/flutter-action@v1
  with:
    flutter-version: '2.10.4'
    architecture: arm64
like image 135
GILO Avatar answered Jun 14 '26 18:06

GILO


The accepted answer unfortunately did not work for me.

The fix for myself was the following:

- uses: subosito/flutter-action@v2
    with:
      channel: 'stable'
      architecture: x64

Note that I upgraded the version of subsito from v1 to v2 and specified an architecture of x64.

like image 22
James Mallon Avatar answered Jun 14 '26 20:06

James Mallon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!