Flutter Version Management: A simple CLI to manage Flutter SDK versions.

Overview

fvm

GitHub stars Pub Version Likes Health Coverage Github All Contributors MIT Licence Awesome Flutter

Flutter Version Management: A simple cli to manage Flutter SDK versions.

FVM helps with the need for a consistent app builds by allowing to reference Flutter SDK version used on a per-project basis. It also allows you to have multiple Flutter versions installed to quickly validate and test upcoming Flutter releases with your apps, without waiting for Flutter installation every time.

Features:

  • Configure and use Flutter SDK version per project
  • Ability to install and cache multiple Flutter SDK Versions
  • Fast switch between Flutter channels & versions
  • Dynamic SDK paths for IDE debugging support.
  • Version FVM config with a project for consistency across teams and CI environments.
  • Set global Flutter version across projects

The app has moved to a different repo and is now Flutter Sidekick.

Read more about it here.

FVM App Screenshot

Version Management

This tool allows you to manage multiple channels and releases, and caches these versions locally, so you don't have to wait for a full setup every time you want to switch versions.

Also, it allows you to grab versions by a specific release, i.e. v1.2.0 or 1.17.0-dev.3.1. In case you have projects in different Flutter SDK versions and do not want to upgrade.

Usage

  1. Install Dart.
  2. Activate Fvm:
> pub global activate fvm

Read dart.dev docs for more info on how to run global dart scripts.

And then, for information on each command:

> fvm help

Install a SDK Version

FVM gives you the ability to install many Flutter releases or channels.

  • version - use stable to install the Stable channel and v1.8.0 or 1.17.0-dev.3.1 to install the release.
  • --skip-setup - will skip Flutter setup after install
> fvm install <version>

Project Config SDK Version

If you configured your project to use a specific version, run install without any arguments will install the proper version.

> fvm install

Check out use command to see how to configure a version per project.

Use a SDK Version

You can use different Flutter SDK versions per project. To do that you have to go into the root of the project and:

> fvm use <version>

Set Global Version

If you want to use a specific version by default in your machine, you can specify the flag --global to the use command. A symbolic link to the Flutter version will be created in the fvm home folder, which you could then add to your PATH environment variable as follows: FVM_HOME/default/bin. Use fvm use --help, this will give you the exact path you need to configure.

⚠️ Do not activate fvm using flutter pub global activate if you plan on using the --global flag. Only activate fvm using pub global activate fvm.

> fvm use <version> --global

Force Flag

Fvm only allows to call the use command on Flutter projects. However if you want to call the use command on a non-flutter directory use the --force flag.

If you are starting a new project and plan on using fvm flutter create you wil have to use the --force flag

> fvm use <version> --force

Remove a SDK Version

Using the remove command will uninstall the SDK version locally, this will impact any projects that depend on that version of the SDK.

> fvm remove <version>

Upgrade the current SDK Version

To upgrade currently used Flutter SDK version (e.g. stable) you should call the Flutter SDK command as you would normally do in case of typical Flutter installation. See more in the section Running Flutter SDK commands.

> fvm flutter upgrade

List Installed Versions

List all the versions that are installed on your machine. This command will also output where FVM stores the SDK versions.

> fvm list

List Flutter Releases

Displays all Flutter releases, including the current version for dev, beta and stable channels.

> fvm releases

Running Flutter SDK commands

There are couple of ways you can interact with the Flutter SDK setup in your project. You can run all the Flutter commands through the fvm proxy commands.

Proxy Commands

The flutter and dart commands within fvm proxy all calls to the CLI just changing the SDK to be the local one.

For instance, to run the flutter run with a given Flutter SDK version just call the following. FVM will recursively try for a version in a parent directory.

> fvm flutter run

This syntax works also for commands with parameters. The following command will call flutter build for a selected flavor and target.

> fvm flutter build aab --release --flavor prod -t lib/main_prod.dart

In other words, calling a fvm flutter xxx command is equivalent to flutter xxx if fvm is available in the directory tree.

Call Local SDK Directly

You can also call the local SDK directly bypassing the proxy commands. FVM creates a symbolic link within your project called fvm which links to the installed version of the SDK.

> .fvm/flutter_sdk/bin/flutter run

The above example is equivalent to flutter run command using the local project SDK.

Change FVM Cache Directory

You are able to configure the fvm cache directory by setting FVM_HOME environment variable. If nothing is set the default fvm path will be used. You are also able to change the directory by setting the --cache-path on the config. See below

FVM Config

There are some configurations which you are able to set on FVM. All settings set on CLI are compatible with the App(GUI).

List config

> fvm config

Set cache path

Location where Flutter SDK versions will be stored. If nothing is set, default will be used.

> fvm config --cache-path <CACHE_PATH>

Flutter Fork & Git Cache

You are able to use your own Flutter fork or cache the Flutter git locally for faster cloning, by setting the FVM_GIT_CACHE environment variable.

Configure Your IDE

In some situations you might have to restart your IDE and the Flutter debugger to make sure it uses the new version.

VSCode

Add the following to your settings.json. This will list all Flutter SDKs installed when using VSCode when using Flutter: Change SDK.

Use fvm list to show you the path to the versions.

List all versions installed by FVM

You can see all the versions installed by FVM in VS Code by just providing path to versions directory:

{
  "dart.flutterSdkPaths": ["/Users/usr/fvm/versions"]
}

Alternatively, you can specify only selected versions. The following snippet will cause VS Code to show only stable and dev versions of Flutter.

{
  "dart.flutterSdkPaths": [
    "/Users/usr/fvm/versions/stable",
    "/Users/usr/fvm/versions/dev"
  ]
}

To change current Flutter version open a project and select Flutter: Change SDK in the command palette. You should see all the versions as depicted in the following screenshot.

VS Code version selector screenshot

You can also add the version symlink for dynamic switch

{
  "dart.flutterSdkPath": ".fvm/flutter_sdk"
}

Remove the flutter sdk from search to make things easier

{
  "search.exclude": {
    "**/.fvm": true
  }
}

Android Studio

Copy the absolute path of fvm symbolic link in your root project directory. Example: /absolute/path-to-your-project/.fvm/flutter_sdk

In the Android Studio menu open Languages & Frameworks -> Flutter or search for Flutter and change Flutter SDK path. Apply the changes. You now can Run and Debug with the selected versions of Flutter. Restart Android Studio to see the new settings applied.

Add your IDE instructions here

Working with this repo

Tests

pub run test

Publishing package

Before pushing package to pub.dev. Run command to create version constant.

pub run build_runner build

Update test coverage

To update test coverage run the following command.

pub run test_coverage

Troubleshooting

  1. On Windows make sure you are running as an administrator
  2. If you get errors with messages invalid kernel binary or invalid sdk hash it means you activated fvm using flutter pub global activate fvm. Only activate fvm using pub global activate fvm.

License

This project is licensed under the MIT License - see the LICENSE file for details

Contributors

Thanks goes to these wonderful people (emoji key):


Leo Farias

📖 🤔 💻 💡 👀 🚧 🚇

Ianko Leite

🤔

Caijinglong

💻 🤔

zmtzawqlp

🐛

Peter Leibiger

💻 🚧 💬

Luca Panteghini

📖

David Martos

💻 ⚠️ 📖

Sven Jacobs

💻

Wolfhard Prell

💻

Jaspreet Singh

🤔 💻

Matias de Andrea

📖

znjameswu

🐛

Dominik Roszkowski

📖 📢

Suguru Kishimoto

🐛

mx1up

🐛 💻

Alexandru Mariuti

💻

Andrea Del Fante

🤔 💻

Pieter van Loon

💻 🤔

Mr Yang

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Comments
  • [BUG] fvm runs commands twice on [Windows]

    [BUG] fvm runs commands twice on [Windows]

    fvm command on Windows runs twice

    On Windows when I run fvm it has for quite a while been running the given command twice:

    Like so:

    > fvm use dev --verbose
    Project now uses Flutter: dev
    Project now uses Flutter: dev
    
    > fvm flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel dev, 1.27.0-8.0.pre, on Microsoft Windows [Version 10.0.19041.804], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
    [√] Android Studio (version 4.1.0)
    [√] IntelliJ IDEA Community Edition (version 2020.3)
    [√] VS Code (version 1.53.2)
    [√] Connected device (5 available)
    
    • No issues found!
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel dev, 1.27.0-8.0.pre, on Microsoft Windows [Version 10.0.19041.804], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
    [√] Android Studio (version 4.1.0)
    [√] IntelliJ IDEA Community Edition (version 2020.3)
    [√] VS Code (version 1.53.2)
    [√] Connected device (5 available)
    
    • No issues found!
    
    >  fvm version
    1.3.7
    1.3.7
    

    Environment:

    • OS: Windows10
    • Shell: PowerShell 7.1.2
    • FVM: 1.3.7

    Additional context Sorry, not sure with which version of fvm it started happening, but I think I have seen it at least for 2 months. Just never got around to reporting it.

    Everything works, but the commands always running twice is a bit annoying to say the least.

    bug help wanted 
    opened by rydmike 39
  • [BUG] Can't load Kernel binary: Invalid kernel binary format version.

    [BUG] Can't load Kernel binary: Invalid kernel binary format version.

    Describe the bug I'm getting the following message when running fvm

    Can't load Kernel binary: Invalid kernel binary format version.
    

    To Reproduce Steps to reproduce the behavior: MacOs Catalina 10.15.5

    bug 
    opened by venil7 35
  • [BUG] What is Channel unknown

    [BUG] What is Channel unknown

    I am using fvm to manage flutter sdk , I installed sdk 2.0.6 by fvm. And I when I run fvm releases, It's result is:

    Mar 19 21  │ 2.0.3            
    Apr 2 21   │ 2.0.4            
    Apr 15 21  │ 2.2.0-10.1.pre   
    Apr 15 21  │ 2.2.0-10.1.pre   
    Apr 16 21  │ 2.0.5            
    Apr 27 21  │ 2.3.0-0.1.pre    
    Apr 29 21  │ 2.2.0-10.2.pre   
    Apr 30 21  │ 2.0.6            
    May 10 21  │ 2.2.0-10.3.pre   
    May 10 21  │ 2.3.0-1.0.pre    
    May 18 21  │ 2.2.0            
    May 18 21  │ 2.3.0-12.1.pre   
    --------------------------------------
    May 19 21  │ 2.2.0             beta
    --------------------------------------
    --------------------------------------
    May 27 21  │ 2.2.1             stable
    --------------------------------------
    --------------------------------------
    May 28 21  │ 2.3.0-16.0.pre    dev
    --------------------------------------
    

    Which type of version is stable? for example 2.0.6

    Now when I run fvm flutter doctor I got this:

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel unknown, 2.0.6, on Linux, locale en_US.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    [✓] Chrome - develop for the web
    [!] Android Studio (not installed)
    [✓] VS Code (version 1.56.2)
    [✓] Connected device (2 available)
    

    ! Doctor found issues in 1 category. What is Channel unknown,?

    I want just install stable version.

    bug 
    opened by tazik561 34
  • [Feature Request] Use a different way to distinguish flutter version to use

    [Feature Request] Use a different way to distinguish flutter version to use

    Current way to differentiate flutter version to use is by creating a symlink in the root project directly. Unfortunately this symlink uses absolute path, and it does not make sense to commit it into git repo.

    A solution that comes to mind is like what nodenv uses. It stores the version to use in .node-version file in the root project. This file contains a version string, and contains no path. So it can be commited to git.

    The nodenv package also provides anode executable in ~/.nodenv/shims/node that then calls the requested version node binary.

    enhancement 
    opened by rchavik 24
  • Trying to Build Apk for target main[BUG]

    Trying to Build Apk for target main[BUG]

    Running on Windows Android studio 4.1

    my app has 4 mains with different environments for the backend. Problem is that I get this log: C:\Datasruvey\DataSurveyPBS_MobileAPP_v2>fvm list Versions path: C:\Users\afachini\fvm\versions stable v1.12.13+hotfix.9 ✔ 'pub' is not recognized as an internal or external command, operable program or batch file.

    C:\Datasruvey\DataSurveyPBS_MobileAPP_v2>fvm flutter build apk -t lib/main_dev.dart Could not install <v1.12.13+hotfix.9> #0 installWorkflow (package:fvm/src/workflows/install_version.workflow.dart:44:5) #1 FlutterCommand.run (package:fvm/src/commands/flutter_command.dart:30:7) #2 CommandRunner.runCommand (package:args/command_runner.dart:197:13) #3 FvmCommandRunner.run (package:fvm/src/runner.dart:60:14) #4 main (file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/fvm-1.3.8/bin/main.dart:4:3)

    'pub' is not recognized as an internal or external command, operable program or batch file.

    Can you please help me?

    bug 
    opened by AleFachini 23
  • Flutter command alias

    Flutter command alias

    Create a helper alias command to link project flutter bin to the flutter command

    fvm alias
    

    This will alias the local project bin to flutter for that terminal session.

    enhancement 
    opened by leoafarias 22
  • "fvm use" doesn't work

    Hi! First, i want say thanks for your initiative!

    So, when i try run the command "fvm use 1.10.7", i get this exception:

    PS C:\projetos\vimob\vimobpoc\app> fvm list
    1.10.14
    1.9.1
    beta
    PS C:\projetos\vimob\vimobpoc\app> fvm use 1.10.14
    Using 1.10.14...
    Unhandled exception:
    type 'List<Object>' is not a subtype of type 'String'
    #0      fvmRunner.<anonymous closure> (package:fvm/fvm.dart:39:45)
    #1      _RootZone.runBinary (dart:async/zone.dart:1384:54)
    #2      _FutureListener.handleError (dart:async/future_impl.dart:151:20)
    #3      Future._propagateToListeners.handleError (dart:async/future_impl.dart:690:47)
    #4      Future._propagateToListeners (dart:async/future_impl.dart:711:24)
    #5      Future._completeError (dart:async/future_impl.dart:530:5)
    #6      _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:36:15)
    #7      CommandRunner.runCommand (package:args/command_runner.dart)
    <asynchronous suspension>
    #8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    #9      new Future.sync (dart:async/future.dart:224:31)
    #10     CommandRunner.run (package:args/command_runner.dart:112:14)
    #11     fvmRunner (package:fvm/fvm.dart:35:23)
    <asynchronous suspension>
    #12     main (file:///C:/Users/giuliano.stravini/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/fvm-0.6.5/bin/main.dart:4:9)
    <asynchronous suspension>
    #13     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
    #14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
    Using 1.10.14...
    Unhandled exception:
    type 'List<Object>' is not a subtype of type 'String'
    #0      fvmRunner.<anonymous closure> (package:fvm/fvm.dart:39:45)
    #1      _RootZone.runBinary (dart:async/zone.dart:1384:54)
    #2      _FutureListener.handleError (dart:async/future_impl.dart:151:20)
    #3      Future._propagateToListeners.handleError (dart:async/future_impl.dart:690:47)
    #4      Future._propagateToListeners (dart:async/future_impl.dart:711:24)
    #5      Future._completeError (dart:async/future_impl.dart:530:5)
    #6      _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:36:15)
    #7      CommandRunner.runCommand (package:args/command_runner.dart)
    <asynchronous suspension>
    #8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    #9      new Future.sync (dart:async/future.dart:224:31)
    #10     CommandRunner.run (package:args/command_runner.dart:112:14)
    #11     fvmRunner (package:fvm/fvm.dart:35:23)
    <asynchronous suspension>
    #12     main (file:///C:/Users/giuliano.stravini/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/fvm-0.6.5/bin/main.dart:4:9)
    <asynchronous suspension>
    #13     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
    #14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
    

    OS: Windows 10 FVM: 0.6.5.

    ps: Any version, i get this error.

    I did something wrong? Or it's really a bug?

    bug 
    opened by Giuliano-Stravini 20
  • [BUG] Unable to `flutter <command>`

    [BUG] Unable to `flutter `

    Before creating a bug report please make check the following

    • [x] You have read our FAQ
    • [x] If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
    • [ ] If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
    • [x] Run fvm doctor if possible and add the output to the issue.

    fvm doctor:

    No FVM config found:
    /Users/brandontrautmann/src/mobile/flutter
    Fvm will run the version in your PATH env: /Users/brandontrautmann/fvm/default/bin/flutter
    
    Configured env paths:
    ___________________________________________________
    
    Flutter:
    /Users/brandontrautmann/fvm/default/bin/flutter
    
    Dart:
    /Users/brandontrautmann/fvm/default/bin/dart
    
    FVM_HOME:
    not set
    

    Describe the bug Running flutter <command> e.g flutter pub get fails with the following error:

    Downloading Material fonts...                                      727ms
    Downloading Material fonts...                                      500ms
    Failed to download https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip. Ensure you have network connectivity and then
    try again.
    Exception: Expected https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip to have md5 checksum VF/LGEVR6qaggyU/Ekykeg==,
    but was rAJgFN+kv13pjIw42PmKmQ==. This may indicate a problem with your connection to the Flutter backend servers. Please re-try the download after confirming that your network
    connection is stable.
    

    To Reproduce

    1. Install fvm 2.2.4 via:
    tap "leoafarias/fvm"
    brew "fvm"
    
    1. Attempt to flutter pub get

    Expected behavior flutter pub get should complete normally.

    Logs

    [  +86 ms] executing: sysctl hw.optional.arm64
    [  +18 ms] Exit code 1 from: sysctl hw.optional.arm64
    [   +1 ms] sysctl: unknown oid 'hw.optional.arm64'
    [   +8 ms] executing: [/Users/brandontrautmann/fvm/versions/2.5.3/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [  +10 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [        ] 18116933e77adc82f80866c928266a5b4f1ed645
    [        ] executing: [/Users/brandontrautmann/fvm/versions/2.5.3/] git tag --points-at 18116933e77adc82f80866c928266a5b4f1ed645
    [  +20 ms] Exit code 0 from: git tag --points-at 18116933e77adc82f80866c928266a5b4f1ed645
    [        ] 2.5.3
    [  +12 ms] executing: [/Users/brandontrautmann/fvm/versions/2.5.3/] git rev-parse --abbrev-ref --symbolic @{u}
    [  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [        ] origin/stable
    [        ] executing: [/Users/brandontrautmann/fvm/versions/2.5.3/] git ls-remote --get-url origin
    [   +9 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] https://github.com/flutter/flutter.git
    [ +118 ms] executing: [/Users/brandontrautmann/fvm/versions/2.5.3/] git rev-parse --abbrev-ref HEAD
    [  +13 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [        ] stable
    [   +6 ms] executing: sw_vers -productName
    [  +17 ms] Exit code 0 from: sw_vers -productName
    [        ] macOS
    [        ] executing: sw_vers -productVersion
    [  +17 ms] Exit code 0 from: sw_vers -productVersion
    [        ] 11.6
    [        ] executing: sw_vers -buildVersion
    [  +17 ms] Exit code 0 from: sw_vers -buildVersion
    [        ] 20G165
    [  +67 ms] Downloading Material fonts...
    [ +441 ms] Content https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip md5 hash: VF/LGEVR6qaggyU/Ekykeg==
    [ +177 ms] Exception: Expected https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip to have md5 checksum
    VF/LGEVR6qaggyU/Ekykeg==, but was rAJgFN+kv13pjIw42PmKmQ==. This may indicate a problem with your connection to the Flutter backend servers. Please re-try the download after confirming
    that your network connection is stable.
    [  +14 ms] Downloading Material fonts... (completed in 622ms)
    [        ] Downloading Material fonts...
    [ +293 ms] Content https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip md5 hash: VF/LGEVR6qaggyU/Ekykeg==
    [ +142 ms] Exception: Expected https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip to have md5 checksum
    VF/LGEVR6qaggyU/Ekykeg==, but was rAJgFN+kv13pjIw42PmKmQ==. This may indicate a problem with your connection to the Flutter backend servers. Please re-try the download after confirming
    that your network connection is stable.
    [   +1 ms] Downloading Material fonts... (completed in 437ms)
    [        ] "flutter get" took 1,107ms.
    [  +17 ms] Failed to download https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip. Ensure you have network connectivity
    and then
               try again.
               Exception: Expected https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip to have md5 checksum
    VF/LGEVR6qaggyU/Ekykeg==,
               but was rAJgFN+kv13pjIw42PmKmQ==. This may indicate a problem with your connection to the Flutter backend servers. Please re-try the download after confirming that your
    network
               connection is stable.
    [   +3 ms] 
               #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
               #1      ArtifactUpdater._downloadArchive (package:flutter_tools/src/cache.dart:931:11)
               <asynchronous suspension>
               #2      CachedArtifact.update (package:flutter_tools/src/cache.dart:688:5)
               <asynchronous suspension>
               #3      Cache.updateAll (package:flutter_tools/src/cache.dart:557:9)
               <asynchronous suspension>
               #4      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1227:7)
               <asynchronous suspension>
               #5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
               <asynchronous suspension>
               #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #7      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
               <asynchronous suspension>
               #8      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
               <asynchronous suspension>
               #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
               <asynchronous suspension>
               #11     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
               <asynchronous suspension>
               #12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #13     main (package:flutter_tools/executable.dart:92:3)
               <asynchronous suspension>
    

    Desktop (please complete the following information):

    • OS: MacOS 11.6
    • FVM Version: 2.2.4

    Additional context

    • To attempt to isolate this issue to fvm, I pulled down the latest stable flutter SDK and executed pub get doing ~/path/to/flutter/sdk/bin/flutter pub get on the same project. This completed successfully.
    • Additionally, I'm able to curl the URL in the error output just fine:

    curl -I https://storage.googleapis.com/flutter_infra_release/flutter/fonts/bd151aa3c2f7231344411a01dba4ef61b3cd56b2/fonts.zip:

    HTTP/1.1 200 OK
    X-GUploader-UploadID: ADPycdtp_XeV9hDpLGvUkNoRwSnZcaDzteO7qg9M2vyILJY9cdWJseO5R1rABZc8GoBvmMVKCuIDIKGGQzmsyX6lgiY
    Expires: Fri, 12 Nov 2021 17:51:02 GMT
    Date: Fri, 12 Nov 2021 16:51:02 GMT
    Last-Modified: Tue, 16 Mar 2021 10:09:53 GMT
    ETag: "545fcb184551eaa6a083253f124ca47a"
    x-goog-generation: 1615889393432810
    x-goog-metageneration: 1
    x-goog-stored-content-encoding: identity
    x-goog-stored-content-length: 2197282
    Content-Type: application/octet-stream
    x-goog-hash: crc32c=D0+64g==
    x-goog-hash: md5=VF/LGEVR6qaggyU/Ekykeg==
    x-goog-storage-class: STANDARD
    Accept-Ranges: bytes
    Content-Length: 2197282
    Access-Control-Allow-Origin: *
    Access-Control-Expose-Headers: Content-Type
    Server: UploadServer
    Age: 3517
    Cache-Control: public, max-age=3600
    Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
    
    bug 
    opened by btrautmann 18
  • [BUG] Cannot use melos to execute fvm command concurrently

    [BUG] Cannot use melos to execute fvm command concurrently

    Before creating a bug report please make check the following

    • [x] You have read our FAQ
    • [x] If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
    • [x] If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
    • [x] Run fvm doctor if possible and add the output to the issue.

    Describe the bug

    Cannot use melos to execute fvm command concurrently.

    To Reproduce Steps to reproduce the behavior:

    1. Go to terminal, cd to a mono repo with multiple packages (e.g. melos repo)
    2. Run melos exec -- exec fvm flutter
    3. Check output
    4. See error
    [app]:
    [app]: Could not install 2.0.6
    [app]:
    [app]: #0      ensureCacheWorkflow (package:fvm/src/workflows/ensure_cache.workflow.dart:61:5)
    [app]: <asynchronous suspension>
    [app]: #1      FlutterCommand.run (package:fvm/src/commands/flutter_command.dart:30:28)
    [app]: <asynchronous suspension>
    [app]: #2      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
    [app]: <asynchronous suspension>
    [app]: #3      FvmCommandRunner.run (package:fvm/src/runner.dart:73:24)
    [app]: <asynchronous suspension>
    [app]: #4      main (file:///Users/mao/.pub-cache/hosted/pub.dartlang.org/fvm-2.0.4/bin/main.dart:6:8)
    [app]: <asynchronous suspension>
    [app]:
    [app]:
    

    Expected behavior

    No error occurs.

    Logs Please provide the verbose logs by running --verbose after the command.

    Desktop (please complete the following information):

    • OS: [e.g. iOS]
    • FVM Version [e.g. 22] 2.0.4
    • If Windows: Which Powershell are you using?

    Additional context

    I have tried the same command with fvm 2.0.1 and there is no problem.

    bug 
    opened by lcdsmao 18
  • [BUG] CI unable to resolve flutter command after successful fvm install

    [BUG] CI unable to resolve flutter command after successful fvm install

    Before creating a bug report please make check the following

    Describe the bug

    fvm works in interactive shell but fails to find flutter command internally when running on CI

    To Reproduce Steps to reproduce the behavior:

    1. Start a CI job on Gitlab and include the following
    install_flutter:
      stage: pre-build
      script:
        - export PATH="$PATH":"$HOME/.pub-cache/bin"
        - fvm --verbose install 1.20.4
      tags:
        - macos
    
    1. This fails on the CI with this error:
    22Version: 1.20.4 - already installed.
    23Internal Error: Could not finish setting up Flutter sdk
    24#0      flutterSetupWorkflow (package:fvm/src/workflows/flutter_setup.workflow.dart:9:5)
    25<asynchronous suspension>
    26#1      InstallCommand.run (package:fvm/src/commands/install_command.dart:49:13)
    27<asynchronous suspension>
    28#2      CommandRunner.runCommand (package:args/command_runner.dart:197:27)
    29#3      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    30#4      new Future.sync (dart:async/future.dart:223:31)
    31#5      CommandRunner.run (package:args/command_runner.dart:112:14)
    32#6      fvmRunner (package:fvm/src/runner.dart:34:23)
    33#7      main (file:///Users/build/.pub-cache/hosted/pub.dartlang.org/fvm-1.3.0/bin/main.dart:4:9)
    34#8      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    35#9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    36Unhandled exception:
    37Internal Error: Could not finish setting up Flutter sdk
    38#0      flutterSetupWorkflow (package:fvm/src/workflows/flutter_setup.workflow.dart:9:5)
    39<asynchronous suspension>
    40#1      InstallCommand.run (package:fvm/src/commands/install_command.dart:49:13)
    41<asynchronous suspension>
    42#2      CommandRunner.runCommand (package:args/command_runner.dart:197:27)
    43#3      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    44#4      new Future.sync (dart:async/future.dart:223:31)
    45#5      CommandRunner.run (package:args/command_runner.dart:112:14)
    46#6      fvmRunner (package:fvm/src/runner.dart:34:23)
    47#7      main (file:///Users/build/.pub-cache/hosted/pub.dartlang.org/fvm-1.3.0/bin/main.dart:4:9)
    48#8      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    49#9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    

    Expected behavior Should behave like in interactive session:

    % fvm install 1.20.4
    Version: 1.20.4 - already installed.
    Flutter 1.20.4 • channel unknown • unknown source
    Framework • revision fba99f6cf9 (3 weeks ago) • 2020-09-14 15:32:52 -0700
    Engine • revision d1bc06f032
    Tools • Dart 2.9.2
    

    Desktop (please complete the following information):

    • OS: [MacOS ]
    • FVM Version [1.3.0] via Homebrew Additional context Add any other context about the problem here.
    bug 
    opened by ened 18
  • Guide on proper setup on Windows

    Guide on proper setup on Windows

    i've just started trying out fvm i followed how to install fvm using the pub global command and i installed it properly but cant do fvm install <version> please what am i doing wrong ..\Pub\Cache\bin is in my environment path image when i run that command, its just creating an empty folder which shows when i run the commands image

    opened by DonnC 18
  • [Feature Request] Respect XDG Directory specification

    [Feature Request] Respect XDG Directory specification

    Hey, been using fvm for a while, it has been a blast. I think it would be very beneficial to move the cache and config files to respect the XDG Base Directory specification. Read more here

    With that said, I have tried to use the already supported --config flag to move the cache into another folder. While it works, when I'm trying to use fvm global stable or any other version - it resets my config into the default cache folder. Because of that reason, Flutter path is moving all the time.

    enhancement 
    opened by realitymolder 3
  • Automatic dependencies upgrade

    Automatic dependencies upgrade

    Currently we have to ask @leoafarias to bump dependencies every time the Dart SDK is upgraded. Like this topic https://github.com/fluttertools/fvm/issues/474 Consider automation of this process, so fvm utility will check the latest Dart SDK on startup and upgrade itself.

    enhancement 
    opened by subzero911 2
  • [BUG] jenkins detects succsessful fvm build not as succsessful

    [BUG] jenkins detects succsessful fvm build not as succsessful

    Hi,

    I try to include a flutter fvm build in jenkins. The build works. But jenkins does check the environment variable %ERRORLEVEL% after the build. Aparrentely it is not zero despite the succsessful build. So the jenkins build fails. Could you please check the return values of fvm and set it to something jenkins interpretes ans good if the build is succsessful?

    bug 
    opened by Wissperwind 1
  • [BUG] Cannot install fvm with Xcode 13.4.1

    [BUG] Cannot install fvm with Xcode 13.4.1

    Before creating a bug report please make check the following

    • [X] You have read our FAQ
    • [X] If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
    • [X] If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
    • [X] Run fvm doctor if possible and add the output to the issue.

    Describe the bug Cannot install fvm with latest Xcode 13.4.1.

    To Reproduce Steps to reproduce the behavior:

    1. Go to terminal on Mac with Xcode 13.4.1
    2. Run
    brew tap leoafarias/fvm
    brew install fvm
    
    1. Check...
    2. See error that fvm cannot be installed with Xcode 13.4.1 with error that Xcode 13.4 should be installed.

    Expected behavior fvm should be installed without errors

    Logs brew tap leoafarias/fvm brew install fvm ==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/rele Already downloaded: /Users/eugene/Library/Caches/Homebrew/downloads/d5832359626d14f45648e5ed48a204756f83c64d6c229cd2bdd72cee0da08ff2--dartsdk-macos-x64-release.zip ==> Downloading https://github.com/fluttertools/fvm/archive/2.4.1.tar.gz Already downloaded: /Users/eugene/Library/Caches/Homebrew/downloads/54b77538c3b1241d7203cf322d4c29f344917cfacab6f1f19203cff6dc2390e4--fvm-2.4.1.tar.gz ==> Installing fvm from leoafarias/fvm Error: Your Command Line Tools are too outdated. Update them from Software Update in System Preferences or run: softwareupdate --all --install --force

    If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install

    Alternatively, manually download them from: https://developer.apple.com/download/all/. You should download the Command Line Tools for Xcode 13.4.

    eugene ~ % xcodebuild -version Xcode 13.4.1 Build version 13F100

    Additional context Add any other context about the problem here.

    bug 
    opened by EugeneIOs 2
Releases(2.4.1)
Owner
Leo Farias
Leo Farias
A CLI for syncing Dart dependency versions between pubspec.yaml and pubspec.lock files.

lockpick A CLI for syncing Dart dependency versions between pubspec.yaml and pubspec.lock files. ?? Usage # Activate lockpick pub global activate lock

Jeroen Meijer (Jay) 34 Oct 17, 2022
The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. There is no way to get the package version from the code in the Dart ecosystem. Installation Add bu

Daichi Furiya 12 Dec 14, 2022
CLI utility to manage MC Server installations

CLI utility to manage MC server installations. Features Install required JDKs Download server files Generate start scripts (with optimized JVM flags)

Michael Rittmeister 14 Nov 18, 2022
A simple shortcut, command line interface (CLI) for a lazy (a.k.a effective) Flutter developer in order to increase productivity and happiness.

f A simple shortcut, command line interface (CLI) for a lazy (a.k.a effective) Flutter developer in order to increase productivity and happiness. Inst

Salman S 27 Nov 22, 2022
Simple CLI tool to produce icons for your next app.

icon_set_generator Simple CLI tool to enable easy production of icon sets for your next application. Installation Clone the repo and add bin/icon_set_

Diego Domínguez Melo 1 Nov 17, 2021
Converts SVG icons to OTF font and generates Flutter-compatible class. Provides an API and a CLI tool.

Fontify The Fontify package provides an easy way to convert SVG icons to OpenType font and generate Flutter-compatible class that contains identifiers

Igor Kharakhordin 88 Oct 28, 2022
A cli tool to run Flutter applications and auto hot reload it when files are changed

Dashmon A minimalistic CLI tool to run Flutter applications and auto hot reload it when files are changed. It will watch changes your application code

Erick 31 Oct 6, 2022
A CLI tool to help generate dart classes from json returned from API

Json 2 Dart Command line utility Important note There is already a package called json2dart so this package will be called json2dartc ! This project w

Adib Mohsin 38 Oct 5, 2022
Command-line Interface (CLI) for any_icon_maker.

makeanyicon Command-line Interface (CLI) for any_icon_maker. makeanyicon Quick Start Installation Usage License Quick Start Installation dart pub glob

MakeAnyIcon 6 Nov 4, 2022
A CLI tool to help batch renaming files.

batch_rename A CLI tool to enable batch renaming of files. Installation Clone the repo and add bin/batch_rename.exe to PATH: gh repo clone POWRFULCOW8

Diego Domínguez Melo 0 Nov 3, 2021
Official CLI for the GetX framework

Official CLI for the GetX framework

Shahanul Haque Shawon 0 Nov 23, 2021
🔍 👀 CLI utility to check last-visit of your CodeForces friends & much more, 🚀 powered by CodeForces API

JoJo ?? ?? CLI utility to check last-visit of your CodeForces friends & much more, ?? powered by CodeForces API Features Online Friends All Friends Pr

Tirth 5 Jul 20, 2020
Okan YILDIRIM 37 Jul 10, 2022
Dart language version of Persian-Tools

Persian tools Persian Tools dart package which you can use in all platforms Features Adding ordinal suffixes Converting Persian words to number Conver

Persian Tools 54 Dec 29, 2022
Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs that execute with unsound null safety.

null_safety_percentage Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs

dartside.dev 8 Mar 27, 2022
An extension to the Flutter SDK for building Flutter applications for Tizen devices.

Flutter for Tizen An extension to the Flutter SDK for building Flutter applications for Tizen devices. Flutter and the related logo are trademarks of

null 356 Dec 16, 2022
Sentry SDK for Dart and Flutter

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoy

Sentry 606 Dec 31, 2022
Reference implementation for the Zenon SDK for Dart and Flutter apps compatible

Zenon Dart SDK Reference implementation for the Zenon SDK for Dart and Flutter apps compatible with the Zenon Alphanet - Network of Momentum Phase 0.

null 8 Nov 23, 2022
A tool to easily install the Android SDK command-line and platform tools.

gibadb A tool to easily install the Android SDK command-line and platform tools. For developers: This README describes the CLI tool that ships with th

null 3 Sep 22, 2022