Skip to content

Error creating IOS version to upload to Testflight. #24239

Closed

Description

@foosionsapps

Hi, I want to upload a flutter app to apple store but when I go to Xcode and I make: Product -> Archive
After some minutes of Xcode process I get this error:

Could not find an option named "track-widget-creation".

Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
Failed to build /Users/{"myUser"}/IdeaProjects/{"myProjectName"}.
Command /bin/sh failed with exit code 255

Here is my flutter doctor -v:

[✓] Flutter (Channel dev, v0.11.3, on Mac OS X 10.14.1 18B75, locale en-AR)
    • Flutter version 0.11.3 at /Users/{"myUser"}/flutter
    • Framework revision 72bf075e8d (2 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/{"myUser"}/Library/Android/sdk
    • Android NDK at /Users/{"myUser"}/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.2

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.0.2
    • Dart plugin version 181.5616
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)

[✓] IntelliJ IDEA Community Edition (version 2018.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 30.0.2
    • Dart plugin version 182.5124

[✓] Connected device (1 available)
    • {"myUser"} Phone • af7486d829711c96bebd0ccdd8e2d281ebd4825b • ios • iOS 12.0

• No issues found!

Can someone help me?

Thanks!

Activity

  1. added
    c: crashStack traces logged to the console
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Nov 12, 2018
  2. added this to the milestone on Nov 12, 2018
  3. xster commented on Nov 12, 2018

    @xster
    Member
  4. FViscardi commented on Nov 15, 2018

    @FViscardi

    @foosionsapps

    In the meantime (in XCode), you can try and go to Runner (Poject) -> Build Settings (Tab), scroll down and set "TRACK_WIDGET_CREATION" = false under "User-Defined"

    I'm currently trying that approach myself, as I ran into the same issue today.

  5. zoechi commented on Nov 15, 2018

    @zoechi
    Contributor
    flutter run --no-track-widget-creation
    

    seems to work as well
    #20260 (comment)

  6. alann-maulana commented on Nov 17, 2018

    @alann-maulana

    I got this Could not find an option named "track-widget-creation" error too when executing

    flutter build ios
    

    Here is my flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel master, v0.11.7-pre.47, on Mac OS X 10.14 18A391, locale en-ID)
    [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    [✓] Android Studio (version 3.2)
    [✓] VS Code (version 1.28.2)
    [✓] Connected device (3 available)
    
    • No issues found!
    
  7. freezestudio commented on Nov 17, 2018

    @freezestudio

    I got this Could not find an option named "track-widget-creation" error too when executing

    flutter build ios
    

    Here is my flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel master, v0.11.7-pre.47, on Mac OS X 10.14 18A391, locale en-ID)
    [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    [✓] Android Studio (version 3.2)
    [✓] VS Code (version 1.28.2)
    [✓] Connected device (3 available)
    
    • No issues found!
    

    me too.

  8. wenerme commented on Nov 18, 2018

    @wenerme

    @foosionsapps

    In the meantime (in XCode), you can try and go to Runner (Poject) -> Build Settings (Tab), scroll down and set "TRACK_WIDGET_CREATION" = false under "User-Defined"

    I'm currently trying that approach myself, as I ran into the same issue today.

    Not works.

  9. wenerme commented on Nov 18, 2018

    @wenerme

    Work around

    code $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
      local track_widget_creation_flag=""
      if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
        # Remove the flag
        # track_widget_creation_flag="--track-widget-creation"
        track_widget_creation_flag=""
      fi
  10. kleyos commented on Nov 20, 2018

    @kleyos
    flutter run --no-track-widget-creation
    

    seems to work as well
    #20260 (comment)

    how to create archive build with it?

  11. kleyos commented on Nov 20, 2018

    @kleyos

    Work around

    code $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
      local track_widget_creation_flag=""
      if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
        # Remove the flag
        # track_widget_creation_flag="--track-widget-creation"
        track_widget_creation_flag=""
      fi

    Permission denied for saving xcode_backend.sh

  12. wenerme commented on Nov 21, 2018

    @wenerme

    Work around

    code $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
      local track_widget_creation_flag=""
      if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
        # Remove the flag
        # track_widget_creation_flag="--track-widget-creation"
        track_widget_creation_flag=""
      fi

    Permission denied for saving xcode_backend.sh

    Then sudo nano $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh

  13. calebisstupid commented on Nov 21, 2018

    @calebisstupid

    This is a weird one that I have been facing for the past few days since updating Flutter.

    For me, the solution is to run flutter build ios --release in the project directory, which now fails with several pod errors, but I just ignore those and re-archive in Xcode and it works.

    I do not know enough about iOS build tools to know why these things fail. Just that before the newest beta branch version flutter build ios --release worked, now it fails but doesn't mean anything serious, and despite the flutter documentation, I still have to run this command before archiving in Xcode or I get strange errors like this one.

  14. 12 remaining items

  15. Klauzt commented on Feb 5, 2019

    @Klauzt

    Work around

    code $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
      local track_widget_creation_flag=""
      if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
        # Remove the flag
        # track_widget_creation_flag="--track-widget-creation"
        track_widget_creation_flag=""
      fi

    While doing this I lost all hot reload capabilities on iOS, so instead of removing completely the flag I tried to just use it on release mode

    local track_widget_creation_flag=""
    if [[ -n "$TRACK_WIDGET_CREATION" && "${build_mode}" == "debug" ]]; then
      track_widget_creation_flag="--track-widget-creation"
    fi

    It seems to work so far

  16. zoechi commented on Feb 8, 2019

    @zoechi
    Contributor

    @Klauzt #24239 (comment) should do as well

  17. IAmKio commented on Feb 12, 2019

    @IAmKio

    XCode > Runner Target > Build Settings > Scroll down to User-Defined and deleted all three entries for TRACK_WIDGET_CREATION. Solved it (for me).

  18. campioncino commented on Apr 15, 2019

    @campioncino

    @IAmKio Great!
    It works for me too!

  19. moadqassem commented on Apr 21, 2019

    @moadqassem

    Well, I have encountered this issue and I didn't have to do anything either in sh scripts nor Xcode. The only thing I tried was:

    From the flutter project root directory, executed the following:
    flutter clean
    flutter build ios

    So in other words don't build your flutter project using Xcode directly because your project might need some commands to be executed(preprocessing) which flutter is doing for you and then it uses Xcode build.

    After the build is done go to Xcode and try to Archive your project once again.

    P.S: Flutter Version that I am running v1.4.8

  20. iamgamelover commented on May 21, 2019

    @iamgamelover

    XCode > Runner Target > Build Settings > Scroll down to User-Defined and deleted all three entries for TRACK_WIDGET_CREATION. Solved it (for me).

    @IAmKio Thank you, It works for me too!

  21. BRLOKESH commented on Jul 8, 2019

    @BRLOKESH

    iOS build Archiving but display white screen.

    How to resolve this issue.

  22. iamgamelover commented on Jul 8, 2019

    @iamgamelover

    @BRLOKESH Archiving for Generic iOS Device.

    image

  23. MightyRai90 commented on Jul 17, 2019

    @MightyRai90

    iOS build Archiving but display white screen.

    How to resolve this issue.

    Any success about fixing the white screen?

  24. BRLOKESH commented on Jul 18, 2019

    @BRLOKESH

    No Success ..
    Screen Shot 2019-07-18 at 10 58 13 AM

  25. iamgamelover commented on Jul 21, 2019

    @iamgamelover

    @BRLOKESH Try running 'flutter build ios --release' before Archiving with XCode.

  26. BRLOKESH commented on Jul 22, 2019

    @BRLOKESH

    Now Working **Thanks @mobilecheng **

    LOKESH:~ LOKESH$ touch /.bash_profile
    LOKESH:
    LOKESH$ open -e /.bash_profile
    LOKESH:
    LOKESH$ source $HOME/.bash_profile
    LOKESH:~ LOKESH$ echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/Users/apple/Desktop/flutter V1.5.4/flutter/bin:/Users/apple/Desktop/flutter V1.5.4/bin
    LOKESH:~ LOKESH$

  27. github-actions commented on Aug 14, 2021

    @github-actions

    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.

  28. locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions