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

[BUG] Cannot use melos to execute fvm command concurrently #296

Closed
4 tasks done
lcdsmao opened this issue May 19, 2021 · 18 comments
Closed
4 tasks done

[BUG] Cannot use melos to execute fvm command concurrently #296

lcdsmao opened this issue May 19, 2021 · 18 comments
Labels
bug Something isn't working

Comments

@lcdsmao
Copy link

lcdsmao commented May 19, 2021

Before creating a bug report please make check the following

  • You have read our FAQ
  • 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.
  • 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.

@lcdsmao lcdsmao added the bug Something isn't working label May 19, 2021
@lcdsmao lcdsmao changed the title [BUG] [BUG] Cannot use fvm 2.0.4 with melos when executing fvm command concurrently. May 19, 2021
@lcdsmao lcdsmao changed the title [BUG] Cannot use fvm 2.0.4 with melos when executing fvm command concurrently. [BUG] Cannot use fvm 2.0.4 with melos when executing fvm command concurrently May 19, 2021
@lcdsmao lcdsmao changed the title [BUG] Cannot use fvm 2.0.4 with melos when executing fvm command concurrently [BUG] Cannot use melos to execute fvm command concurrently. May 19, 2021
@lcdsmao lcdsmao changed the title [BUG] Cannot use melos to execute fvm command concurrently. [BUG] Cannot use melos to execute fvm command concurrently May 19, 2021
@leoafarias
Copy link
Owner

leoafarias commented May 19, 2021

@lcdsmao I believe this has been solved on version 2.0.4 of FVM, and its a duplicate of this #285

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

Hi @leoafarias!
The fix of #285 has been released with fvm 2.0.3.
Currently, I am using fvm 2.0.4 and still have the error.
Maybe this problem is different with #285?

@leoafarias
Copy link
Owner

@lcdsmao Can you run fvm flutter --verbose where the fvm config is?

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

$fvm flutter --verbose

Manage your Flutter app development.

Common commands:

  flutter create <output directory>
    Create a new Flutter project in the specified directory.

  flutter run [options]
    Run your Flutter application on an attached device or in an emulator.

Usage: flutter <command> [arguments]

Global options:
-h, --help                      Print this usage information.
-v, --verbose                   Noisy logging, including all shell commands executed.
                                If used with --help, shows hidden options.
    --quiet                     Reduce the amount of output from some commands.
    --[no-]wrap                 Toggles output word wrapping, regardless of whether or not the output is a terminal.
                                (defaults to on)
    --wrap-column               Sets the output wrap column. If not set, uses the width of the terminal. No wrapping occurs if not writing to a terminal. Use --no-wrap to turn off wrapping when connected to a terminal.
-d, --device-id                 Target device id or name (prefixes allowed).
    --version                   Reports the version of this tool.
    --machine                   When used with the --version flag, outputs the information using JSON.
    --[no-]color                Whether to use terminal colors (requires support for ANSI escape sequences).
                                (defaults to on)
    --[no-]version-check        Allow Flutter to check for updates when this command runs.
                                (defaults to on)
    --suppress-analytics        Suppress analytics reporting when this command runs.
    --packages                  Path to your "package_config.json" file.

Local build selection options (not normally required):
    --local-engine-src-path     Path to your engine src directory, if you are building Flutter locally.
                                Defaults to $FLUTTER_ENGINE if set, otherwise defaults to the path given in your pubspec.yaml dependency_overrides for sky_engine, if any.
    --local-engine              Name of a build output within the engine out directory, if you are building Flutter locally.
                                Use this to select a specific version of the engine if you have built multiple engine targets.
                                This path is relative to --local-engine-src-path/out.

Options for testing the "flutter" tool itself:
    --show-test-device          List the special 'flutter-tester' device in device listings. This headless device is used to
                                test Flutter tooling.
    --show-web-server-device    List the special 'web-server' device in device listings. 

Available commands:
  analyze           Analyze the project's Dart code.
  assemble          Assemble and build Flutter resources.
  attach            Attach to a running app.
  bash-completion   Output command line shell completion setup scripts.
  build             Build an executable app or install bundle.
  channel           List or switch Flutter channels.
  clean             Delete the build/ and .dart_tool/ directories.
  config            Configure Flutter settings.
  create            Create a new Flutter project.
  daemon            Run a persistent, JSON-RPC based server to communicate with devices.
  devices           List all connected devices.
  doctor            Show information about the installed tooling.
  downgrade         Downgrade Flutter to the last active version for the current channel.
  drive             Run integration tests for the project on an attached device or emulator.
  emulators         List, launch and create emulators.
  format            Format one or more Dart files.
  gen-l10n          Generate localizations for the current project.
  install           Install a Flutter app on an attached device.
  logs              Show log output for running Flutter apps.
  precache          Populate the Flutter tool's cache of binary artifacts.
  pub               Commands for managing Flutter packages.
  run               Run your Flutter app on an attached device.
  screenshot        Take a screenshot from a connected device.
  symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
  test              Run Flutter unit tests for the current project.
  upgrade           Upgrade your copy of Flutter.

Run "flutter help <command>" for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used options.

@leoafarias
Copy link
Owner

@lcdsmao thanks, can you also run melos exec -- exec fvm install --verbose?

Also, what are you trying to do with melos exec -- exec fvm flutter?

I am creating a melos sample env.

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

❯ melos exec -- exec fvm install --verbose
$ melos exec
   └> exec fvm install --verbose
       └> RUNNING (in 4 packages)

----------------------------------------------------------------------------------------------------------------------------------------
[catalog_app]: [     0.332s] Version: 2.0.6 - already installed.
[fake_gen_annotation]: [     0.326s] Version: 2.0.6 - already installed.
[app]: [     0.347s] Version: 2.0.6 - already installed.
[fake_gen]: [     0.334s] Version: 2.0.6 - already installed.
[fake_gen_annotation]: Waiting for another flutter command to release the startup lock...
[fake_gen]: Waiting for another flutter command to release the startup lock...
[app]: Waiting for another flutter command to release the startup lock...
[catalog_app]: Flutter 2.0.6 • channel unknown • unknown source
[catalog_app]: Framework • revision 1d9032c7e1 (3 weeks ago) • 2021-04-29 17:37:58 -0700
[catalog_app]: Engine • revision 05e680e202
[catalog_app]: Tools • Dart 2.12.3
[fake_gen_annotation]: Flutter 2.0.6 • channel unknown • unknown source
[fake_gen_annotation]: Framework • revision 1d9032c7e1 (3 weeks ago) • 2021-04-29 17:37:58 -0700
[fake_gen_annotation]: Engine • revision 05e680e202
[fake_gen_annotation]: Tools • Dart 2.12.3
[app]: Flutter 2.0.6 • channel unknown • unknown source
[app]: Framework • revision 1d9032c7e1 (3 weeks ago) • 2021-04-29 17:37:58 -0700
[app]: Engine • revision 05e680e202
[app]: Tools • Dart 2.12.3
[fake_gen]: Flutter 2.0.6 • channel unknown • unknown source
[fake_gen]: Framework • revision 1d9032c7e1 (3 weeks ago) • 2021-04-29 17:37:58 -0700
[fake_gen]: Engine • revision 05e680e202
[fake_gen]: Tools • Dart 2.12.3
----------------------------------------------------------------------------------------------------------------------------------------

$ melos exec
   └> exec fvm install --verbose
       └> SUCCESS

When running melos exec -- exec fvm install --verbose, it can randomly fail with the error I posted.

what are you trying to do with melos exec -- exec fvm flutter

Like fvm flutter pub get, fvm flutter gen-l10n, et al.

Executing melos exec -- exec fvm flutter can also randomly fail.

@leoafarias
Copy link
Owner

@lcdsmao I am not being able to replicate the problem in my test melos environment.

I have setup the .fvm config within the root of the melos workspace, in packages folder and in the package itself.

Any other information you can think of that you can provide?

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

I am trying to create a repo to reproduce this problem.

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

Hi @leoafarias
I created a project which can reproduce this problem.
https://github.com/lcdsmao/bug-melos-fvm
Could you try it?

@leoafarias
Copy link
Owner

@lcdsmao just tried and it seems to be working...

can you run the following command and give the output?

melos exec -- exec fvm doctor

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

Weird. I cannot reproduce it now...😅
But this error actually has occurred in our CI.
I will try this again tomorrow.
If there is any further information, I will comment on this issue.
Thank you!

fvm 2.0.1:

❯ melos exec -- exec fvm doctor

$ melos exec
   └> exec fvm doctor
       └> RUNNING (in 4 packages)

---------------------------------------------------------------------------------------------------------------------------------------
[pkg1]:
[pkg1]: FVM config found:
[pkg1]: ___________________________________________________
[pkg1]:
[pkg1]: Project: melos_fvm
[pkg1]: Directory: /Users/mao/git/melos_fvm
[pkg1]: Version: 2.0.6
[pkg1]: Project Flavor: None selected
[pkg1]: ___________________________________________________
[pkg1]:
[pkg1]: Version is currently cached locally.
[pkg1]:
[pkg1]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg1]: Channel: false
[pkg1]: SDK Version: 2.0.6
[pkg1]:
[pkg1]: IDE Links
[pkg1]: VSCode: .fvm/flutter_sdk
[pkg1]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg1]:
[pkg1]:
[pkg1]: Configured env paths:
[pkg1]: ___________________________________________________
[pkg1]:
[pkg1]: Flutter:
[pkg1]: /Users/mao/flutter/bin/flutter
[pkg1]:
[pkg1]: Dart:
[pkg1]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg1]:
[pkg3]:
[pkg2]:
[pkg3]: FVM config found:
[pkg3]: ___________________________________________________
[pkg3]:
[pkg3]: Project: melos_fvm
[pkg3]: Directory: /Users/mao/git/melos_fvm
[pkg3]: Version: 2.0.6
[pkg3]: Project Flavor: None selected
[pkg3]: ___________________________________________________
[pkg3]:
[pkg3]: Version is currently cached locally.
[pkg3]:
[pkg3]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg3]: Channel: false
[pkg2]: FVM config found:
[pkg2]: ___________________________________________________
[pkg2]:
[pkg2]: Project: melos_fvm
[pkg2]: Directory: /Users/mao/git/melos_fvm
[pkg2]: Version: 2.0.6
[pkg2]: Project Flavor: None selected
[pkg2]: ___________________________________________________
[pkg2]:
[pkg2]: Version is currently cached locally.
[pkg2]:
[pkg2]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg2]: Channel: false
[pkg4]:
[pkg4]: FVM config found:
[pkg4]: ___________________________________________________
[pkg4]:
[pkg4]: Project: melos_fvm
[pkg4]: Directory: /Users/mao/git/melos_fvm
[pkg4]: Version: 2.0.6
[pkg4]: Project Flavor: None selected
[pkg4]: ___________________________________________________
[pkg4]:
[pkg4]: Version is currently cached locally.
[pkg4]:
[pkg4]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg4]: Channel: false
[pkg2]: SDK Version: 2.0.6
[pkg2]:
[pkg2]: IDE Links
[pkg2]: VSCode: .fvm/flutter_sdk
[pkg3]: SDK Version: 2.0.6
[pkg3]:
[pkg3]: IDE Links
[pkg3]: VSCode: .fvm/flutter_sdk
[pkg4]: SDK Version: 2.0.6
[pkg4]:
[pkg4]: IDE Links
[pkg4]: VSCode: .fvm/flutter_sdk
[pkg2]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg2]:
[pkg2]:
[pkg2]: Configured env paths:
[pkg2]: ___________________________________________________
[pkg2]:
[pkg2]: Flutter:
[pkg2]: /Users/mao/flutter/bin/flutter
[pkg2]:
[pkg2]: Dart:
[pkg2]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg2]:
[pkg4]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg4]:
[pkg4]:
[pkg4]: Configured env paths:
[pkg4]: ___________________________________________________
[pkg4]:
[pkg4]: Flutter:
[pkg4]: /Users/mao/flutter/bin/flutter
[pkg4]:
[pkg4]: Dart:
[pkg4]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg4]:
[pkg3]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg3]:
[pkg3]:
[pkg3]: Configured env paths:
[pkg3]: ___________________________________________________
[pkg3]:
[pkg3]: Flutter:
[pkg3]: /Users/mao/flutter/bin/flutter
[pkg3]:
[pkg3]: Dart:
[pkg3]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg3]:
---------------------------------------------------------------------------------------------------------------------------------------

$ melos exec
   └> exec fvm doctor
       └> SUCCESS

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

#296 (comment)
Sorry, I tried with fvm 2.0.1 so there is no problem.😅

Here is fvm 2.0.4 log

❯ melos exec -- exec fvm doctor

$ melos exec
   └> exec fvm doctor
       └> RUNNING (in 4 packages)

--------------------------------------------------------------------------------
[pkg1]: 
[pkg1]: FVM config found:
[pkg1]: ___________________________________________________
[pkg1]: 
[pkg1]: Project: melos_fvm
[pkg1]: Directory: /Users/mao/git/melos_fvm
[pkg1]: Version: 2.0.6
[pkg1]: Project Flavor: None selected
[pkg1]: ___________________________________________________
[pkg1]: 
[pkg1]: Version is currently cached locally.
[pkg1]: 
[pkg1]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg1]: Channel: false
[pkg1]: SDK Version: 2.0.6
[pkg1]: 
[pkg1]: IDE Links
[pkg1]: VSCode: .fvm/flutter_sdk
[pkg1]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg1]: 
[pkg1]: 
[pkg1]: Configured env paths:
[pkg1]: ___________________________________________________
[pkg1]: 
[pkg1]: Flutter:
[pkg1]: /Users/mao/flutter/bin/flutter
[pkg1]: 
[pkg1]: Dart:
[pkg1]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg1]: 
[pkg2]: 
[pkg2]: FVM config found:
[pkg2]: ___________________________________________________
[pkg2]: 
[pkg2]: Project: melos_fvm
[pkg2]: Directory: /Users/mao/git/melos_fvm
[pkg2]: Version: 2.0.6
[pkg2]: Project Flavor: None selected
[pkg2]: ___________________________________________________
[pkg2]: 
[pkg2]: Version is currently cached locally.
[pkg2]: 
[pkg2]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg2]: Channel: false
[pkg3]: 
[pkg2]: SDK Version: 2.0.6
[pkg2]: 
[pkg2]: IDE Links
[pkg2]: VSCode: .fvm/flutter_sdk
[pkg2]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg2]: 
[pkg2]: 
[pkg2]: Configured env paths:
[pkg2]: ___________________________________________________
[pkg2]: 
[pkg2]: Flutter:
[pkg2]: /Users/mao/flutter/bin/flutter
[pkg2]: 
[pkg2]: Dart:
[pkg2]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg2]: 
[pkg4]: 
[pkg3]: FVM config found:
[pkg3]: ___________________________________________________
[pkg3]: 
[pkg3]: Project: melos_fvm
[pkg3]: Directory: /Users/mao/git/melos_fvm
[pkg3]: Version: 2.0.6
[pkg3]: Project Flavor: None selected
[pkg3]: ___________________________________________________
[pkg3]: 
[pkg3]: Version is currently cached locally.
[pkg3]: 
[pkg3]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg3]: Channel: false
[pkg3]: SDK Version: 2.0.6
[pkg3]: 
[pkg3]: IDE Links
[pkg3]: VSCode: .fvm/flutter_sdk
[pkg4]: FVM config found:
[pkg4]: ___________________________________________________
[pkg4]: 
[pkg4]: Project: melos_fvm
[pkg4]: Directory: /Users/mao/git/melos_fvm
[pkg4]: Version: 2.0.6
[pkg3]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg3]: 
[pkg3]: 
[pkg3]: Configured env paths:
[pkg3]: ___________________________________________________
[pkg3]: 
[pkg3]: Flutter:
[pkg3]: /Users/mao/flutter/bin/flutter
[pkg3]: 
[pkg3]: Dart:
[pkg3]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg3]: 
[pkg4]: Project Flavor: None selected
[pkg4]: ___________________________________________________
[pkg4]: 
[pkg4]: Version is currently cached locally.
[pkg4]: 
[pkg4]: Cache Path: /Users/mao/fvm/versions/2.0.6
[pkg4]: Channel: false
[pkg4]: SDK Version: 2.0.6
[pkg4]: 
[pkg4]: IDE Links
[pkg4]: VSCode: .fvm/flutter_sdk
[pkg4]: Android Studio: /Users/mao/git/melos_fvm/.fvm/flutter_sdk
[pkg4]: 
[pkg4]: 
[pkg4]: Configured env paths:
[pkg4]: ___________________________________________________
[pkg4]: 
[pkg4]: Flutter:
[pkg4]: /Users/mao/flutter/bin/flutter
[pkg4]: 
[pkg4]: Dart:
[pkg4]: /usr/local/Cellar/dart/2.12.4/libexec/bin/dart
[pkg4]: 
--------------------------------------------------------------------------------

$ melos exec
   └> exec fvm doctor
       └> SUCCESS

@leoafarias
Copy link
Owner

@lcdsmao Everything seems good. Can you try one more command, and sorry for the back and forth.

melos exec -- exec fvm --verbose flutter

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

Seems we got some new information!

❯ melos exec -- exec fvm --verbose flutter
$ melos exec
   └> exec fvm --verbose flutter
       └> RUNNING (in 4 packages)

---------------------------------------------------------------------------------------------------------------------------------------
[pkg4]: [     0.478s] Version: 2.0.6 - already installed.
[pkg3]: [     0.480s] Version: 2.0.6 - already installed.
[pkg3]: [     0.490s] Cannot delete link
[pkg3]: [     0.491s] FileSystemException: Cannot delete link, path = '/Users/mao/git/melos_fvm/.fvm/flutter_sdk' (OS Error: No such file or directory, errno = 2)
[pkg3]:
[pkg4]: [     0.489s] fvm: running version "2.0.6"
[pkg4]:
[pkg2]: [     0.485s] Version: 2.0.6 - already installed.
[pkg3]: Could not install 2.0.6
[pkg3]:
[pkg3]: #0      ensureCacheWorkflow (package:fvm/src/workflows/ensure_cache.workflow.dart:61:5)
[pkg3]: <asynchronous suspension>
[pkg3]: #1      FlutterCommand.run (package:fvm/src/commands/flutter_command.dart:30:28)
[pkg3]: <asynchronous suspension>
[pkg3]: #2      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
[pkg3]: <asynchronous suspension>
[pkg3]: #3      FvmCommandRunner.run (package:fvm/src/runner.dart:73:24)
[pkg3]: <asynchronous suspension>
[pkg3]: #4      main (file:///Users/mao/.pub-cache/hosted/pub.dartlang.org/fvm-2.0.4/bin/main.dart:6:8)
[pkg3]: <asynchronous suspension>
[pkg3]:
[pkg3]:
[pkg2]: [     0.497s] fvm: running version "2.0.6"
[pkg2]:
[pkg1]: [     0.522s] Version: 2.0.6 - already installed.
[pkg1]: [     0.535s] fvm: running version "2.0.6"
[pkg1]:
[pkg2]: Waiting for another flutter command to release the startup lock...
[pkg1]: Waiting for another flutter command to release the startup lock...
[pkg4]: Manage your Flutter app development.
[pkg4]:
[pkg4]: Common commands:
[pkg4]:
[pkg4]:   flutter create <output directory>
[pkg4]:     Create a new Flutter project in the specified directory.
[pkg4]:
[pkg4]:   flutter run [options]
[pkg4]:     Run your Flutter application on an attached device or in an emulator.
[pkg4]:
[pkg4]: Usage: flutter <command> [arguments]
[pkg4]:
[pkg4]: Global options:
[pkg4]: -h, --help                  Print this usage information.
[pkg4]: -v, --verbose               Noisy logging, including all shell commands executed.
[pkg4]:                             If used with --help, shows hidden options.
[pkg4]: -d, --device-id             Target device id or name (prefixes allowed).
[pkg4]:     --version               Reports the version of this tool.
[pkg4]:     --suppress-analytics    Suppress analytics reporting when this command runs.
[pkg4]:
[pkg4]: Available commands:
[pkg4]:   analyze           Analyze the project's Dart code.
[pkg4]:   assemble          Assemble and build Flutter resources.
[pkg4]:   attach            Attach to a running app.
[pkg4]:   bash-completion   Output command line shell completion setup scripts.
[pkg4]:   build             Build an executable app or install bundle.
[pkg4]:   channel           List or switch Flutter channels.
[pkg4]:   clean             Delete the build/ and .dart_tool/ directories.
[pkg4]:   config            Configure Flutter settings.
[pkg4]:   create            Create a new Flutter project.
[pkg4]:   devices           List all connected devices.
[pkg4]:   doctor            Show information about the installed tooling.
[pkg4]:   downgrade         Downgrade Flutter to the last active version for the current channel.
[pkg4]:   drive             Run integration tests for the project on an attached device or emulator.
[pkg4]:   emulators         List, launch and create emulators.
[pkg4]:   format            Format one or more Dart files.
[pkg4]:   gen-l10n          Generate localizations for the current project.
[pkg4]:   install           Install a Flutter app on an attached device.
[pkg4]:   logs              Show log output for running Flutter apps.
[pkg4]:   precache          Populate the Flutter tool's cache of binary artifacts.
[pkg4]:   pub               Commands for managing Flutter packages.
[pkg4]:   run               Run your Flutter app on an attached device.
[pkg4]:   screenshot        Take a screenshot from a connected device.
[pkg4]:   symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
[pkg4]:   test              Run Flutter unit tests for the current project.
[pkg4]:   upgrade           Upgrade your copy of Flutter.
[pkg4]:
[pkg4]: Run "flutter help <command>" for more information about a command.
[pkg4]: Run "flutter help -v" for verbose help output, including less commonly used options.
[pkg2]: Manage your Flutter app development.
[pkg2]:
[pkg2]: Common commands:
[pkg2]:
[pkg2]:   flutter create <output directory>
[pkg2]:     Create a new Flutter project in the specified directory.
[pkg2]:
[pkg2]:   flutter run [options]
[pkg2]:     Run your Flutter application on an attached device or in an emulator.
[pkg2]:
[pkg2]: Usage: flutter <command> [arguments]
[pkg2]:
[pkg2]: Global options:
[pkg2]: -h, --help                  Print this usage information.
[pkg2]: -v, --verbose               Noisy logging, including all shell commands executed.
[pkg2]:                             If used with --help, shows hidden options.
[pkg2]: -d, --device-id             Target device id or name (prefixes allowed).
[pkg2]:     --version               Reports the version of this tool.
[pkg2]:     --suppress-analytics    Suppress analytics reporting when this command runs.
[pkg2]:
[pkg2]: Available commands:
[pkg2]:   analyze           Analyze the project's Dart code.
[pkg2]:   assemble          Assemble and build Flutter resources.
[pkg2]:   attach            Attach to a running app.
[pkg2]:   bash-completion   Output command line shell completion setup scripts.
[pkg2]:   build             Build an executable app or install bundle.
[pkg2]:   channel           List or switch Flutter channels.
[pkg2]:   clean             Delete the build/ and .dart_tool/ directories.
[pkg2]:   config            Configure Flutter settings.
[pkg2]:   create            Create a new Flutter project.
[pkg2]:   devices           List all connected devices.
[pkg2]:   doctor            Show information about the installed tooling.
[pkg2]:   downgrade         Downgrade Flutter to the last active version for the current channel.
[pkg2]:   drive             Run integration tests for the project on an attached device or emulator.
[pkg2]:   emulators         List, launch and create emulators.
[pkg2]:   format            Format one or more Dart files.
[pkg2]:   gen-l10n          Generate localizations for the current project.
[pkg2]:   install           Install a Flutter app on an attached device.
[pkg2]:   logs              Show log output for running Flutter apps.
[pkg2]:   precache          Populate the Flutter tool's cache of binary artifacts.
[pkg2]:   pub               Commands for managing Flutter packages.
[pkg2]:   run               Run your Flutter app on an attached device.
[pkg2]:   screenshot        Take a screenshot from a connected device.
[pkg2]:   symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
[pkg2]:   test              Run Flutter unit tests for the current project.
[pkg2]:   upgrade           Upgrade your copy of Flutter.
[pkg2]:
[pkg2]: Run "flutter help <command>" for more information about a command.
[pkg2]: Run "flutter help -v" for verbose help output, including less commonly used options.
[pkg1]: Manage your Flutter app development.
[pkg1]:
[pkg1]: Common commands:
[pkg1]:
[pkg1]:   flutter create <output directory>
[pkg1]:     Create a new Flutter project in the specified directory.
[pkg1]:
[pkg1]:   flutter run [options]
[pkg1]:     Run your Flutter application on an attached device or in an emulator.
[pkg1]:
[pkg1]: Usage: flutter <command> [arguments]
[pkg1]:
[pkg1]: Global options:
[pkg1]: -h, --help                  Print this usage information.
[pkg1]: -v, --verbose               Noisy logging, including all shell commands executed.
[pkg1]:                             If used with --help, shows hidden options.
[pkg1]: -d, --device-id             Target device id or name (prefixes allowed).
[pkg1]:     --version               Reports the version of this tool.
[pkg1]:     --suppress-analytics    Suppress analytics reporting when this command runs.
[pkg1]:
[pkg1]: Available commands:
[pkg1]:   analyze           Analyze the project's Dart code.
[pkg1]:   assemble          Assemble and build Flutter resources.
[pkg1]:   attach            Attach to a running app.
[pkg1]:   bash-completion   Output command line shell completion setup scripts.
[pkg1]:   build             Build an executable app or install bundle.
[pkg1]:   channel           List or switch Flutter channels.
[pkg1]:   clean             Delete the build/ and .dart_tool/ directories.
[pkg1]:   config            Configure Flutter settings.
[pkg1]:   create            Create a new Flutter project.
[pkg1]:   devices           List all connected devices.
[pkg1]:   doctor            Show information about the installed tooling.
[pkg1]:   downgrade         Downgrade Flutter to the last active version for the current channel.
[pkg1]:   drive             Run integration tests for the project on an attached device or emulator.
[pkg1]:   emulators         List, launch and create emulators.
[pkg1]:   format            Format one or more Dart files.
[pkg1]:   gen-l10n          Generate localizations for the current project.
[pkg1]:   install           Install a Flutter app on an attached device.
[pkg1]:   logs              Show log output for running Flutter apps.
[pkg1]:   precache          Populate the Flutter tool's cache of binary artifacts.
[pkg1]:   pub               Commands for managing Flutter packages.
[pkg1]:   run               Run your Flutter app on an attached device.
[pkg1]:   screenshot        Take a screenshot from a connected device.
[pkg1]:   symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
[pkg1]:   test              Run Flutter unit tests for the current project.
[pkg1]:   upgrade           Upgrade your copy of Flutter.
[pkg1]:
[pkg1]: Run "flutter help <command>" for more information about a command.
[pkg1]: Run "flutter help -v" for verbose help output, including less commonly used options.
---------------------------------------------------------------------------------------------------------------------------------------

$ melos exec
   └> exec fvm --verbose flutter
       └> FAILED (in 1 packages)
           └> pkg3 (with exit code 64)

@leoafarias
Copy link
Owner

@lcdsmao Ok good news I can replicate the issue. I will take a look and update you

@leoafarias
Copy link
Owner

leoafarias commented May 19, 2021

@lcdsmao thanks for your help, race conditions are always a tough one.
https://github.com/leoafarias/fvm/actions/runs/857277399 Should be live soon 2.0.5

@lcdsmao
Copy link
Author

lcdsmao commented May 19, 2021

@leoafarias
Thanks for your hard work!
I can confirm 2.0.5 works fine now.

@lcdsmao lcdsmao closed this as completed May 19, 2021
@dryprogrammer
Copy link

This error took me 7 hours to fix. The race condition left a dummy file. I had to delete ~/fvm

ubuntu:~$ ls -al fvm
-rw-rw-r-- 1 ubuntu ubuntu 0  5 31 13:48 fvm


ubuntu@ubuntu:~$ fvm --version
2.0.5
ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

If you see this errror.

ensureCacheWorkflow (package:fvm/src/workflows/ensure_cache.workflow.dart:61:5)

or

SettingsService.save (package:fvm/src/services/settings_service.dart:50:7)

try

rm ~/fvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants