Coder Social home page Coder Social logo

bitrise-step-flutter-build's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitrise-step-flutter-build's Issues

Error in build process (ios)

Hi, I'm having an issue while building my app. I think that the problem is related only to ios (not android).

I run the workflow and it fails.

In the log message I see the the message:

Error (Xcode): Multiple commands produce '/Users/vagrant/git/build/ios/Release-iphoneos/Runner.app/Frameworks/Sentry.framework'

Building br.com.parcelex.app for device (ios-release)...
Running pod install... 45.5s
Running Xcode build...
Xcode build done. 5.7s
Failed to build iOS app
Error (Xcode): Multiple commands produce '/Users/vagrant/git/build/ios/Release-iphoneos/Runner.app/Frameworks/Sentry.framework'

Encountered error while building for device.
�[31;1mRun: failed to build iOS app: exit status 1
�[0m�[31;1mRun: failed to build iOS app: exit status 1�[0m

I've tried many solutions, but not success.

Any suggestions of what can be?

Add support for newer Java version

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? - Version 0.17.0
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES / NO / NOT APPLICABLE

Useful information

Issue description

It is impossible to build Flutter project with some version of packages, (issue related not only to Flutter). Some project requires Newer Java version
Execution failed for task ':stripe_android:compileReleaseJavaWithJavac'.
error: invalid source release: 17

Bitrise info

* What went wrong:
Execution failed for task ':stripe_android:compileReleaseJavaWithJavac'.
> error: invalid source release: 17
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org/
BUILD FAILED in 8m 18s
Running Gradle task 'assembleStagingRelease'...                   500.9s
Gradle task assembleStagingRelease failed with exit code 1
Run: failed to build Android app: exit status 1
Run: failed to build Android app: exit status 1
  

Steps to reproduce

  1. Try latest version of Stripe package for Flutter

Flutter Build step does not work on Xcode 15

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 0.17.0
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Useful information

This has been issue has been identified to be related to CocoaPods and is fixed in a more recent version of CocoaPods. It's likely all that is needed to fix this is to update the version of CocoaPods this step uses.
CocoaPods/CocoaPods#12012

Issue description

When building Flutter projects on the Xcode 15 stack, the Flutter Build step fails with error:
Failed to build iOS app Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

Bitrise info

 Failed to build iOS app
Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead
  

Steps to reproduce

  1. Set the workflow build stack to use M1 Silicon and Xcode 15
  2. Build a Flutter project workflow that uses the flutter-build Bitrise step

`Flutter SDK installation bundle URL` fails on catalina

I updated my workflows to the new XCode 11.4 Catalina stack, and my Flutter builds started failing.

It seems specifying a Flutter SDK installation bundle URL no longer works.

You can see in this log that the Flutter step downloads and installs the specified version of Flutter, but after setting the path Flutter is still reporting the master version:

Config:
- Version: beta
- IsUpdate: true
- BundleURL: https://storage.googleapis.com/flutter_infra/releases/dev/macos/flutter_macos_v1.15.1-dev.zip
- IsDebug: false
Input: 'Flutter SDK git repository version' (version) is ignored, using 'Flutter SDK installation bundle URL' (installation_bundle_url).
$ flutter "--version"
╔════════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                     ║
  ║                                                                            ║
  ║ To update to the latest version, run "flutter upgrade".                    ║
  ╚════════════════════════════════════════════════════════════════════════════╝
Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (9 weeks ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0
Preinstalled Flutter version: 1.12.13+hotfix.5
Downloading Flutter SDK
Cleaning SDK target path: /Users/vagrant/flutter-sdk
Downloading and unarchiving Flutter from installation bundle: https://storage.googleapis.com/flutter_infra/releases/dev/macos/flutter_macos_v1.15.1-dev.zip
Adding flutter bin directory to $PATH
Added to $PATH
Flutter version
$ flutter "--version"
Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (9 weeks ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0

Support for Android App Bundles

Hello,

Since the 1.2.1 stable release, Flutter is now able to produce Android App Bundles (*.aab files), instead of just apks. It would be great if we could choose between an apk and an aab during the build phrase.

flutter build appbundle

Thanks again for your amazing work!

Add support for macOS, Linux and web builds

Now, as Flutter officially supports macOS, the web and Linux, it would be great to have them available for build too. Maybe Linux will be a bit difficult to implement (as builds run on macOS) but web and macOS should be quite easy to support.

Failed to install the following Android SDK packages as some licences have not been accepted

Hello,

I am currently using Flutter beta and the step fails with this error:

Could not determine the dependencies of task ':app:compileInternalReleaseJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;28.0.3 Android SDK Build-Tools 28.0.3
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

How can I fix this?

[Android] Unable to initialize metrics, ensure /Users/vagrant/.android is writable

Hello, I am trying to build a flutter app using this step, and get the following stack trace when building the android app. ios app builds without errors.

What am I doing wrong here?

[   +2 ms] MSG : Got dependencies!
[  +30 ms] IO  : Writing 6204 characters to text file ./.packages.
[        ] FINE: Contents:
[        ]     | # Generated by pub on 2019-11-14 15:55:43.855588.
[        ]     | _fe_analyzer_shared:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-1.0.0/lib/
[        ]     | analyzer:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/analyzer-0.39.1/lib/
[        ]     | archive:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/archive-2.0.11/lib/
[        ]     | args:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/args-1.5.2/lib/
[        ]     | async:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/async-2.3.0/lib/
[        ]     | boolean_selector:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/
[        ]     | cached_network_image:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/
[        ]     | charcode:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
[        ]     | cloud_firestore:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/lib/
[        ]     | collection:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
[        ]     | convert:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1/lib/
[        ]     | crypto:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.3/lib/
[        ]     | csslib:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/csslib-0.16.1/lib/
[        ]     | dakia:file:///Users/vagrant/.pub-cache/git/dakia-8104c12c37665268efea0d546a68d7f8a2208bd6/client/lib/
[        ]     | dart_style:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/dart_style-1.3.3/lib/
[        ]     | file_picker:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/lib/
[        ]     | firebase_auth:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/lib/
[        ]     | firebase_core:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/lib/
[        ]     | firebase_storage:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/lib/
[        ]     | fixnum:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/fixnum-0.10.11/lib/
[        ]     | flutter:file:///Users/vagrant/flutter-sdk/flutter/packages/flutter/lib/
[        ]     | flutter_cache_manager:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_cache_manager-1.1.3/lib/
[        ]     | flutter_launcher_icons:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.4/lib/
[        ]     | flutter_markdown:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.3.0/lib/
[        ]     | flutter_test:file:///Users/vagrant/flutter-sdk/flutter/packages/flutter_test/lib/
[        ]     | front_end:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.29/lib/
[        ]     | glob:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/glob-1.2.0/lib/
[        ]     | google_sign_in:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/lib/
[        ]     | html:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/html-0.14.0+3/lib/
[        ]     | http:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/
[        ]     | http_parser:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/
[        ]     | image:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image-2.1.8/lib/
[        ]     | image_picker:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/lib/
[        ]     | js:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/
[        ]     | kernel:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.29/lib/
[        ]     | markdown:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/markdown-2.1.1/lib/
[        ]     | matcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.5/lib/
[        ]     | meta:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/meta-1.1.7/lib/
[        ]     | node_interop:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/node_interop-1.0.3/lib/
[        ]     | node_io:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/node_io-1.0.1+2/lib/
[        ]     | package_config:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/package_config-1.1.0/lib/
[        ]     | path:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
[        ]     | path_provider:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/lib/
[        ]     | pedantic:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/
[        ]     | petitparser:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0/lib/
[        ]     | photo_view:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/photo_view-0.8.0/lib/
[        ]     | platform:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/
[        ]     | protobuf:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/protobuf-1.0.1/lib/
[        ]     | protoc_plugin:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/protoc_plugin-19.0.1/lib/
[        ]     | pub_semver:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib/
[        ]     | quiver:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/
[        ]     | sky_engine:file:///Users/vagrant/flutter-sdk/flutter/bin/cache/pkg/sky_engine/lib/
[        ]     | source_span:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/
[        ]     | sqflite:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/lib/
[        ]     | stack_trace:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
[        ]     | stream_channel:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
[        ]     | string_scanner:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
[        ]     | synchronized:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/synchronized-2.1.0+1/lib/
[        ]     | term_glyph:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
[        ]     | test_api:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.5/lib/
[        ]     | typed_data:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
[        ]     | url_launcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/lib/
[        ]     | url_launcher_platform_interface:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-1.0.1/lib/
[        ]     | uuid:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/uuid-2.0.4/lib/
[        ]     | vector_math:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
[        ]     | watcher:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+12/lib/
[        ]     | xml:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/xml-3.5.0/lib/
[        ]     | yaml:file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/yaml-2.2.0/lib/
[        ]     | dara:lib/
[  +40 ms] Running "flutter pub get" in client... (completed in 12.3s)
[ +126 ms] Found plugin cloud_firestore at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/
[  +20 ms] Found plugin file_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/
[   +3 ms] Found plugin firebase_auth at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/
[   +2 ms] Found plugin firebase_core at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/
[   +2 ms] Found plugin firebase_storage at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/
[  +25 ms] Found plugin google_sign_in at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/
[  +12 ms] Found plugin image_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/
[  +19 ms] Found plugin path_provider at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/
[  +14 ms] Found plugin sqflite at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/
[  +10 ms] Found plugin url_launcher at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/
[ +139 ms] Found plugin cloud_firestore at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.10/
[   +7 ms] Found plugin file_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/file_picker-1.4.2/
[   +4 ms] Found plugin firebase_auth at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/
[   +2 ms] Found plugin firebase_core at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.1+5/
[   +1 ms] Found plugin firebase_storage at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.8/
[  +18 ms] Found plugin google_sign_in at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.13/
[   +8 ms] Found plugin image_picker at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+11/
[  +10 ms] Found plugin path_provider at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/path_provider-1.4.2/
[  +13 ms] Found plugin sqflite at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.7+2/
[   +7 ms] Found plugin url_launcher at /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.2.5/
[ +226 ms] You are building a fat APK that includes binaries for android-arm, android-arm64.
[        ] If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
[        ]     To generate an app bundle, run:
[        ]         flutter build appbundle --target-platform android-arm,android-arm64
[        ]         Learn more on: https://developer.android.com/guide/app-bundle
[        ]     To split the APKs per ABI, run:
[        ]         flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
[        ]         Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
[  +10 ms] Initializing gradle...
[  +25 ms] Using gradle from /Users/vagrant/git/client/android/gradlew.
[  +15 ms] executing: /Users/vagrant/git/client/android/gradlew -v
[+14724 ms] Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
            .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
            Unzipping /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2-all.zip to /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb
            Set executable permissions for: /Users/vagrant/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2/bin/gradle
            Welcome to Gradle 5.6.2!
            Here are the highlights of this release:
             - Incremental Groovy compilation
             - Groovy compile avoidance
             - Test fixtures for Java projects
             - Manage plugin versions via settings script
            For more details see https://docs.gradle.org/5.6.2/release-notes.html
            ------------------------------------------------------------
            Gradle 5.6.2
            ------------------------------------------------------------
            Build time:   2019-09-05 16:13:54 UTC
            Revision:     55a5e53d855db8fc7b0e494412fc624051a8e781
            Kotlin:       1.3.41
            Groovy:       2.5.4
            Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
            JVM:          1.8.0_222 (AdoptOpenJDK 25.222-b10)
            OS:           Mac OS X 10.14.6 x86_64
[        ] Initializing gradle... (completed in 14.8s)
[  +15 ms] Resolving dependencies...
[        ] executing: [/Users/vagrant/git/client/android/] /Users/vagrant/git/client/android/gradlew app:properties
[+68951 ms] Starting a Gradle Daemon (subsequent builds will be faster)
            > Configure project :app
            Unable to initialize metrics, ensure /Users/vagrant/.android is writable, details: Unable to lock settings file /Users/vagrant/.android/analytics.settings
[   +6 ms] Resolving dependencies... (completed in 69.0s)
[   +3 ms] * Error running Gradle:
           ProcessException: Process "/Users/vagrant/git/client/android/gradlew" exited abnormally:
           Starting a Gradle Daemon (subsequent builds will be faster)
           > Configure project :app
           Unable to initialize metrics, ensure /Users/vagrant/.android is writable, details: Unable to lock settings file /Users/vagrant/.android/analytics.settings
             Command: /Users/vagrant/git/client/android/gradlew app:properties
[   +3 ms] "flutter apk" took 96,828ms.
Please review your Gradle project setup in the android/ folder.
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      _readGradleProject (package:flutter_tools/src/android/gradle.dart:233:7)
<asynchronous suspension>
#2      _gradleAppProject (package:flutter_tools/src/android/gradle.dart:112:37)
<asynchronous suspension>
#3      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:652:39)
<asynchronous suspension>
#4      buildGradleProject (package:flutter_tools/src/android/gradle.dart:494:14)
<asynchronous suspension>
#5      buildApk (package:flutter_tools/src/android/apk.dart:34:9)
<asynchronous suspension>
#6      BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:79:11)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:407:33)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#10     _rootRun (dart:async/zone.dart:1124:13)
#11     _CustomZone.run (dart:async/zone.dart:1021:19)
#12     _runZoned (dart:async/zone.dart:1516:10)
#13     runZoned (dart:async/zone.dart:1463:12)
#14     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#15     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:397:20)
#16     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:402:21)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _runZoned (dart:async/zone.dart:1516:10)
#22     runZoned (dart:async/zone.dart:1463:12)
#23     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#24     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#25     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#26     new Future.sync (dart:async/future.dart:224:31)
#27     CommandRunner.run (package:args/command_runner.dart:112:14)
#28     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#29     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#30     _rootRun (dart:async/zone.dart:1124:13)
#31     _CustomZone.run (dart:async/zone.dart:1021:19)
#32     _runZoned (dart:async/zone.dart:1516:10)
#33     runZoned (dart:async/zone.dart:1500:12)
#34     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#35     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#36     _rootRun (dart:async/zone.dart:1124:13)
#37     _CustomZone.run (dart:async/zone.dart:1021:19)
#38     _runZoned (dart:async/zone.dart:1516:10)
#39     runZoned (dart:async/zone.dart:1463:12)
#40     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#41     runInContext (package:flutter_tools/src/context_runner.dart:59:24)
<asynchronous suspension>
#42     run (package:flutter_tools/runner.dart:50:10)
#43     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#44     main (file:///Users/vagrant/flutter-sdk/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#45     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#46     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Xcode Build Fail but no error output log

Issue description

I faced with issue build fail in IOS. With same version, branch, commit, workflow that I built success in last week, but now it was fail.
I tried build in local and it succeed. Please support?

Xcode version 14.2.x

Bitrise info

 Config:
- project_location: .
- platform: both
- additional_build_params: --build-number=94
- is_debug_mode: false
- cache_level: all
- ios_output_type: app
- ios_additional_params: --release --flavor staging -t lib/main.dart 
- ios_output_pattern: [*build/ios/iphoneos/*.app *build/ios/archive/*.xcarchive]
- ios_codesign_identity: 
- android_output_type: apk
- android_additional_params: --release --flavor staging -t lib/main.dart 
- android_output_pattern: [*build/app/outputs/apk/*/*.apk *build/app/outputs/bundle/*/*.aab]
- android_bundle_output_pattern: [*build/app/outputs/bundle/*/*.aab]
iOS Codesign settings
 - Skipping codesign preparation because output type is iOS app, not xcarchive
Build iOS app
$ flutter "build" "ios" "--build-number=94" "--release" "--flavor" "staging" "-t" "lib/main.dart" "--no-codesign"
Downloading ios tools...                                        
 2,298ms
Downloading ios-profile tools...                                
 1,193ms
Downloading ios-release tools...                                
 1,639ms
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building sg.vinova.resource.staging for device (ios-release)...
Running pod install...                                          
   33.0s
Running Xcode build...                                          
Xcode build done.                                            7.8s
Failed to build iOS app
Uncategorized (Xcode): Exited with status code 1
Encountered error while building for device.
Run: failed to build iOS app: exit status 1
  

Steps to reproduce

  1. Run build
  2. Fail but no log error out put about Xcode
Screenshot 2023-07-06 at 09 57 31

Failed to collect flutter cache

Issue description

Recently i started to notice warning in my workflow when using Flutter Build step

+------------------------------------------------------------------------------+

| (9) Flutter Build                                                            |
+------------------------------------------------------------------------------+
| id: flutter-build                                                            |
| version: 0.15.1                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2023-02-27T12:47:05Z                                                   |
+------------------------------------------------------------------------------+

Error (non fatal) says

Collecting cache
Failed to collect flutter cache, error: package resolution file (/Users/vagrant/git/.packages) not found, error: stat /Users/vagrant/git/.packages: no such file or directory

From what i was able to understand how this step works [ i'm very bad with go, sorry :( ] its failes at this line https://github.com/bitrise-steplib/bitrise-step-flutter-build/blob/master/cache.go#L215.

It's trying to find .packages directory but it does not exists (not even on my local machine.

https://dart.dev/tools/pub/cmd/pub-get#package-resolution says that .dart_tool/ is the place to look for package_config.json

and
https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache that .pub-cache is at root dir unless env var(PUB_CACHE) is set (https://dart.dev/tools/pub/environment-variables).

.dart_tools/

damianmolinski@Damians-MBP ~ % ls -l Work/[project_name]/.dart_tool 
total 144
drwxr-xr-x   5 damianmolinski  staff    160 Feb 27 07:54 build
drwxr-xr-x   4 damianmolinski  staff    128 Feb 14 08:25 build_resolvers
drwxr-xr-x  15 damianmolinski  staff    480 Feb 27 12:02 flutter_build
drwxr-xr-x   5 damianmolinski  staff    160 Feb 15 13:26 flutter_gen
-rw-r--r--   1 damianmolinski  staff  31762 Feb 27 13:21 package_config.json
-rw-r--r--   1 damianmolinski  staff  35572 Feb 27 13:21 package_config_subset
drwxr-xr-x   5 damianmolinski  staff    160 Feb 27 13:21 pub
-rw-r--r--   1 damianmolinski  staff      5 Feb 27 13:21 version

.pub-cache/

damianmolinski@Damians-MBP ~ % ls -l .pub-cache                     
total 8
-rw-r--r--  1 damianmolinski  staff  370 Feb 23 13:16 README.md
drwxr-xr-x  2 damianmolinski  staff   64 Feb 23 13:16 _temp
drwxr-xr-x  5 damianmolinski  staff  160 Mar 17  2022 bin
drwxr-xr-x  5 damianmolinski  staff  160 Feb 15 08:24 git
drwxr-xr-x  5 damianmolinski  staff  160 Feb 24  2022 global_packages
drwxr-xr-x  4 damianmolinski  staff  128 Jan 18 07:54 hosted
drwxr-xr-x  3 damianmolinski  staff   96 Jan 18 07:57 hosted-hashes
drwxr-xr-x  3 damianmolinski  staff   96 Dec 29 10:54 log

Again step does not fail but it would be nice to speed up build time a bit with cache. If this is just warning sorry for bothering.

.flutter_settings : support non-string json values

hi, the .flutter_settings file can contain values different than strings, like booleans,

  "ios-signing-cert": "iPhone Developer: benoit@***.com (92RAR46KUA)",
  "enable-web": true
}

but the parsing does not take that into account atm, so I get a Failed to unmarshal .flutter_settings file, error: json: cannot unmarshal bool into Go value of type string

var flutterSettings map[string]string

sry I don't know Go enough to fix it myself

Step fails on Export artifacts (zip)

Step fails on Export artifacts (zip) with any output pattern set
Can I skip export?

With absolute path:
/Users/vagrant/git/build/ios/iphoneos/Runner.app

[ +714 ms] Built /Users/vagrant/git/build/ios/iphoneos/Runner.app.
[   +1 ms] "flutter ios" took 1,228,139ms.
Export iOS artifact
Failed to export iOS artifacts, error: command: (/usr/bin/zip "-rTy" "ios_build/Runner.app.zip" "Runner.app") failed, output: zip I/O error: No such file or directory

With default specifier
*build/ios/iphoneos/*.app

[ +623 ms] Built /Users/vagrant/git/build/ios/iphoneos/Runner.app.
[   +1 ms] "flutter ios" took 1,169,620ms.
Export iOS artifact
Failed to export iOS artifacts, error: command: (/usr/bin/zip "-rTy" "ios_build/Runner.app.zip" "Runner.app") failed, output: zip I/O error: No such file or directory
zip error: Could not create output file (ios_build/Runner.app.zip), error: exit status 15

With more specific path
build/ios/iphoneos/*.app.

Built /Users/vagrant/git/build/ios/iphoneos/Runner.app.
Export iOS artifact
panic: runtime error: index out of range
goroutine 1 [running]:
main.buildSpecification.exportIOSApp(0x131ffe2, 0x3, 0x131ffeb, 0x3, 0xc0000880a0, 0x2, 0x2, 0xc00007e2b0, 0x1, 0x1, ...)
	/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit994526613/src/github.com/bitrise-steplib/bitrise-step-flutter-build/buildspec.go:58 +0x407
main.buildSpecification.exportArtifacts(0x131ffe2, 0x3, 0x131ffeb, 0x3, 0xc0000880a0, 0x2, 0x2, 0xc00007e2b0, 0x1, 0x1, ...)
	/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit994526613/src/github.com/bitrise-steplib/bitrise-step-flutter-build/buildspec.go:39 +0x2ac
main.main()
	/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit994526613/src/github.com/bitrise-steplib/bitrise-step-flutter-build/main.go:213 +0x104e

IOS Export Failed with message "ERROR: Flutter archive builds must be run in Release mode."

Dear all,

I'm getting this error when running xcode-archive:

========================================================================
ERROR: Flutter archive builds must be run in Release mode.

To correct, ensure FLUTTER_BUILD_MODE is set to release or run:
flutter build ios --release

then re-run Archive from Xcode.
========================================================================
Command PhaseScriptExecution failed with a nonzero exit code

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.0.99. (in target 'Flutter' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.0.99. (in target 'GoogleSignIn' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.0.99. (in target 'google_sign_in' from project 'Pods')warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.0.99. (in target 'gRPC-Core' from project 'Pods')
** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Run\ Script /Users/vagrant/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Debug-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh

But the logs tell me the flutter build was made with the release flag

iOS Codesign settings
 Installed codesign identities:
 - iPhone Developer: XXXXXXXx
 - iPhone Developer: Bitrise Bot XXXXXX
 - iPhone Distribution: XXXXXXXXXXX
 Stored Flutter codesign settings:
 - No codesign identity set
Build iOS
$ flutter "build" "ios" "--release"
Building XXXXXXXXXXXXX for device (ios-release)...
Automatically signing iOS for device deployment using specified [REDACTED] team in Xcode project: XXXXXXXXXXXX
Running pod install...                                            180.7s (!)
Running Xcode build...                                          
Xcode build done.                                           757.7s
Built /Users/vagrant/git/build/ios/iphoneos/Runner.app.
Export iOS artifact
- $BITRISE_DEPLOY_DIR/Runner.app.zip
- $BITRISE_APP_DIR_PATH: /Users/vagrant/git/build/ios/iphoneos/Runner.app

I spent the day on this... Any idea?

Thanks,

Alex.

Incompatibility with Fastlane?

Hello,

Previously, I was using the unofficial Flutter plugin, and all my workflow was working fine.
Basically, I was generating the iOS app with the --no-codesign parameter, then just let Fastlane do its stuff.

However, with the new plugin, the Fastlane step is now failing with this error:
(I have tested with exactly the same code in the git)

[05:32:45]: $ set -o pipefail && xcodebuild -workspace Runner.xcworkspace -scheme Runner -destination 'generic/platform=iOS' -archivePath /Users/vagrant/Library/Developer/Xcode/Archives/2019-01-25/Runner\ 2019-01-25\ 05.32.45.xcarchive archive | tee /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/fastlane_logs435671613/gym/Runner-Runner.log | xcpretty
[05:32:47]: ▸ Building Runner/Runner [Release]
[05:32:47]: ▸ Check Dependencies
[05:32:47]: ▸ Running script '[CP] Check Pods Manifest.lock'
[05:32:47]: ▸ ❌  error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
[05:32:47]: ▸ ** ARCHIVE FAILED **
[05:32:47]: ▸ The following build commands failed:
[05:32:47]: ▸ PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/vagrant/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-1C1F831B5CFE4F55E1F5DDE0.sh
[05:32:47]: ▸ (1 failure)
▸ Building Runner/Runner [Release]
▸ Check Dependencies
▸ Running script '[CP] Check Pods Manifest.lock'
❌  error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/vagrant/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-1C1F831B5CFE4F55E1F5DDE0.sh
(1 failure)
[05:32:47]: Exit status: 65

Is-there something to do to fix this Fastlane error?

Specify a platform target

I have a dependency that need a plateform version of IOS greater than 8.0.
By default, cocoapods uses version 8.0 if nothing is specified.
And I don't find a way to specify this target plateform.

Can't build ios without code signin

Where I work we have a complex code sign pipeline (corporation rule) which manual sign my application using fastlane after building with flutter, with this step even if a specify the --no-codesign option it still fail.

- IOSAdditionalParams: --release --no-codesign

iOS Codesign settings
 Installed codesign identities:
 - No codesign identities installed

Build starts immediately even when "Enable manual build approval option" is set

Hi,

We would like to approve builds on PR changes provided by forks. Therefore we enabled the option: "Enable manual build approval option". Like so:

image

But once a fork submits changes the build is started directly instead of the need of approval. See: https://app.bitrise.io/build/24506030a2a538d8#?tab=log

For now I made the trigger only to response to a specific source branch so forks can't start any builds at the moment.

Any idea?

Mark

Invalid argument(s) #0 _StringBase._interpolate (dart:core-patch/string_patch.dart:854:9)

Hi,
The flutter build fails with the following error:

Invalid argument(s)
#0      _StringBase._interpolate (dart:core-patch/string_patch.dart:854:9)
#1      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:92:70)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:860:18)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:741:33)
<asynchronous suspension>
#4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#6      _rootRun (dart:async/zone.dart:1190:13)
#7      _CustomZone.run (dart:async/zone.dart:1093:19)
#8      _runZoned (dart:async/zone.dart:1630:10)
#9      runZoned (dart:async/zone.dart:1550:10)
#10     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#11     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:730:20)
#12     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#13     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:332:21)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart)
#15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#16     _rootRun (dart:async/zone.dart:1190:13)
#17     _CustomZone.run (dart:async/zone.dart:1093:19)
#18     _runZoned (dart:async/zone.dart:1630:10)
#19     runZoned (dart:async/zone.dart:1550:10)
#20     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#21     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:282:19)
<asynchronous suspension>
#22     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#23     new Future.sync (dart:async/future.dart:223:31)
#24     CommandRunner.run (package:args/command_runner.dart:112:14)
#25     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:231:18)
#26     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:69:22)
#27     _rootRun (dart:async/zone.dart:1190:13)
#28     _CustomZone.run (dart:async/zone.dart:1093:19)
#29     _runZoned (dart:async/zone.dart:1630:10)
#30     runZonedGuarded (dart:async/zone.dart:1618:12)
#31     runZoned (dart:async/zone.dart:1547:12)
#32     run.<anonymous closure> (package:flutter_tools/runner.dart:67:18)
<asynchronous suspension>
#33     run.<anonymous closure> (package:flutter_tools/runner.dart)
#34     runInContext.runnerWrapper (package:flutter_tools/src/context_runner.dart:62:18)
<asynchronous suspension>
#35     runInContext.runnerWrapper (package:flutter_tools/src/context_runner.dart)
#36     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#37     _rootRun (dart:async/zone.dart:1190:13)
#38     _CustomZone.run (dart:async/zone.dart:1093:19)
#39     _runZoned (dart:async/zone.dart:1630:10)
#40     runZoned (dart:async/zone.dart:1550:10)
#41     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#42     runInContext (package:flutter_tools/src/context_runner.dart:65:24)
#43     run (package:flutter_tools/runner.dart:52:10)
#44     main (package:flutter_tools/executable.dart:73:9)
#45     main (file:///Users/vagrant/flutter-sdk/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#46     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#47     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
Failed to build iOS platform, error: exit status 1

The failure started lately and I assume it's because of the new Flutter version 1.20, but I can't tell exactly why.

After a quick search seems that it has something with the flavours naming as mentioned in the flutter [git issues]:
(flutter/flutter#59029)

Any way to overcome the issue without changing the flavours names, as it affects other app settings?

Code-Signing is disabled for `.app` iOS builds

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 0.17.0
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Issue description

When using the flutter build step for building an iOS .app, a --no-codesign parameter is added automatically by the step which disables code-signing. There is no way to disable it at the moment.

See:

paramSlice = append(paramSlice, "--no-codesign")

Bitrise info

Steps to reproduce

  1. Add code sign step manage-ios-code-signing
  2. Add flutter build step after code sign
inputs:
        - is_debug_mode: 'true'
        - platform: ios
        - ios_additional_params: "--simulator --debug $BUILD_ATTRIBUTES $BUILD_FLAVOR"
        - project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
        - ios_output_pattern: "*build/ios/iphonesimulator/*.app"

flutter "build" "ios" "--release" "--no-codesign" Failure

I am unable to build the ios component of my Flutter project in release mode, as part of the "deploy" workflow on Bitrise. The "primary" workflow works just fine.

I am able to build and deploy my Flutter project to an iOS emulator locally.

The build log for the deploy workflow failure is below:

+------------------------------------------------------------------------------+
| (7) flutter-build@0                                                          |
+------------------------------------------------------------------------------+
| id: flutter-build                                                            |
| version: 0.13.2                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2020-08-26T19:18:25Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- IOSAdditionalParams: --release --no-codesign
- AndroidAdditionalParams: --release
- Platform: both
- IOSExportPattern: *build/ios/iphoneos/*.app
- AndroidOutputType: apk
- AndroidExportPattern: *build/app/outputs/apk/*/*.apk
*build/app/outputs/bundle/*/*.aab
- IOSCodesignIdentity: 
- ProjectLocation: hometastic
- DebugMode: false
- CacheLevel: all
- AndroidBundleExportPattern: *build/app/outputs/bundle/*/*.aab
iOS Codesign settings
 - Skipping codesign preparation, --no-codesign parameter set
Build iOS
$ flutter "build" "ios" "--release" "--no-codesign"
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building asterixorobelix.hometastic for device (ios-release)...
Running pod install...                                              1.0s
CocoaPods' output:
↳
    [!] Invalid `Podfile` file: cannot load such file -- /usr/local/flutter/packages/flutter_tools/bin/podhelper.
     #  from /Users/vagrant/git/hometastic/ios/Podfile:26
     #  -------------------------------------------
     #  
     >  require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
     #  
     #  -------------------------------------------
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `initialize'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `new'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:in `from_file'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in `podfile'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46:in `run'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
    /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
    /Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `load'
    /Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `<main>'
Error running pod install
Failed to build iOS platform, error: exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | flutter-build@0 (exit code: 1)                                | 18.96 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build        |
+---+---------------------------------------------------------------+----------+

The failure appears to relate to this issue on StackOverflow

On my machine, I am using Flutter, Channel stable, 1.20.1

"runtime error: index out of range" on Export Artifacts

I'm configuring Flutter Builds step for the first time. My Android artifact appears to build correctly, but it fails on the export. Any idea why this is happening? Guessing it has something to do with output pattern, which currently looks like this: build/app/outputs/bundle/release/app-release.aab

Any help would be greatly appreciated. Thanks

I also created a ticket here:

https://discuss.bitrise.io/t/flutter-build-android-step-panic-runtime-error-index-out-of-range/13384

It also seems to be related to:

#13

Log:

Build log:

±-----------------------------------------------------------------------------+

| (6) [email protected] |
±-----------------------------------------------------------------------------+
| id: flutter-build |
| version: 0.12.0 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-06-17T19:09:31Z |
±-----------------------------------------------------------------------------+
| |
Config:

IOSAdditionalParams: --release --no-codesign
AndroidAdditionalParams: --release
Platform: android
IOSExportPattern: build/ios/iphoneos/.app
AndroidOutputType: appbundle
AndroidExportPattern: build/app/outputs/bundle/release/app-release.aab
IOSCodesignIdentity:
ProjectLocation: src/android
DebugMode: false
AndroidBundleExportPattern: build/app/outputs/bundle//*.aab
Build Android
$ flutter “build” “appbundle” “–release”
Changing current working directory to: /Users/vagrant/git/src
Running Gradle task ‘bundleRelease’…
Note: /usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.5.8+2/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Removed unused resources: Binary resource data reduced from 557KB to 557KB: Removed 0%
Running Gradle task ‘bundleRelease’… 219.3s (!)
✓ Built build/app/outputs/bundle/release/app-release.aab (19.3MB).
Export Android artifact
panic: runtime error: index out of range
goroutine 1 [running]:
main.buildSpecification.exportAndroidArtifacts(0x1320837, 0x7, 0xc0000163b4, 0x9, 0xc000092480, 0x2, 0x2, 0xc000088f30, 0x1, 0x1, …)
/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit573646387/src/github.com/bitrise-steplib/bitrise-step-flutter-build/buildspec.go:105 +0x67d
main.buildSpecification.exportArtifacts(0x1320837, 0x7, 0xc0000163b4, 0x9, 0xc000092480, 0x2, 0x2, 0xc000088f30, 0x1, 0x1, …)
/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit573646387/src/github.com/bitrise-steplib/bitrise-step-flutter-build/buildspec.go:37 +0x21f
main.main()
/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise-go-toolkit573646387/src/github.com/bitrise-steplib/bitrise-step-flutter-build/main.go:213 +0x104e
| |
±–±--------------------------------------------------------------±---------+
| x | [email protected] (exit code: 2) | 3.8 min |
±–±--------------------------------------------------------------±---------+
| Issue tracker: …thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build |
±–±--------------------------------------------------------------±---------+

bitrise.yml

format_version: ‘8’
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: flutter
trigger_map:

push_branch: “
workflow: primary
pull_request_source_branch: “

workflow: primary
workflows:
deploy:
steps:
activate-ssh-key@4:
run_if: ‘{{getenv “SSH_RSA_PRIVATE_KEY” | ne “”}}’
git-clone@4: {}
script@1:
title: Do anything with Script step
certificate-and-profile-installer@1: {}
flutter-installer@0:
inputs:
is_update: ‘false’
cache-pull@2: {}
flutter-analyze@0:
inputs:
project_location: “$BITRISE_FLUTTER_PROJECT_LOCATION”
flutter-build@0:
inputs:
project_location: “$BITRISE_FLUTTER_PROJECT_LOCATION”
platform: both
xcode-archive@2:
inputs:
project_path: “$BITRISE_PROJECT_PATH”
scheme: “$BITRISE_SCHEME”
export_method: “$BITRISE_EXPORT_METHOD”
configuration: Release
deploy-to-bitrise-io@1: {}
cache-push@2: {}
primary:
steps:
activate-ssh-key@4:
run_if: ‘{{getenv “SSH_RSA_PRIVATE_KEY” | ne “”}}’
git-clone@4: {}
script@1:
title: Do anything with Script step
flutter-installer@0:
inputs:
is_update: ‘false’
cache-pull@2: {}
flutter-analyze@0:
inputs:
project_location: “$BITRISE_FLUTTER_PROJECT_LOCATION”
[email protected]:
inputs:
android_output_type: appbundle
project_location: “$ANDROID_PROJECT_LOCATION”
android_output_pattern: build/app/outputs/bundle/release/app-release.aab
platform: android
deploy-to-bitrise-io@1: {}
cache-push@2: {}
google-play-deploy@3:
inputs:
package_name: com.asure.mobile
app_path: “$ANDROID_BUILD_PATH”
service_account_json_key_path: “$googpleApiJson”
ios-auto-provision@1:
inputs:
team_id:
distribution_type: app-store
[email protected]:
inputs:
platform: android
android_output_type: appbundle
android_output_pattern: “*build/app/outputs/bundle/release/app-release.aab”
project_location: “$ANDROID_PROJECT_LOCATION”
app:
envs:
opts:
is_expand: false
BITRISE_FLUTTER_PROJECT_LOCATION: src
opts:
is_expand: false
BITRISE_PROJECT_PATH: src/ios/Runner.xcworkspace
opts:
is_expand: false
BITRISE_SCHEME: Runner
opts:
is_expand: false
BITRISE_EXPORT_METHOD: app-store
opts:
is_expand: false
ANDROID_BUILD_PATH: src/build/app/outputs/bundle/release/app-release.aab
opts:
is_expand: false
ANDROID_PROJECT_LOCATION: src/android

Flutter Build (Failed)

Dear all,

I'm getting this error when running workflow

The Xcode project defines schemes: OneSignalNotificationServiceExtension, Runner
You must specify a --flavor option to select one of the available schemes.
Run: failed to build iOS app: exit status 1
Run: failed to build iOS app: exit status 1
| |
+---+---------------------------------------------------------------+----------+
| x | Flutter Build (Failed)

None of the environment variables are being exported

I've included this step, post apk generation I echo'ed for the output environment variables but none of them seem set and a subsequent step that depends on this environment variable was also failing.

$BITRISE_APK_PATH is not set and neither are the $BITRISE_APK_PATH_LIST and other variables. I'm using the 0.12.0 version.

What am I missing? Do let me know if you need more info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.