Skip to content

[flutter_tools] "Unknown flutter tag" crash during flutter upgrade #133441

Closed

Description

@dotupNET

Edit by @christopherfujino This is a bug in the tool. Currently known safe workarounds to upgrade are to:

  1. flutter upgrade --force
  2. change your terminal's working directory to your Flutter SDK repo (you can find this under flutter doctor -v), then run flutter upgrade

Two hotfixes are currently being worked on, however, users will still need to use these workarounds to get them:

A postmortem report on this is forthcoming.


Is there an existing issue for this?

Steps to reproduce

Run "flutter upgrade" on 3.13.0 stable

Actual results

I got this error:

Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if not working on an official channel.

Logs

No response

Flutter Doctor output

Doctor output
xxx ~ % flutter doctor -v
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.5 22G74 darwin-arm64, locale de-DE)
    • Flutter version 3.13.0 on channel stable at /Users/xxx/data/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (12 days ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/xxx/Library/Android/Sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/xxx/Library/Android/Sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 60.1.2
    • Dart plugin version 203.8292

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • Nokia 5 4 (mobile) • GZQL1849FAL41701508 • android-arm64  • Android 12 (API 31)
    • macOS (desktop)    • macos               • darwin-arm64   • macOS 13.5 22G74 darwin-arm64
    • Chrome (web)       • chrome              • web-javascript • Google Chrome 116.0.5845.110

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. dam-ease commented on Aug 28, 2023

    @dam-ease

    Hi @dotupNET. Thanks for filing this. Please try running flutter upgrade --force instead to see it works in your case

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 28, 2023
  3. dotupNET commented on Aug 28, 2023

    @dotupNET
    Author

    Hi @dotupNET. Thanks for filing this. Please try running flutter upgrade --force instead to see it works in your case

    Hi. I know this Flag. But this is not the expected behaviour. I didn't change anything.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 28, 2023
  5. mjauernig commented on Aug 28, 2023

    @mjauernig

    Same error here. Like @dotupNET didn't change anything. With --force the upgrade where installed.

  6. daachet commented on Aug 28, 2023

    @daachet

    I have the same error and didn't change anything. Trying to update 3.13.0 stable.

  7. sorich87 commented on Aug 28, 2023

    @sorich87

    I upgraded with --force but wanted to report I unexpectedly got the same error too, as I didn't make local changes (I installed 3.13.0 from scratch a couple of weeks ago).

  8. MHTpro commented on Aug 28, 2023

    @MHTpro

    I have the same error and didn't change anything. And I upgraded with this command: flutter upgrade -f

  9. pastelcode commented on Aug 28, 2023

    @pastelcode

    Same error. Could upgrade with flutter upgrade --force.

  10. MikeAngelE commented on Aug 29, 2023

    @MikeAngelE

    Having the same issue. Flutter doesn't seem to want to build the app on the Pixel_3a emulator until the upgrade is done?

  11. danagbemava-nc commented on Aug 29, 2023

    @danagbemava-nc
    Member

    Hi all, with the release of 3.13.1, can anyone check if they hit this issue when they try to upgrade?

  12. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 29, 2023
  13. leidig54 commented on Aug 29, 2023

    @leidig54

    Just tried and no luck for me.

    Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if not working on an official channel.

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.13.0, on macOS 13.5 22G74 darwin-arm64, locale en-GB)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2021.2)
    [✓] VS Code (version 1.81.1)
    [✓] Connected device (1 available)
    [✓] Network resources
    
    • No issues found!
    
  14. yackers commented on Aug 29, 2023

    @yackers

    @danagbemava-nc ,

    Hi all, with the release of 3.13.1, can anyone check if they hit this issue when they try to upgrade?

    After flutter upgrade --force from 3.13.0 to 3.13.1 , flutter upgrade working as expected

    D:\Projects\Flutter\> flutter upgrade
    Flutter is already up to date on channel stable
    Flutter 3.13.1 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision e1e47221e8 (6 days ago) • 2023-08-22 21:43:18 -0700
    Engine • revision b20183e040
    Tools • Dart 3.1.0 • DevTools 2.25.0
    
  15. 43 remaining items

  16. smith558 commented on Aug 31, 2023

    @smith558
    stanley@hp-stanley:~$ flutter upgrade
    Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use
    git directly if not working on an official channel.
    stanley@hp-stanley:~$ flutter upgrade --force
    Upgrading Flutter to 3.13.2 from 3.13.1 in /home/stanley/snap/flutter/common/flutter...
    Building flutter tool...
    Resolving dependencies...
    Got dependencies.
    
    Upgrading engine...
    
    Flutter 3.13.2 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision ff5b5b5fa6 (7 days ago) • 2023-08-24 08:12:28 -0500
    Engine • revision b20183e040
    Tools • Dart 3.1.0 • DevTools 2.25.0
    
    Running flutter doctor...
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.13.2, on Ubuntu 23.04 6.2.0-31-generic, locale en_GB.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Chrome - develop for the web
    [✓] Linux toolchain - develop for Linux desktop
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version unknown)
        ✗ Unable to determine VS Code version.
    [✓] Connected device (3 available)
    [✓] Network resources
    
    • No issues found!
    stanley@hp-stanley:~$ 
    
    
  17. christopherfujino commented on Aug 31, 2023

    @christopherfujino
    Contributor

    For me the upgrade worked when running it in the flutter install directory. It did not work when running it in the directory of my flutter aplication.

    It appears to me that it fails when running the upgrade command in the directory of my flutter application when my flutter application has uncommitted files.

    Ahh, thanks for this clue! This whole time my current working directory when I run flutter upgrade has been within the Flutter SDK repo, thus I could not reproduce. I'm investigating now, but it seems like I introduced a git callsite and forgot to set the working directory explicitly to the Flutter repo.

  18. added
    P0Critical issues such as a build break or regression
    and removed
    P1High-priority issues at the top of the work list
    on Aug 31, 2023
  19. WorikQCI commented on Aug 31, 2023

    @WorikQCI

    Still not working.

    Is this a problem in:

    Flutter 3.13.0 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision efbf63d9c6 (2 weeks ago) • 2023-08-15 21:05:06 -0500
    Engine • revision 1ac611c64e
    Tools • Dart 3.1.0 • DevTools 2.25.0
    

    so to upgrade I do what exactly?

  20. christopherfujino commented on Aug 31, 2023

    @christopherfujino
    Contributor

    so to upgrade I do what exactly?

    Unfortunately you will need to either do a flutter upgrade --force or change your working directory to the Flutter repo. My fix will not apply for you until AFTER you get it.

    Also note, that I haven't cherrypicked the fix to stable yet. So even if you use the workaround today, you will still need to use the workaround for the next hotfix release to get the fix.

  21. WorikQCI commented on Aug 31, 2023

    @WorikQCI

    Ok.

    It is what it is.

    Thank you for your attention

  22. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 1, 2023
  23. github-actions commented on Sep 15, 2023

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

  24. locked as resolved and limited conversation to collaborators on Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P0Critical issues such as a build break or regressioncustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 3.13Found to occur in 3.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions