Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
dotupNET opened this issue Aug 28, 2023 · 48 comments · Fixed by #133778
Closed
2 tasks done

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

dotupNET opened this issue Aug 28, 2023 · 48 comments · Fixed by #133778
Assignees
Labels
customer: crowd Affects or could affect many people, though not necessarily a specific customer. found in release: 3.13 Found to occur in 3.13 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression r: fixed Issue is closed as already fixed in a newer version team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team workaround available There is a workaround available to overcome the issue

Comments

@dotupNET
Copy link

dotupNET commented Aug 28, 2023

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!
@dam-ease dam-ease added the in triage Presently being triaged by the triage team label Aug 28, 2023
@dam-ease
Copy link

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

@dam-ease dam-ease added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 28, 2023
@dotupNET
Copy link
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.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 28, 2023
@mjauernig
Copy link

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

@daachet
Copy link

daachet commented Aug 28, 2023

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

@sorich87
Copy link

sorich87 commented Aug 28, 2023

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

@MHTpro
Copy link

MHTpro commented Aug 28, 2023

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

@pastelcode
Copy link

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

@MikeAngelE
Copy link

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
Copy link
Member

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

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 29, 2023
@leidig54
Copy link

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!

@yackers
Copy link

yackers commented Aug 29, 2023

@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

@TheManuz
Copy link

Facing the same problem.

Solved with flutter upgrade --force.

@smunoz-ml
Copy link

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

@ahmeedev
Copy link

ahmeedev commented Aug 29, 2023

yeah, that works

image

@Gufdoor
Copy link

Gufdoor commented Aug 29, 2023

I did the following and it worked (credits for Lano):

On the directory where Flutter is located:

  1. Open terminal
  2. If your current Flutter version isn't stable, run the following: git checkout stable
  3. Later, run the following: git pull
  4. Check your current version: flutter --version
  5. If still not on latest version, run: flutter upgrade

Hope it works!

@denn319
Copy link

denn319 commented Aug 30, 2023

flutter upgrade --force works for me.

@dam-ease
Copy link

dam-ease commented Aug 30, 2023

Hi everyone, thanks for your responses. I am able to reproduce this same behaviour on the stable channel, but can't reproduce it on master. Upgrade works after running flutter upgrade --force.

/cc @christopherfujino

@dam-ease dam-ease added tool Affects the "flutter" command-line tool. See also t: labels. customer: crowd Affects or could affect many people, though not necessarily a specific customer. has reproducible steps The issue has been confirmed reproducible and is ready to work on workaround available There is a workaround available to overcome the issue team-tool Owned by Flutter Tool team found in release: 3.13 Found to occur in 3.13 and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Aug 30, 2023
@christopherfujino christopherfujino added the P1 High-priority issues at the top of the work list label Aug 30, 2023
@IncognitoGK9
Copy link

IncognitoGK9 commented Aug 31, 2023

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

yes --force works but as reported earlier, there is a new bug which throws the reported error if you do not use --force,
Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if
not working on an official channel. This came with the upgrade to 3.13.0

beyond this, the 3.13.0 came with other bugs yet to be resolved: (though resolved and merged to Master, it is yet to be in the stable, hope it is also tested: [https://github.com/firebase/flutterfire/pull/11514]

@danagbemava-nc
Copy link
Member

I want to point out that this also happens with the upgrade from 3.13.1 to 3.13.2

logs
nexus@Daniels-MBP nevercode %flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.1, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
[✓] VS Code (version 1.81.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
nexus@Daniels-MBP nevercode % 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.
nexus@Daniels-MBP nevercode % flutter upgrade --force
Upgrading Flutter to 3.13.2 from 3.13.1 in /Users/nexus/dev/sdks/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 macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
[✓] VS Code (version 1.81.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

@sorich87
Copy link

Same issue for upgrade from 3.13.1 to 3.13.2.

➜  xxx git:(main) ✗ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.1, on macOS 13.3.1 22E772610a darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.81.1)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
➜  xxx git:(main) ✗ git --version
git version 2.39.2 (Apple Git-143)
➜ flutter git:(stable) ✗ cat /Users/xxx/flutter/bin/cache/flutter.version.json
{
  "frameworkVersion": "3.13.1",
  "channel": "stable",
  "repositoryUrl": "https://github.com/flutter/flutter.git",
  "frameworkRevision": "e1e47221e86272429674bec4f1bd36acc4fc7b77",
  "frameworkCommitDate": "2023-08-22 21:43:18 -0700",
  "engineRevision": "b20183e04096094bcc37d9cde2a4b96f5cc684cf",
  "dartSdkVersion": "3.1.0",
  "devToolsVersion": "2.25.0",
  "flutterVersion": "3.13.1"
}%

@mohamedsalah414
Copy link

I have the same error

flutter upgrade -v
[ +139 ms] executing: git tag --points-at HEAD
[  +92 ms] Exit code 128 from: git tag --points-at HEAD
[        ] fatal: not a git repository (or any of the parent directories): .git
[   +1 ms] executing: git describe --match *.*.* --long --tags HEAD
[  +78 ms] Exit code 128 from: git describe --match *.*.* --long --tags HEAD
[        ] fatal: not a git repository (or any of the parent directories): .git
[        ] Could not interpret results of "git describe":
[   +3 ms] executing: [C:\src\flutter/] git fetch --tags
[+1192 ms] executing: [C:\src\flutter/] git rev-parse --verify @{upstream}
[  +86 ms] ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[   +1 ms] executing: [C:\src\flutter/] git tag --points-at ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[ +105 ms] Exit code 0 from: git tag --points-at ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[        ] 3.13.2
[  +12 ms] "flutter upgrade" took 1,624ms.
[   +6 ms] Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if not working on an
official channel.
[   +8 ms]
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      UpgradeCommandRunner.runCommandFirstHalf (package:flutter_tools/src/commands/upgrade.dart:142:9)
           <asynchronous suspension>
           #2      UpgradeCommandRunner.runCommand (package:flutter_tools/src/commands/upgrade.dart:102:7)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
           <asynchronous suspension>
           #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
           <asynchronous suspension>
           #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
           <asynchronous suspension>
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     main (package:flutter_tools/executable.dart:90:3)
           <asynchronous suspension>


[ +269 ms] ensureAnalyticsSent: 251ms
[   +2 ms] Running 0 shutdown hooks
[   +3 ms] Shutdown hooks complete
[   +1 ms] exiting with code 1

@LAPPIT
Copy link

LAPPIT commented Aug 31, 2023

I have the same problem :(
Worked with flutter upgrade --force :)
Had a fresh Flutter SDK, downloaded last week (when I had the same problem) and no changes after that.

@aisivan36
Copy link

Ok, it's fine. I am not the only one who got the same problem.

@4ddev
Copy link

4ddev commented Aug 31, 2023

Same


[   +3 ms] executing: sw_vers -productName
[  +12 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[   +7 ms] Exit code 0 from: sw_vers -productVersion
[        ] 13.4.1
[        ] executing: sw_vers -buildVersion
[   +7 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 22F770820d
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] arm64
[   +4 ms] executing: sysctl hw.optional.arm64
[   +2 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[  +46 ms] executing: git tag --points-at HEAD
[   +7 ms] Exit code 0 from: git tag --points-at HEAD
[   +1 ms] executing: git describe --match *.*.* --long --tags HEAD
[   +5 ms] Exit code 128 from: git describe --match *.*.* --long --tags HEAD
[        ] Schwerwiegend: Keine Namen gefunden, kann nichts beschreiben.
[        ] Could not interpret results of "git describe": 
[   +1 ms] executing: [/opt/homebrew/Caskroom/flutter/3.13.0/flutter/] git fetch --tags
[ +686 ms] executing: [/opt/homebrew/Caskroom/flutter/3.13.0/flutter/] git rev-parse --verify @{upstream}
[   +6 ms] ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[        ] executing: [/opt/homebrew/Caskroom/flutter/3.13.0/flutter/] git tag --points-at ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[   +7 ms] Exit code 0 from: git tag --points-at ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a
[        ] 3.13.2
[   +4 ms] "flutter upgrade" took 751ms.
[   +2 ms] Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if not working on an official channel.
[   +1 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      UpgradeCommandRunner.runCommandFirstHalf (package:flutter_tools/src/commands/upgrade.dart:142:9)
           <asynchronous suspension>
           #2      UpgradeCommandRunner.runCommand (package:flutter_tools/src/commands/upgrade.dart:102:7)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
           <asynchronous suspension>
           #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
           <asynchronous suspension>
           #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
           <asynchronous suspension>
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     main (package:flutter_tools/executable.dart:90:3)
           <asynchronous suspension>
           
           
[  +60 ms] ensureAnalyticsSent: 55ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.4.1 22F770820d darwin-arm64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.81.1)
[✓] VS Code (version 1.74.2)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

@christoph-zenger-hcsg
Copy link

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.

@ekuleshov
Copy link

Same issue when upgrading to 3.13.2. I'm pretty use I used flutter upgrade to get 3.13.1 version.

% git status
On branch stable
Your branch is behind 'origin/stable' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   bin/internal/shared.sh

no changes added to commit (use "git add" and/or "git commit -a")

% git branch -vv
  beta   ac71592bc6 [origin/beta: ahead 5, behind 590] [flutter_releases] Flutter beta 3.13.0-0.2.pre Framework Cherrypicks (#130822)
* stable e1e47221e8 [origin/stable: behind 1] [CP] Space character should be optional when tree shaking fonts (#132882)

% git remote -v
origin  https://github.com/flutter/flutter.git (fetch)
origin  https://github.com/flutter/flutter.git (push)

% git log --pretty="%h %d" | head -n 20
e1e47221e8  (HEAD -> stable, tag: 3.13.1)
aeed4d21ee 
ce2fa57e45 
efbf63d9c6  (tag: 3.13.0)
53841b2cc1 
ff8ade8b77 
54040e6041 
0ea0979cc2 
7e07cd41cb  (tag: 3.13.0-0.4.pre)
95b3a3ed98 
85127f4f94 
f4c42610bb 
5c4bfbcc85 
e90f5d4561  (tag: 3.13.0-0.3.pre)
1f0b77f3fd 
945b12da6a 
ac71592bc6  (tag: 3.13.0-0.2.pre, beta)
1dc07d26fc 
1f6bdb6fa2  (tag: 3.13.0-0.1.pre)
257a29931c  (tag: 3.13.0-0.0.pre)

% cat bin/cache/flutter.version.json 
{
  "frameworkVersion": "3.13.1",
  "channel": "stable",
  "repositoryUrl": "https://github.com/flutter/flutter.git",
  "frameworkRevision": "e1e47221e86272429674bec4f1bd36acc4fc7b77",
  "frameworkCommitDate": "2023-08-22 21:43:18 -0700",
  "engineRevision": "b20183e04096094bcc37d9cde2a4b96f5cc684cf",
  "dartSdkVersion": "3.1.0",
  "devToolsVersion": "2.25.0",
  "flutterVersion": "3.13.1"
}

% flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.1, on macOS 12.6.7 21G651 darwin-arm64, locale en-CA)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Community Edition (version 2023.2.1)
[✓] VS Code (version 1.81.1)
[✓] Connected device (2 available)
[✓] Network resources

@NirmalAriyathilake
Copy link

I had the same error when trying to upgrade to 3.13.2 from 3.13.0.

@christoph-zenger-hcsg Thanks for the suggestion.

Running flutter upgrade from the flutter directory works, but fails from any other directory.

@smith558
Copy link

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:~$ 

@christopherfujino
Copy link
Member

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.

@christopherfujino christopherfujino added P0 Critical issues such as a build break or regression and removed P1 High-priority issues at the top of the work list labels Aug 31, 2023
@WorikQCI
Copy link

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?

@christopherfujino
Copy link
Member

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.

@WorikQCI
Copy link

Ok.

It is what it is.

Thank you for your attention

@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Sep 1, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer: crowd Affects or could affect many people, though not necessarily a specific customer. found in release: 3.13 Found to occur in 3.13 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression r: fixed Issue is closed as already fixed in a newer version team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team workaround available There is a workaround available to overcome the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.