fzyzcjy / flutter_convenient_test

Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more
pub.dev/packages/convenient_test
MIT License
477 stars 42 forks source link

macos ci build fails: cocoapods has problems #186

Closed fzyzcjy closed 2 years ago

fzyzcjy commented 2 years ago

[10:39:45]: â–¸ Changing current working directory to: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager
[10:39:45]: ▸ 💪 Building with sound null safety 💪
[10:39:46]: â–¸ Warning: CocoaPods is installed but broken. Skipping pod install.
[10:39:46]: â–¸ You appear to have CocoaPods installed but it is not working.
[10:39:46]: â–¸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[10:39:46]: â–¸ This can usually be fixed by re-installing CocoaPods.
[10:39:46]: â–¸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[10:39:46]: â–¸ CocoaPods not installed or not in valid state.
fzyzcjy commented 2 years ago

https://github.com/fzyzcjy/flutter_convenient_test/runs/6386311852?check_suite_focus=true

fzyzcjy commented 2 years ago

https://stackoverflow.com/questions/72010607/flutter-warning-cocoapods-is-installed-but-broken-skipping-pod-install-mac-b

fzyzcjy commented 2 years ago

do this: https://github.com/fzyzcjy/flutter_convenient_test/commit/56af0e00a2401b03a590e6a14077c4a4ae57999a

same error


[09:55:02]: $ flutter build macos
[09:55:03]: â–¸ Changing current working directory to: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager
[09:55:04]: ▸ 💪 Building with sound null safety 💪
[09:55:05]: â–¸ Warning: CocoaPods is installed but broken. Skipping pod install.
[09:55:05]: â–¸ You appear to have CocoaPods installed but it is not working.
[09:55:05]: â–¸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[09:55:05]: â–¸ This can usually be fixed by re-installing CocoaPods.
[09:55:05]: â–¸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[09:55:05]: â–¸ CocoaPods not installed or not in valid state.
fzyzcjy commented 2 years ago

Can reproduce this locally.


(base) ➜  macos git:(master) ✗ bundle exec fastlane build
[✔] 🚀 
[17:57:01]: ------------------------------
[17:57:01]: --- Step: default_platform ---
[17:57:01]: ------------------------------
[17:57:01]: Driving the lane 'mac build' 🚀
[17:57:01]: ---------------------------------
[17:57:01]: --- Step: flutter build macos ---
[17:57:01]: ---------------------------------
[17:57:01]: $ flutter build macos
[17:57:02]: â–¸ Changing current working directory to: /Users/tom/QAPMain/TomLib/flutter_convenient_test/packages/convenient_test_manager
[17:57:02]: ▸ 💪 Building with sound null safety 💪
[17:57:03]: â–¸ Warning: CocoaPods is installed but broken. Skipping pod install.
[17:57:03]: â–¸ You appear to have CocoaPods installed but it is not working.
[17:57:03]: â–¸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[17:57:03]: â–¸ This can usually be fixed by re-installing CocoaPods.
[17:57:03]: â–¸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[17:57:03]: â–¸ CocoaPods not installed or not in valid state.
+------------------+-----------+
|         Lane Context         |
+------------------+-----------+
| DEFAULT_PLATFORM | mac       |
| PLATFORM_NAME    | mac       |
| LANE_NAME        | mac build |
+------------------+-----------+
[17:57:03]: Exit status of command 'flutter build macos' was 1 instead of 0.
Changing current working directory to: /Users/tom/QAPMain/TomLib/flutter_convenient_test/packages/convenient_test_manager

💪 Building with sound null safety 💪

Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state.

+------+---------------------+-------------+
|             fastlane summary             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | default_platform    | 0           |
| 💥   | flutter build macos | 2           |
+------+---------------------+-------------+

[17:57:03]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

#######################################################################
# fastlane 2.206.1 is available. You are on 2.205.2.
# You should use the latest version.
# Please update using `bundle update fastlane`.
#######################################################################

2.206.1 Hot fix
* [regression][fastlane] fixed fastlane command issue when tool name not provided (#20295) via Manish Rathi (@crazymanish)
* [aciton][import_from_git] fix/import from git spec fail with non master default branch (#20297) via Jerome Lacoste (@lacostej)

2.206.0 Improvements
* [match] add support for Developer ID certificates from G2 Sub-CA (#20145) via Frederik Seiffert (@triplef)
* [spaceship] add ability to invite a single TestFlight user (#20112) via Lucas (@LcTwisk)
* [deliver] add `verify_only` option to deliver (#20247) via Pol Piella (@pol-piella)
* [scan] fix scan failing to return results when there are test failures (#20237) via Mahmood Tahir (@tahirmt)
* [docs] remove named parameter from `create_capability` example. (#20197) via Trent Kocurek (@t2)
* [spaceship] fix creation App Store Connect API authorization token (#20206) via Yuya Oka (@nnsnodnb)
* [match] add option to skip google account confirmation (#20223) via Tim Sneed (@trsneed)
* [aciton][setup_ci] added timeout param into setup_ci (#20211) via javigines (@javigines)
* [action][danger] add GitHub Enterprise flags (#20216) via Alexander Weiß (@alexanderwe)
* [fastlane] allows aliased tool names (build_app, sync_code_signing, etc) to run from CLI (#20287) via Josh Holtz (@joshdholtz)
* [spaceship] update buildDeliveries request to use app id in path (#20268) via Lukasz Grabowski (@lucgrabowski)
* [spaceship] update `Spaceship::ConnectAPI::User model` to include `delete!` method (#20251) via Liam Nichols (@liamnichols)
* [infra] changelog will now show github usernames which makes contributors stand out more in releases (#20214) via Josh Holtz (@joshdholtz)

Please update using `bundle update fastlane`
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
FastlaneCore::Interface::FastlaneShellError: [!] Exit status of command 'flutter build macos' was 1 instead of 0.
Changing current working directory to: /Users/tom/QAPMain/TomLib/flutter_convenient_test/packages/convenient_test_manager

💪 Building with sound null safety 💪

Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state.

  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/helper/sh_helper.rb:16:in `sh_no_action'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/fast_file.rb:223:in `block in sh'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/fast_file.rb:222:in `sh'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/fast_file.rb:216:in `sh'
  Fastfile:21:in `block (2 levels) in parsing_binding'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
  /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
  /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
  /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
  /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
  /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.2/bin/fastlane:23:in `<top (required)>'
  /usr/local/bin/fastlane:23:in `load'
  /usr/local/bin/fastlane:23:in `<top (required)>'
fzyzcjy commented 2 years ago

https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md

already have ruby and cocoapods

macos12 is ruby 3.0, macos 11 is ruby 2.x

fzyzcjy commented 2 years ago

https://stackoverflow.com/questions/66017436/flutter-debug-warning-cocoapods-not-installed-skipping-pod-install

fzyzcjy commented 2 years ago

btw macos-latest means 11 not 12

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners

fzyzcjy commented 2 years ago

can we get rid of fastlane?

fzyzcjy commented 2 years ago

Run flutter build macos
Changing current working directory to: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager

💪 Building with sound null safety 💪

Running pod install...                                             39.[8](https://github.com/fzyzcjy/flutter_convenient_test/runs/6543552468?check_suite_focus=true#step:8:9)s
Building macOS application...                                   
[ 66%] Building CXX object CMakeFiles/dart_vlc_core.dir/api/api.cc.o
/Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Flutter/ephemeral/.symlinks/plugins/dart_vlc/dartvlc/api/api.cc:41:48: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
static void DestroyObject(void*, void* peer) { delete peer; }
                                               ^      ~~~~
1 warning generated.
[100%] Linking CXX static library libdart_vlc_core.a
[100%] Built target dart_vlc_core
Install the project...
-- Install configuration: ""
-- Installing: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/../Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos/deps/lib/libdart_vlc_core.a
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (for architecture x86_64)
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (for architecture arm64)
ld: warning: ignoring file /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/../Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos/deps/lib/libdart_vlc_core.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/runner/hostedtoolcache/flutter/3.0.1-stable/x64/.pub-cache/hosted/pub.dartlang.org/dart_vlc-0.1.[9](https://github.com/fzyzcjy/flutter_convenient_test/runs/6543552468?check_suite_focus=true#step:8:10)/macos/deps/lib/libdart_vlc_core.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_g_players", referenced from:
      +[VideoOutlet outletForPlayer:withTextureRegistry:] in VideoOutlet.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
fzyzcjy commented 2 years ago
fzyzcjy commented 2 years ago
fzyzcjy commented 2 years ago
fzyzcjy commented 2 years ago

why still error for CI?

fzyzcjy commented 2 years ago

Run flutter build macos
Changing current working directory to: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager

💪 Building with sound null safety 💪

Running pod install...                                             25.3s
Building macOS application...                                   
../../../../../hostedtoolcache/flutter/3.0.1-stable/x64/.pub-cache/hosted/pub.dartlang.org/dart_vlc-0.1.9/lib/src/widgets/controls.dart:1[8](https://github.com/fzyzcjy/flutter_convenient_test/runs/6543875530?check_suite_focus=true#step:8:9)5:55: Error: The method 'back' isn't defined for the class 'Player'.
 - 'Player' is from 'package:dart_vlc_ffi/src/player.dart' ('../../../../../hostedtoolcache/flutter/3.0.1-stable/x64/.pub-cache/hosted/pub.dartlang.org/dart_vlc_ffi-0.1.7/lib/src/player.dart').
Try correcting the name to the name of an existing method, or defining a method named 'back'.
                              onPressed: () => player.back(),
                                                      ^^^^

Command PhaseScriptExecution failed with a nonzero exit code
-- The C compiler identification is AppleClang 13.0.0.1300002[9](https://github.com/fzyzcjy/flutter_convenient_test/runs/6543875530?check_suite_focus=true#step:8:10)
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/dartvlc_core
/Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods
[  0%] Built target LIBVLC_EXTRACT
[ 33%] Building CXX object CMakeFiles/dart_vlc_core.dir/main.cc.o
[ 66%] Building CXX object CMakeFiles/dart_vlc_core.dir/api/api.cc.o
/Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Flutter/ephemeral/.symlinks/plugins/dart_vlc/dartvlc/api/api.cc:41:48: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
static void DestroyObject(void*, void* peer) { delete peer; }
                                               ^      ~~~~
1 warning generated.
[[10](https://github.com/fzyzcjy/flutter_convenient_test/runs/6543875530?check_suite_focus=true#step:8:11)0%] Linking CXX static library libdart_vlc_core.a
[100%] Built target dart_vlc_core
Install the project...
-- Install configuration: ""
-- Installing: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/../Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos/deps/lib/libdart_vlc_core.a
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (for architecture x86_64)
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/runner/work/flutter_convenient_test/flutter_convenient_test/packages/convenient_test_manager/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (for architecture arm64)
** BUILD FAILED **

Build process failed
Error: Process completed with exit code 1.
fzyzcjy commented 2 years ago

Run bundle exec fastlane run build_mac_app export_method:mac-application scheme:Runner output_directory:./build
bundler: command not found: fastlane
Install missing gem executables with `bundle install`
Error: Process completed with exit code 127.
fzyzcjy commented 2 years ago

green!

image

fzyzcjy commented 2 years ago

let's try this artifact

https://github.com/fzyzcjy/flutter_convenient_test/actions/runs/2366685100

image

fzyzcjy commented 2 years ago

looks great, and we can use it!

github-actions[bot] commented 2 years ago

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 issue.