Pub on Windows fails with TLS error
Closed this issue · 19 comments
From https://ci.appveyor.com/project/flutter/flutter/build/1.0.9587 which keeps going on indefinitely
Build started
git clone -q https://github.com/flutter/flutter.git C:\projects\flutter
git fetch -q origin +refs/pull/14610/merge:
git checkout -qf FETCH_HEAD
Restoring build cache
Cache 'C:\Users\appveyor\AppData\Roaming\Pub\Cache' - Restored
Running Install scripts
cd ..
move flutter "flutter sdk"
1 dir(s) moved.
cd "flutter sdk"
bin\flutter.bat config --no-analytics
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine f5a4a9378740c3d5996583a9ed1f7e28ff08ee85...
Unzipping Dart SDK...
Updating flutter tool...
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 5 seconds, press CTRL+C to quit ...�4�3�2�1�0
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 5 seconds, press CTRL+C to quit ...�4�3�2�1�0
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 5 seconds, press CTRL+C to quit ...�4�3�2�1�0
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 5 seconds, press CTRL+C to quit ...�4�3�2�1�0
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
...
Pub just uses dart:io's HTTP implementation. Any protocol errors either come from there or from https://github.com/dart-lang/pub-dartlang-dart.
Here is more output from actual dev windows box:
C:\src\flutter\flutter\packages\flutter_tools [use-host-dart-sdk ≡ +4 ~1 -0 !]> C:\src\flutter\flutter\bin\cache\dart-sdk\bin\pub.bat upgrade --verbosity=all --no
-packages-dir
FINE: Pub 2.0.0-edge.28757928b47b192efcec082c78258102beb03f78
IO : Spawning "cmd /c ver" in C:\src\flutter\flutter\packages\flutter_tools\.
IO : Finished ver. Exit code 0.
| stdout:
| |
| | Microsoft Windows [Version 10.0.14393]
| Nothing output on stderr.
MSG : Resolving dependencies...
SLVR: Solving dependencies:
| - coverage 0.10.0 from hosted (coverage)
| - test 0.12.30+3 from hosted (test)
| - file 2.3.6 from hosted (file)
| - mustache 1.0.0 from hosted (mustache)
| - meta 1.1.2 from hosted (meta)
| - web_socket_channel 1.0.7 from hosted (web_socket_channel)
| - http 0.11.3+16 from hosted (http)
| - xml 2.6.0 from hosted (xml)
| - json_rpc_2 2.0.7 from hosted (json_rpc_2)
| - stream_channel 1.6.3 from hosted (stream_channel)
| - process 2.0.7 from hosted (process)
| - vm_service_client 0.2.4+1 from hosted (vm_service_client)
| - front_end any from hosted (front_end)
| - linter 0.1.43 from hosted (linter)
| - quiver 0.28.0 from hosted (quiver)
| - args 1.3.0 from hosted (args)
| - package_config 1.0.3 from hosted (package_config)
| - crypto 2.0.2+1 from hosted (crypto)
| - platform 2.1.2 from hosted (platform)
| - plugin 0.2.0+2 from hosted (plugin)
| - stack_trace 1.9.1 from hosted (stack_trace)
| - usage 3.3.0 from hosted (usage)
| - intl 0.15.2 from hosted (intl)
| - archive 1.0.33 from hosted (archive)
| - cli_util 0.1.2+1 from hosted (cli_util)
| - json_schema 1.0.8 from hosted (json_schema)
| - yaml 2.1.13 from hosted (yaml)
| - analyzer any from hosted (analyzer)
IO : Get versions from https://pub.dartlang.org/api/packages/coverage.
IO : HTTP GET https://pub.dartlang.org/api/packages/coverage
| Accept: application/vnd.pub.v2+json
| X-Pub-OS: windows
| X-Pub-Command: upgrade
| X-Pub-Session-ID: 1AA465EA-FD18-4E59-AED7-AA340932B152
| X-Pub-Reason: direct
| user-agent: Dart pub 2.0.0-edge.28757928b47b192efcec082c78258102beb03f78
SLVR: Could not get versions for coverage from hosted:
| Got TLS error trying to find package coverage at https://pub.dartlang.org.
|
| package:pub/src/utils.dart 733 fail
| package:pub/src/source/hosted.dart 335 BoundHostedSource._throwFriendlyError
| package:pub/src/source/hosted.dart 141 BoundHostedSource.doGetVersions
| ===== asynchronous gap ===========================
| dart:async _Completer.completeError
| package:pub/src/source/hosted.dart BoundHostedSource.doGetVersions
| ===== asynchronous gap ===========================
| dart:async _asyncErrorWrapperHelper
| package:pub/src/source/hosted.dart 130 BoundHostedSource.doGetVersions
| package:pub/src/source.dart 169 BoundSource.getVersions
| package:pub/src/solver/version_solver.dart 237 SolverCache.getVersions.<fn>
| dart:async runZoned
| package:pub/src/http.dart 267 withDependencyType
| package:pub/src/solver/version_solver.dart 236 SolverCache.getVersions
| ===== asynchronous gap ===========================
| dart:async new Future.microtask
| package:pub/src/solver/version_solver.dart 210 SolverCache.getVersions
| package:pub/src/solver/unselected_package_queue.dart 121 UnselectedPackageQueue._getNumVersions
| ===== asynchronous gap ===========================
| dart:async new Future.microtask
| package:pub/src/solver/unselected_package_queue.dart 115 UnselectedPackageQueue._getNumVersions
| package:pub/src/solver/unselected_package_queue.dart 50 UnselectedPackageQueue.add
| ===== asynchronous gap ===========================
| dart:async new Future.microtask
| package:pub/src/solver/unselected_package_queue.dart 44 UnselectedPackageQueue.add
| package:pub/src/solver/version_selection.dart 88 VersionSelection._addDependencies
| ===== asynchronous gap ===========================
| dart:async new Future.microtask
| package:pub/src/solver/version_selection.dart 70 VersionSelection._addDependencies
| package:pub/src/solver/version_selection.dart 63 VersionSelection.select
| ===== asynchronous gap ===========================
| dart:async _asyncThenWrapperHelper
| package:pub/src/solver/version_selection.dart 58 VersionSelection.select
| package:pub/src/solver/backtracking_solver.dart 174 BacktrackingSolver.solve
| ===== asynchronous gap ===========================
| dart:async new Future.microtask
| package:pub/src/solver/backtracking_solver.dart 160 BacktrackingSolver.solve
| package:pub/src/solver/version_solver.dart 42 resolveVersions.<fn>
| package:pub/src/log.dart 409 progress
| package:pub/src/solver/version_solver.dart 40 resolveVersions
| package:pub/src/entrypoint.dart 195 Entrypoint.acquireDependencies
Chatted a bit in person with @aam. This is a bit mystifying since the secure socket implementation hasn't been touched by anyone in months. Has something changed recently with pub.dartlang.org? @mkustermann
I believe this is different from #32131 .
Here the problem seems to be with dart_use_fallback_root_certificates having default false value, which is overridden in dart sdk with true in args.gn, which is put there by sdk/tools/gn.py.
This true-setting logic doesn't exist in flutter build.
@zanderso There have been no changes to the certificate served from pub.dartlang.org for many months.
flutter/engine#4662 fixes this problem.
can anyone tell me how to solve this problem in windows 10?
/cc @jonasfj for pub server.
@shajji1, I'm not sure what your issue is...
Have you checked out: https://dart.dev/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall
Or file a new issue on https://github.com/dart-lang/pub
@jonasfj, i'm getting Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org. while running command flutter packages get and i checked your link but i don't know values of proxy server environment variables, kindly help.
If you're behind a proxy your browser might know the configuration.. and hopefully your IT admin.
Try internet settings, hmm, I'm not a Windows expert here, sorry..
k i'll try to solve this issue, well thnx for your prompt response :)
Try deleting the "cache" folder in Flutter "bin" folder and then run flutter pub get again
for all those getting the TLS error its because flutter is trying to ssh to https://pub.dartlang.org and is not able to establish a connection to download the libraries.
Check if you are able to ssh to any other machine if not it means your port 22 might be blocked. get that unblocked by your IT if you are on a corporate machine.
@anujkapoor pub doesn't use SSH to talk to pub.dartlang.org.