Repository navigation
[flutter_tools] "Unknown flutter tag" crash during flutter upgrade #133441
Copy link
Copy link
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressioncustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 3.13Found to occur in 3.13Found to occur in 3.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Edit by @christopherfujino This is a bug in the tool. Currently known safe workarounds to upgrade are to:
- flutter upgrade --force
- change your terminal's working directory to your Flutter SDK repo (you can find this under
flutter doctor -v), then runflutter upgrade
Two hotfixes are currently being worked on, however, users will still need to use these workarounds to get them:
- [CP] Fix flutter upgrade failing with "Unknown Flutter tag" on stable 3.13 #133819
- [CP] Fix flutter upgrade failing with "Unknown Flutter tag" on beta 3.14 #133822
A postmortem report on this is forthcoming.
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressioncustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 3.13Found to occur in 3.13Found to occur in 3.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Activity
dam-ease commentedon Aug 28, 2023
Hi @dotupNET. Thanks for filing this. Please try running
flutter upgrade --forceinstead to see it works in your casedotupNET commentedon Aug 28, 2023
Hi. I know this Flag. But this is not the expected behaviour. I didn't change anything.
mjauernig commentedon Aug 28, 2023
Same error here. Like @dotupNET didn't change anything. With
--forcethe upgrade where installed.daachet commentedon Aug 28, 2023
I have the same error and didn't change anything. Trying to update 3.13.0 stable.
sorich87 commentedon Aug 28, 2023
I upgraded with
--forcebut 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).MHTpro commentedon Aug 28, 2023
I have the same error and didn't change anything. And I upgraded with this command: flutter upgrade -f
pastelcode commentedon Aug 28, 2023
Same error. Could upgrade with
flutter upgrade --force.MikeAngelE commentedon Aug 29, 2023
Having the same issue. Flutter doesn't seem to want to build the app on the Pixel_3a emulator until the upgrade is done?
danagbemava-nc commentedon Aug 29, 2023
Hi all, with the release of 3.13.1, can anyone check if they hit this issue when they try to upgrade?
leidig54 commentedon Aug 29, 2023
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.yackers commentedon Aug 29, 2023
@danagbemava-nc ,
After
flutter upgrade --forcefrom 3.13.0 to 3.13.1 ,flutter upgradeworking as expected43 remaining items
smith558 commentedon Aug 31, 2023
christopherfujino commentedon Aug 31, 2023
Ahh, thanks for this clue! This whole time my current working directory when I run
flutter upgradehas 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.[flutter_tools] Fix flutter upgrade not finding git tags (#133778)
WorikQCI commentedon Aug 31, 2023
Still not working.
Is this a problem in:
so to upgrade I do what exactly?
christopherfujino commentedon Aug 31, 2023
Unfortunately you will need to either do a
flutter upgrade --forceor 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.
[flutter_tools] Fix flutter upgrade not finding git tags (flutter#133778
[flutter_tools] Fix flutter upgrade not finding git tags (flutter#133778
WorikQCI commentedon Aug 31, 2023
Ok.
It is what it is.
Thank you for your attention
github-actions commentedon Sep 15, 2023
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 -vand a minimal reproduction of the issue.