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

Why flutter downloads dart sdk when I already have it installed #2055

Closed
agauniyal opened this issue Feb 20, 2016 · 7 comments
Closed

Why flutter downloads dart sdk when I already have it installed #2055

agauniyal opened this issue Feb 20, 2016 · 7 comments

Comments

@agauniyal
Copy link

I already have dart installed from aur, why is it downloading it again? Just use the system path to find already installed one and build itself.

Steps to Reproduce

Flutter Version

Flutter from https://github.com/flutter/flutter.git (on alpha)
flutter revision: 49c0ec3402a58b670d4eefb8ad500d330da59664 (4 days ago)

[✓] The Android toolchain is fully installed.

Dart version (installed from aur)

Dart VM version: 1.14.2 (Tue Feb 9 15:09:45 2016) on "linux_x64"

@Hixie
Copy link
Contributor

Hixie commented Feb 20, 2016

We do this mainly to ensure we have a compatible version.

@agauniyal
Copy link
Author

makes sense since it is in active development, you could add a check in system path's in future.

@hooramin
Copy link

I have unstable internet connection and git severs are so slow sometimes, so i should download zip files to prevent my downloads interruption.

Flutter doctor downloads again each time , even when i downloaded and installed the exact SDK version as flutter doctor wants to download...

It's really terrible , please open this issue again and think a solution for us .

@eseidelGoogle
Copy link
Contributor

Flutter commonly uses development versions of the Dart toolchain which can sometimes be tightly coupled with the Flutter SDK.

bin/cache/dart-sdk.stamp is the file that we check to make sure we have the right one.

We definitely could build our own copy of the Dart toolchain and have it be much smaller than the ones offered through dart-lang.org. We might already even be doing that? @aam would know.

@aam
Copy link
Member

aam commented Oct 16, 2017

Few more details on this: since flutter/engine#3972 Flutter needs two dart sdks:

  • one used for analysis, pub and otherwise running Flutter tools dart code on your workstation. We want to use rather stable version of dart sdk for that. It is in flutter/bin/cache/dart-sdk downloaded from the cloud per flutter/bin/internal/dart-sdk.stamp. You can download it yourself from http://commondatastorage.googleapis.com/dart-archive/channels/dev/raw/<dev-tag-from-dart-sdk.stamp>/sdk/dartsdk-(windows/linux/macos)-x64-release.zip and put it into that folder. Once it's there and its hash matches contents of dart-sdk.stamp, flutter doctor will be happy, won't download it again.
  • second is used to compile your Flutter app dart code into binary files that are to be read and loaded by Flutter engine on the device. It is critical that this dart sdk matches what Flutter engine is build on, which can be quite bleeding-edge. That one is downloaded together with rest of Fltuter engine artifacts into flutter/bin/cache/artifacts/engine/(linux-x64/win-x64/darwin-x64)/dart-sdk. It is smaller version of dart sdk as it has only components needed to run relevant Dart code on host machine(at the time of writing it is 84M flutter/bin/cache/artifacts/engine/linux-x64 vs 208M flutter/bin/cache/dart-sdk uncompressed).

@hjain1
Copy link

hjain1 commented Feb 28, 2018

Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 4294967295 press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 13cf22c
1...
Start-BitsTransfer : The certificate authority is invalid or incorrect
At D:\flutterSDK\flutter\bin\internal\update_dart_sdk.ps1:47 char:1

  • Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
  •   + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exce
     ption
      + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.Backgrou
     ndIntelligentTransfer.Management.NewBitsTransferCommand
    
    

Error: Unable to update Dart SDK. Retrying...

Waiting for 3 seconds, press CTRL+C to quit ...

when running flutter.bat

@github-actions
Copy link

github-actions bot commented Sep 3, 2021

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 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants