Comments (9)
Okay I assume that /home/developer/fvm/versions/3.19.3
is not cached which causes the issue.
Update:
I tired configuring the FVM_CACHE_PATH
to be another path that i can cache.
export FVM_CACHE_PATH=$CI_PROJECT_DIR/fvm-version-cache
This made the gitclone fail without a readable error or stack:
Creating local mirror...
✓ Clone complete
Exception: Git clone failed
package:fvm/src/utils/parsers/git_clone_update_printer.dart 92:5 runGitCloneUpdate
package:fvm/src/services/flutter_service.dart 146:7 FlutterService.updateLocalMirror
package:fvm/src/services/flutter_service.dart 30:7 FlutterService._ensureCacheDir
package:fvm/src/services/flutter_service.dart 195:5 FlutterService.getReference
package:fvm/src/services/flutter_service.dart 166:23 FlutterService.isTag
package:fvm/src/workflows/ensure_cache.workflow.dart 193:9 validateFlutterVersion
package:fvm/src/workflows/ensure_cache.workflow.dart 25:24 ensureCacheWorkflow
package:fvm/src/commands/install_command.dart 58:28 InstallCommand.run
package:args/command_runner.dart 212:13 CommandRunner.runCommand
package:fvm/src/runner.dart FvmCommandRunner.runCommand
package:fvm/src/runner.dart 122:24 FvmCommandRunner.run
package:scope/src/scope.dart 151:12 Scope.run
/home/developer/.pub-cache/hosted/pub.dev/fvm-3.1.3/bin/main.dart 13:5 main
from fvm.
@JulianBissekkou could it be that you do not have permission in this directory?
from fvm.
@leoafarias
After some debugging the git clone failed because of proxy issues. This was an issue on my side.
Maybe we can improve error handling here and give more information on what actually went wrong?
The flutter version is now installed, however I still see that it creates the mirror which takes around 40 seconds.
Ouput of pipeline (slightly truncated):
$ time fvm install --skip-pub-get
Creating local mirror...
Counting objects: [██████████████████████████████████████████████████] 100%
Receiving objects: [█.................................................] 1%
Receiving objects: [█████████████████████████████████.................] 66%
Receiving objects: [███████████████████████████████████████████.......] 86%
Receiving objects: [█████████████████████████████████████████████.....] 90%
Receiving objects: [███████████████████████████████████████████████...] 94%
Receiving objects: [████████████████████████████████████████████████..] 96%
Receiving objects: [█████████████████████████████████████████████████.] 98%
Receiving objects: [██████████████████████████████████████████████████] 100%
Receiving objects: [██████████████████████████████████████████████████] 100%
Resolving deltas: [█████.............................................] 9%
[██████████████████████████████████████████████████] 99%
Resolving deltas: [██████████████████████████████████████████████████] 100%
✓ Clone complete
**✓ Flutter SDK: SDK Version : 3.19.3 is already installed.**
✓ Project now uses Flutter SDK : SDK Version : 3.19.3
real 0m47.423s
user 0m21.657s
sys 0m5.559s
Do you know why that is?
from fvm.
@JulianBissekkou The mirror is just the first clone, and the version installs from the mirror. So, it's a bit confusing but does not impact the installation speed or anything like that. However, I think it might make sense to disable the cache for the confusion when installing in a CI.
So if it's isCI
true, it always returns false on gitCache,
fvm/lib/src/utils/context.dart
Line 121 in cd61a3c
If you think this resolves the issue, you can do a quick PR and I will review, and deploy
from fvm.
I would like to do some testing first before we might accidently break anything.
In my described setup I did export FVM_GIT_CACHE=false
and then fvm flutter install
which I would expect to not create a mirror.
Instead I got:
FVM_GIT_CACHE environment variable is deprecated.
Please use FVM_FLUTTER_URL
? Do you want to proceed? This might impact the expected behavior. (y/n) ›
Am I confusing anything? I thought I can also set this variable to false by using this env variable.
from fvm.
@JulianBissekkou can you try using FVM_USE_GIT_CACHE
instead?
from fvm.
I used the proposed parameter but I can't see any change in the output:
$ export FVM_USE_GIT_CACHE=false
$ export http_proxy="${PROXY}" && export https_proxy="${PROXY}"
$ export HTTP_PROXY="${PROXY}" && export HTTPS_PROXY="${PROXY}"
$ time fvm install --skip-pub-get
Creating local mirror...
Counting objects: [██████████████████████████████████████████████████] 100%
Compressing objects: [██████████████████████████████████████████████████] 100%
Receiving objects: [..................................................] 0%
Receiving objects: [█.................................................] 1%
Receiving objects: [████..............................................] 8%
Receiving objects: [█████.............................................] 9%
Receiving objects: [█████.............................................] 10%
Receiving objects: [██████████████....................................] 28%
Receiving objects: [██████████████....................................] 29%
Receiving objects: [███████████████...................................] 30%
Receiving objects: [███████████████████████████████████████...........] 77%
Receiving objects: [██████████████████████████████████████████........] 84%
Receiving objects: [███████████████████████████████████████████.......] 86%
Receiving objects: [████████████████████████████████████████████......] 87%
Receiving objects: [██████████████████████████████████████████████....] 91%
Receiving objects: [███████████████████████████████████████████████...] 94%
Receiving objects: [████████████████████████████████████████████████..] 96%
Receiving objects: [█████████████████████████████████████████████████.] 97%
Receiving objects: [██████████████████████████████████████████████████] 99%
Receiving objects: [██████████████████████████████████████████████████] 100%
Resolving deltas: [..................................................] 0%
Resolving deltas: [██████............................................] 11%
Resolving deltas: [█████████.........................................] 18%
Resolving deltas: [█████████████.....................................] 26%
Resolving deltas: [█████████████████.................................] 34%
Resolving deltas: [██████████████████████████████████████████████████] 100%
✓ Clone complete
**✓ Flutter SDK: SDK Version : 3.19.3 is already installed.**
✓ Project now uses Flutter SDK : SDK Version : 3.19.3
**real 0m53.553s
user 0m21.786s
sys 0m3.859s**
You can see that the creation of the mirror takes quite some time, however, fvm sees tha the version was already installed.
Here is the dockerfile of the image, maybe you can see if there is a mistake:
RUN export http_proxy=${HTTP_PROXY} \
&& export https_proxy=${HTTPS_PROXY} \
&& dart pub global activate fvm ${FVM_VERSION} \
&& fvm --version
# Install flutter
RUN export http_proxy=${HTTP_PROXY} \
&& export https_proxy=${HTTPS_PROXY} \
&& fvm install ${FLUTTER_VERSION} --setup \
&& fvm global ${FLUTTER_VERSION} \
&& fvm flutter --version \
&& fvm flutter precache
Something that is strange is that the fvm install ${FLUTTER_VERSION} --setup
finishes in just a few seconds.
from fvm.
@JulianBissekkou Just tested with the latest version and doing
export FVM_USE_GIT_CACHE=false
and then running the fvm install [version] does not generate the mirror. Can you confirm that this is what you are doing?
from fvm.
@JulianBissekkou also I have updated the docs which was incorrect from FVM_GIT_CACHE
to FVM_USE_GIT_CACHE
from fvm.
Related Issues (20)
- [BUG]https://github.com/leoafarias/fvm/issues/638 report in fvm version:3.1.3 HOT 9
- [Feature Request] Correct way to move the main fvm folder HOT 2
- [Feature Request] Option to error and exit instead of requesting user input
- [Feature Request] Option to force the use of a Flutter version even if it is invalid
- [Enhancement] Show warning when git not installed HOT 8
- [BUG] Cannot change versions to use Dart<3.0 compatible projects HOT 4
- install issue HOT 7
- run ‘fvm list’, TOO SOLW [BUG] HOT 4
- Add documentation to optionally allow users to forward all `flutter`, `dart` calls to fvm HOT 2
- [Feature Request] Automatically install required version or use it HOT 3
- [BUG] run `fvm global` tip HOT 2
- [ENHANCEMENT] `fvm list` not showing the flutter version of a project HOT 1
- SDK Path does not point to the project directory. "fvm use" will not make IntelliJ (Android Studio, ...) switch Flutter version. Please consult documentation. HOT 4
- Exception: Git clone failed HOT 11
- Extension type function not available in fvm use 3.19.3 command HOT 3
- The provided value cache.git is not the root of a git directory HOT 2
- The provided value cache.git is not the root of a git directory HOT 3
- [BUG] FVM Unhandled exception Install Issue on windows
- [BUG] installation failed but choco report it as success
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fvm.