Skip to content

TLS error with no firewall #3911

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

Closed
SlavaSkvortsov opened this issue May 9, 2023 · 8 comments
Closed

TLS error with no firewall #3911

SlavaSkvortsov opened this issue May 9, 2023 · 8 comments
Labels
needs-info Additional information needed from the issue author

Comments

@SlavaSkvortsov
Copy link

Environment

  • Dart version (run dart --version):
Dart SDK version: 2.19.6 (stable) (Tue Mar 28 13:41:04 2023 +0000) on "linux_x64"
  • OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"):
    Ubuntu 22.04.2 LTS
  • Are you using the Chinese community mirror or a corporate firewall?
    Nope

Problem

Trying to install flutter for the first time, but flutter doctor fails from the beginning because of Got TLS error trying to find package test at https://pub.dev. I'm not behind a farewell, curl https://pub.dev/api/packages/test returns the data. Was trying to add a cert as recommended here, but it changed nothing.

Expected behavior

All should work 🤷‍♂️

Actual behavior

Returns the error

--trace output

slava@slava-laptop:~$ DART_VM_OPTIONS="--root-certs-file=/home/slava/Downloads/pub-dev.pem" flutter doctor -vv
[   +7 ms] Unable to locate an Android SDK.
[   +4 ms] executing: uname -m
[   +1 ms] Exit code 0 from: uname -m
[        ] x86_64
[        ] executing: [/home/slava/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +2 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
[        ] executing: [/home/slava/snap/flutter/common/flutter/] git tag --points-at 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
[   +9 ms] Exit code 0 from: git tag --points-at 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
[        ] 3.7.12
[   +5 ms] executing: [/home/slava/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/stable
[        ] executing: [/home/slava/snap/flutter/common/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +11 ms] executing: [/home/slava/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +8 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +35 ms] Running "flutter pub get" in flutter_tools...
[   +2 ms] executing: [/home/slava/] /home/slava/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color --verbose --directory snap/flutter/common/flutter/packages/flutter_tools get
--example
FINE: Pub 2.19.6
MSG : Resolving dependencies in snap/flutter/common/flutter/packages/flutter_tools...
SLVR: fact: flutter_tools is 0.0.0
SLVR: derived: flutter_tools
SLVR: fact: flutter_tools depends on archive 3.3.2
SLVR: fact: flutter_tools depends on args 2.3.1
SLVR: fact: flutter_tools depends on browser_launcher 1.1.1
SLVR: fact: flutter_tools depends on dds 2.5.0
SLVR: fact: flutter_tools depends on dwds 16.0.2+1
SLVR: fact: flutter_tools depends on completion 1.0.0
SLVR: fact: flutter_tools depends on coverage 1.6.1
SLVR: fact: flutter_tools depends on crypto 3.0.2
SLVR: fact: flutter_tools depends on file 6.1.4
SLVR: fact: flutter_tools depends on flutter_template_images 4.2.0
SLVR: fact: flutter_tools depends on html 0.15.1
SLVR: fact: flutter_tools depends on http 0.13.5
SLVR: fact: flutter_tools depends on intl 0.17.0
SLVR: fact: flutter_tools depends on meta 1.8.0
SLVR: fact: flutter_tools depends on multicast_dns 0.3.2+2
SLVR: fact: flutter_tools depends on mustache_template 2.0.0
SLVR: fact: flutter_tools depends on package_config 2.1.0
SLVR: fact: flutter_tools depends on process 4.2.4
SLVR: fact: flutter_tools depends on fake_async 1.3.1
SLVR: fact: flutter_tools depends on stack_trace 1.11.0
SLVR: fact: flutter_tools depends on usage 4.1.0
SLVR: fact: flutter_tools depends on webdriver 3.0.1
SLVR: fact: flutter_tools depends on webkit_inspection_protocol 1.2.0
SLVR: fact: flutter_tools depends on xml 6.2.2
SLVR: fact: flutter_tools depends on yaml 3.1.1
SLVR: fact: flutter_tools depends on native_stack_traces 0.5.2
SLVR: fact: flutter_tools depends on shelf 1.4.0
SLVR: fact: flutter_tools depends on vm_snapshot_analysis 0.7.2
SLVR: fact: flutter_tools depends on uuid 3.0.7
SLVR: fact: flutter_tools depends on web_socket_channel 2.2.0
SLVR: fact: flutter_tools depends on stream_channel 2.1.1
SLVR: fact: flutter_tools depends on shelf_web_socket 1.0.3
SLVR: fact: flutter_tools depends on shelf_static 1.1.1
SLVR: fact: flutter_tools depends on pub_semver 2.1.3
SLVR: fact: flutter_tools depends on pool 1.5.1
SLVR: fact: flutter_tools depends on path 1.8.2
SLVR: fact: flutter_tools depends on mime 1.0.2
SLVR: fact: flutter_tools depends on logging 1.1.0
SLVR: fact: flutter_tools depends on http_multi_server 3.2.1
SLVR: fact: flutter_tools depends on convert 3.1.1
SLVR: fact: flutter_tools depends on async 2.10.0
SLVR: fact: flutter_tools depends on test_api 0.4.16
SLVR: fact: flutter_tools depends on test_core 0.4.20
SLVR: fact: flutter_tools depends on vm_service 9.4.0
SLVR: fact: flutter_tools depends on _fe_analyzer_shared 50.0.0
SLVR: fact: flutter_tools depends on analyzer 5.2.0
SLVR: fact: flutter_tools depends on boolean_selector 2.1.1
SLVR: fact: flutter_tools depends on built_collection 5.1.1
SLVR: fact: flutter_tools depends on built_value 8.4.2
SLVR: fact: flutter_tools depends on clock 1.1.1
SLVR: fact: flutter_tools depends on csslib 0.17.2
SLVR: fact: flutter_tools depends on dds_service_extensions 1.3.1
SLVR: fact: flutter_tools depends on devtools_shared 2.18.0
SLVR: fact: flutter_tools depends on fixnum 1.0.1
SLVR: fact: flutter_tools depends on frontend_server_client 3.1.0
SLVR: fact: flutter_tools depends on glob 2.1.1
SLVR: fact: flutter_tools depends on http_parser 4.0.2
SLVR: fact: flutter_tools depends on io 1.0.3
SLVR: fact: flutter_tools depends on json_rpc_2 3.0.2
SLVR: fact: flutter_tools depends on matcher 0.12.13
SLVR: fact: flutter_tools depends on petitparser 5.1.0
SLVR: fact: flutter_tools depends on platform 3.1.0
SLVR: fact: flutter_tools depends on shelf_packages_handler 3.0.1
SLVR: fact: flutter_tools depends on shelf_proxy 1.0.2
SLVR: fact: flutter_tools depends on source_map_stack_trace 2.1.1
SLVR: fact: flutter_tools depends on source_maps 0.10.11
SLVR: fact: flutter_tools depends on source_span 1.9.1
SLVR: fact: flutter_tools depends on sse 4.1.1
SLVR: fact: flutter_tools depends on string_scanner 1.2.0
SLVR: fact: flutter_tools depends on sync_http 0.3.1
SLVR: fact: flutter_tools depends on term_glyph 1.2.1
SLVR: fact: flutter_tools depends on typed_data 1.3.1
SLVR: fact: flutter_tools depends on watcher 1.0.2
SLVR: fact: flutter_tools depends on collection 1.17.0
SLVR: fact: flutter_tools depends on file_testing 3.0.0
SLVR: fact: flutter_tools depends on pubspec_parse 1.2.1
SLVR: fact: flutter_tools depends on checked_yaml 2.0.1
SLVR: fact: flutter_tools depends on js 0.6.5
SLVR: fact: flutter_tools depends on json_annotation 4.7.0
SLVR: fact: flutter_tools depends on node_preamble 2.0.1
SLVR: fact: flutter_tools depends on test 1.22.0
SLVR:   selecting flutter_tools
SLVR:   derived: test 1.22.0
SLVR:   derived: node_preamble 2.0.1
SLVR:   derived: json_annotation 4.7.0
SLVR:   derived: js 0.6.5
SLVR:   derived: checked_yaml 2.0.1
SLVR:   derived: pubspec_parse 1.2.1
SLVR:   derived: file_testing 3.0.0
SLVR:   derived: collection 1.17.0
SLVR:   derived: watcher 1.0.2
SLVR:   derived: typed_data 1.3.1
SLVR:   derived: term_glyph 1.2.1
SLVR:   derived: sync_http 0.3.1
SLVR:   derived: string_scanner 1.2.0
SLVR:   derived: sse 4.1.1
SLVR:   derived: source_span 1.9.1
SLVR:   derived: source_maps 0.10.11
SLVR:   derived: source_map_stack_trace 2.1.1
SLVR:   derived: shelf_proxy 1.0.2
SLVR:   derived: shelf_packages_handler 3.0.1
SLVR:   derived: platform 3.1.0
SLVR:   derived: petitparser 5.1.0
SLVR:   derived: matcher 0.12.13
SLVR:   derived: json_rpc_2 3.0.2
SLVR:   derived: io 1.0.3
SLVR:   derived: http_parser 4.0.2
SLVR:   derived: glob 2.1.1
SLVR:   derived: frontend_server_client 3.1.0
SLVR:   derived: fixnum 1.0.1
SLVR:   derived: devtools_shared 2.18.0
SLVR:   derived: dds_service_extensions 1.3.1
SLVR:   derived: csslib 0.17.2
SLVR:   derived: clock 1.1.1
SLVR:   derived: built_value 8.4.2
SLVR:   derived: built_collection 5.1.1
SLVR:   derived: boolean_selector 2.1.1
SLVR:   derived: analyzer 5.2.0
SLVR:   derived: _fe_analyzer_shared 50.0.0
SLVR:   derived: vm_service 9.4.0
SLVR:   derived: test_core 0.4.20
SLVR:   derived: test_api 0.4.16
SLVR:   derived: async 2.10.0
SLVR:   derived: convert 3.1.1
SLVR:   derived: http_multi_server 3.2.1
SLVR:   derived: logging 1.1.0
SLVR:   derived: mime 1.0.2
SLVR:   derived: path 1.8.2
SLVR:   derived: pool 1.5.1
SLVR:   derived: pub_semver 2.1.3
SLVR:   derived: shelf_static 1.1.1
SLVR:   derived: shelf_web_socket 1.0.3
SLVR:   derived: stream_channel 2.1.1
SLVR:   derived: web_socket_channel 2.2.0
SLVR:   derived: uuid 3.0.7
SLVR:   derived: vm_snapshot_analysis 0.7.2
SLVR:   derived: shelf 1.4.0
SLVR:   derived: native_stack_traces 0.5.2
SLVR:   derived: yaml 3.1.1
SLVR:   derived: xml 6.2.2
SLVR:   derived: webkit_inspection_protocol 1.2.0
SLVR:   derived: webdriver 3.0.1
SLVR:   derived: usage 4.1.0
SLVR:   derived: stack_trace 1.11.0
SLVR:   derived: fake_async 1.3.1
SLVR:   derived: process 4.2.4
SLVR:   derived: package_config 2.1.0
SLVR:   derived: mustache_template 2.0.0
SLVR:   derived: multicast_dns 0.3.2+2
SLVR:   derived: meta 1.8.0
SLVR:   derived: intl 0.17.0
SLVR:   derived: http 0.13.5
SLVR:   derived: html 0.15.1
SLVR:   derived: flutter_template_images 4.2.0
SLVR:   derived: file 6.1.4
SLVR:   derived: crypto 3.0.2
SLVR:   derived: coverage 1.6.1
SLVR:   derived: completion 1.0.0
SLVR:   derived: dwds 16.0.2+1
SLVR:   derived: dds 2.5.0
SLVR:   derived: browser_launcher 1.1.1
SLVR:   derived: args 2.3.1
SLVR:   derived: archive 3.3.2
IO  : Get versions from https://pub.dev/api/packages/test.
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #2 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #3 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #4 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #5 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #6 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
IO  : Attempt #7 for fetching versions for "test" from "https://pub.dev/api/packages/test"
IO  : HTTP GET https://pub.dev/api/packages/test
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: A607C466-1D59-4416-B9ED-A3078948572E
    | X-Pub-Environment: flutter_cli:get
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.19.6
SLVR: Version solving took 0:00:26.076471 seconds.
    | Tried 1 solutions.
FINE: Resolving dependencies in snap/flutter/common/flutter/packages/flutter_tools finished (26.107s).
ERR : Got TLS error trying to find package test at https://pub.dev.
FINE: Exception type: WrappedException
FINE: package:pub/src/utils.dart 547:5                     fail
    | package:pub/src/source/hosted.dart 1223:7            HostedSource._throwFriendlyError
    | package:pub/src/source/hosted.dart 415:7             HostedSource._fetchVersionsNoPrefetching
    | ===== asynchronous gap ===========================
    | dart:async                                           Future.catchError
    | package:pub/src/utils.dart 111:52                    captureErrors.wrappedCallback
    | package:stack_trace                                  Chain.capture
    | package:pub/src/utils.dart 124:11                    captureErrors
    | package:pub/src/command.dart 190:13                  PubCommand.run
    | package:args/command_runner.dart 212:27              CommandRunner.runCommand
    | package:pub/src/command_runner.dart 176:24           PubCommandRunner.runCommand
    | package:pub/src/command_runner.dart 161:20           PubCommandRunner.run
    | package:dartdev/dartdev.dart 49:47                   runDartdev
    | /b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 11:9  main
FINE: Wrapped exception: HandshakeException: Handshake error in client (OS Error: 
    | 	CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:393))
    | dart:io-patch/secure_socket_patch.dart 99:46                  _SecureFilterImpl._handshake
    | dart:io-patch/secure_socket_patch.dart 142:25                 _SecureFilterImpl.handshake
    | dart:io/secure_socket.dart 915:54                             _RawSecureSocket._secureHandshake
    | dart:io/secure_socket.dart 1044:19                            _RawSecureSocket._tryFilter
    | ===== asynchronous gap ===========================
    | dart:async/future_impl.dart 16:44                             _Completer.completeError
    | dart:io/secure_socket.dart 881:26                             _RawSecureSocket._reportError
    | dart:io/secure_socket.dart 926:7                              _RawSecureSocket._secureHandshake
    | dart:io/secure_socket.dart 1044:19                            _RawSecureSocket._tryFilter
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:io/secure_socket.dart 1001:25                            _RawSecureSocket._tryFilter
    | dart:io/secure_socket.dart 986:12                             _RawSecureSocket._scheduleFilter
    | dart:io/secure_socket.dart 923:15                             _RawSecureSocket._secureHandshake
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:io/secure_socket.dart 915:33                             _RawSecureSocket._secureHandshake
    | dart:io/secure_socket.dart 1044:19                            _RawSecureSocket._tryFilter
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:io/secure_socket.dart 1001:25                            _RawSecureSocket._tryFilter
    | dart:io/secure_socket.dart 986:12                             _RawSecureSocket._scheduleFilter
    | dart:io/secure_socket.dart 860:5                              _RawSecureSocket._readHandler
    | dart:io/secure_socket.dart 847:9                              _RawSecureSocket._eventDispatcher
    | package:stack_trace/src/stack_zone_specification.dart 124:36  StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 204:15  StackZoneSpecification._run
    | package:stack_trace/src/stack_zone_specification.dart 124:24  StackZoneSpecification._registerUnaryCallback.<fn>
    | dart:async/zone.dart 1414:13                                  _rootRunUnary
    | dart:async/zone.dart 1307:19                                  _CustomZone.runUnary
    | dart:async/zone.dart 1216:7                                   _CustomZone.runUnaryGuarded
    | dart:async/stream_impl.dart 339:11                            _BufferingStreamSubscription._sendData
    | dart:async/stream_impl.dart 271:7                             _BufferingStreamSubscription._add
    | dart:async/stream_controller.dart 774:19                      _SyncStreamControllerDispatch._sendData
    | dart:async/stream_controller.dart 648:7                       _StreamController._add
    | dart:async/stream_controller.dart 596:5                       _StreamController.add
    | dart:io-patch/socket_patch.dart 1877:33                       new _RawSocket.<fn>
    | dart:io-patch/socket_patch.dart 1334:14                       _NativeSocket.issueReadEvent.issue
    | dart:async/schedule_microtask.dart 40:21                      _microtaskLoop
    | dart:async/schedule_microtask.dart 49:5                       _startMicrotaskLoop
    | dart:isolate-patch/isolate_patch.dart 123:13                  _runPendingImmediateCallback
    | dart:isolate-patch/isolate_patch.dart 193:5                   _RawReceivePort._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:async/stream_impl.dart 134:17                            _BufferingStreamSubscription._registerDataHandler
    | dart:async/stream_impl.dart 108:19                            new _BufferingStreamSubscription.zoned
    | dart:async/stream_impl.dart 103:14                            new _BufferingStreamSubscription
    | dart:async/stream_controller.dart 847:9                       new _ControllerSubscription
    | dart:async/stream_controller.dart 678:47                      _StreamController._subscribe
    | dart:async/stream_controller.dart 827:19                      _ControllerStream._createSubscription
    | dart:async/stream_impl.dart 471:9                             _StreamImpl.listen
    | dart:io-patch/socket_patch.dart 1917:31                       _RawSocket.listen
    | dart:io/secure_socket.dart 628:37                             new _RawSecureSocket
    | dart:io/secure_socket.dart 562:16                             _RawSecureSocket.connect
    | dart:io/secure_socket.dart 371:29                             RawSecureSocket.secure
    | dart:io/secure_socket.dart 300:16                             RawSecureSocket.startConnect.<fn>.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 124:36  StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 204:15  StackZoneSpecification._run
    | package:stack_trace/src/stack_zone_specification.dart 124:24  StackZoneSpecification._registerUnaryCallback.<fn>
    | dart:async/zone.dart 1406:47                                  _rootRunUnary
    | dart:async/zone.dart 1307:19                                  _CustomZone.runUnary
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:async/future_impl.dart 315:23                            Future.then
    | dart:io/secure_socket.dart 299:56                             RawSecureSocket.startConnect.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 124:36  StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 204:15  StackZoneSpecification._run
    | package:stack_trace/src/stack_zone_specification.dart 124:24  StackZoneSpecification._registerUnaryCallback.<fn>
    | dart:async/zone.dart 1406:47                                  _rootRunUnary
    | dart:async/zone.dart 1307:19                                  _CustomZone.runUnary
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | dart:async/future_impl.dart 315:23                            Future.then
    | dart:io/secure_socket.dart 298:10                             RawSecureSocket.startConnect
    | dart:io/secure_socket.dart 77:28                              SecureSocket.startConnect
    | dart:_http/http_impl.dart 2462:26                             _ConnectionTarget.connect
    | dart:_http/http_impl.dart 2906:12                             _HttpClient._getConnection.connect
    | dart:_http/http_impl.dart 2911:12                             _HttpClient._getConnection
    | dart:_http/http_impl.dart 2766:12                             _HttpClient._openUrl
    | dart:_http/http_impl.dart 2604:7                              _HttpClient.openUrl
    | package:http/src/io_client.dart 57:38                         IOClient.send
    | package:pub/src/http.dart 49:43                               _PubHttpClient.send
    | package:pub/src/authentication/client.dart 51:35              _AuthenticatedClient.send
    | package:pub/src/http.dart 349:36                              RequestSending.fetch
    | package:pub/src/source/hosted.dart 404:41                     HostedSource._fetchVersionsNoPrefetching.<fn>.<fn>
    | package:pub/src/http.dart 283:68                              retryForHttp.<fn>.<fn>
    | package:pool/pool.dart 127:28                                 Pool.withResource
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pool/pool.dart 125:20                                 Pool.withResource
    | package:pub/src/http.dart 283:35                              retryForHttp.<fn>
    | package:pub/src/utils.dart 723:22                             retry
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pub/src/utils.dart 723:14                             retry
    | package:pub/src/http.dart 282:16                              retryForHttp
    | package:pub/src/source/hosted.dart 399:22                     HostedSource._fetchVersionsNoPrefetching.<fn>
    | package:pub/src/authentication/client.dart 128:20             withAuthenticatedClient
    | package:pub/src/source/hosted.dart 397:24                     HostedSource._fetchVersionsNoPrefetching
    | package:pub/src/source/hosted.dart 460:26                     HostedSource._fetchVersions
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pub/src/source/hosted.dart 458:11                     HostedSource._fetchVersions
    | dart:async/zone.dart 1406:47                                  _rootRunUnary
    | dart:async/zone.dart 1307:19                                  _CustomZone.runUnary
    | package:pub/src/rate_limited_scheduler.dart 85:27             RateLimitedScheduler._processNextTask.runJob
    | package:pub/src/rate_limited_scheduler.dart 88:24             RateLimitedScheduler._processNextTask
    | package:pool/pool.dart 127:28                                 Pool.withResource
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pool/pool.dart 125:20                                 Pool.withResource
    | package:pub/src/rate_limited_scheduler.dart 134:37            RateLimitedScheduler.schedule.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 204:15  StackZoneSpecification._run
    | package:stack_trace/src/stack_zone_specification.dart 114:48  StackZoneSpecification._registerCallback.<fn>
    | dart:async/zone.dart 1390:47                                  _rootRun
    | dart:async/zone.dart 1300:19                                  _CustomZone.run
    | dart:async/zone.dart 1208:7                                   _CustomZone.runGuarded
    | dart:async/zone.dart 1248:23                                  _CustomZone.bindCallbackGuarded.<fn>
    | package:stack_trace/src/stack_zone_specification.dart 204:15  StackZoneSpecification._run
    | package:stack_trace/src/stack_zone_specification.dart 114:48  StackZoneSpecification._registerCallback.<fn>
    | dart:async/zone.dart 1398:13                                  _rootRun
    | dart:async/zone.dart 1300:19                                  _CustomZone.run
    | dart:async/zone.dart 1208:7                                   _CustomZone.runGuarded
    | dart:async/zone.dart 1248:23                                  _CustomZone.bindCallbackGuarded.<fn>
    | dart:async/schedule_microtask.dart 40:21                      _microtaskLoop
    | dart:async/schedule_microtask.dart 49:5                       _startMicrotaskLoop
    | dart:isolate-patch/isolate_patch.dart 123:13                  _runPendingImmediateCallback
    | dart:isolate-patch/isolate_patch.dart 193:5                   _RawReceivePort._handleMessage
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1321:19                                  _CustomZone.registerCallback
    | dart:async/zone.dart 1247:22                                  _CustomZone.bindCallbackGuarded
    | dart:async/schedule_microtask.dart 144:47                     scheduleMicrotask
    | package:pub/src/rate_limited_scheduler.dart 134:7             RateLimitedScheduler.schedule
    | package:pub/src/source/hosted.dart 711:39                     HostedSource.describeUncached
    | package:pub/src/source/cached.dart 35:18                      CachedSource.doDescribe
    | package:pub/src/system_cache.dart 157:58                      SystemCache.describe
    | package:pub/src/solver/package_lister.dart 192:47             PackageLister.incompatibilitiesFor.<fn>
    | dart:async/zone.dart 1398:13                                  _rootRun
    | dart:async/zone.dart 1300:19                                  _CustomZone.run
    | dart:async/zone.dart 1803:10                                  _runZoned
    | dart:async/zone.dart 1746:10                                  runZoned
    | package:pub/src/http.dart 140:10                              withDependencyType
    | package:pub/src/solver/package_lister.dart 191:23             PackageLister.incompatibilitiesFor
    | package:pub/src/solver/version_solver.dart 371:42             VersionSolver._choosePackageVersion
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pub/src/solver/version_solver.dart 335:19             VersionSolver._choosePackageVersion
    | package:pub/src/solver/version_solver.dart 97:24              VersionSolver.solve.<fn>
    | ===== asynchronous gap ===========================
    | dart:async/zone.dart 1328:19                                  _CustomZone.registerUnaryCallback
    | package:pub/src/solver/version_solver.dart 97:18              VersionSolver.solve.<fn>
    | dart:async/zone.dart 1398:13                                  _rootRun
    | dart:async/zone.dart 1300:19                                  _CustomZone.run
    | dart:async/zone.dart 1803:10                                  _runZoned
    | dart:async/zone.dart 1746:10                                  runZoned
    | package:pub/src/source/hosted.dart 1264:20                    HostedSource.withPrefetching.<fn>
    | package:pub/src/rate_limited_scheduler.dart 110:28            RateLimitedScheduler.withPrescheduling
    | package:pub/src/source/hosted.dart 1263:29                    HostedSource.withPrefetching
    | package:pub/src/solver/version_solver.dart 93:40              VersionSolver.solve
    | package:pub/src/solver.dart 44:5                              resolveVersions
    | package:pub/src/entrypoint.dart 353:16                        Entrypoint.acquireDependencies.<fn>
    | package:pub/src/log.dart 435:18                               progress
    | package:pub/src/entrypoint.dart 351:26                        Entrypoint.acquireDependencies
    | package:pub/src/command/get.dart 60:22                        GetCommand.runProtected
    | package:pub/src/command.dart 190:45                           PubCommand.run.<fn>
    | dart:async/future.dart 302:31                                 new Future.sync
    | package:pub/src/utils.dart 111:12                             captureErrors.wrappedCallback
    | package:stack_trace/src/chain.dart 97:24                      Chain.capture.<fn>
    | dart:async/zone.dart 1398:13                                  _rootRun
    | dart:async/zone.dart 1300:19                                  _CustomZone.run
    | dart:async/zone.dart 1803:10                                  _runZoned
    | dart:async/zone.dart 1746:10                                  runZoned
    | package:stack_trace/src/chain.dart 95:12                      Chain.capture
    | package:pub/src/utils.dart 124:11                             captureErrors
    | package:pub/src/command.dart 190:13                           PubCommand.run
    | package:args/command_runner.dart 212:27                       CommandRunner.runCommand
    | package:pub/src/command_runner.dart 176:24                    PubCommandRunner.runCommand
    | package:pub/src/command_runner.dart 161:20                    PubCommandRunner.run
    | package:dartdev/dartdev.dart 49:47                            runDartdev
    | /b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 11:9           main
    | dart:isolate-patch/isolate_patch.dart 293:33                  _delayEntrypointInvocation.<fn>
    | dart:isolate-patch/isolate_patch.dart 192:26                  _RawReceivePort._handleMessage
IO  : Writing 38981 characters to text file /home/slava/.pub-cache/log/pub_log.txt.
MSG : Logs written to /home/slava/.pub-cache/log/pub_log.txt.
[+26230 ms] "flutter doctor" took 26,277ms.
[   +2 ms] pub get failed
           command: "/home/slava/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color --verbose --directory snap/flutter/common/flutter/packages/flutter_tools get --example"
           pub env: {
             "FLUTTER_ROOT": "/home/slava/snap/flutter/common/flutter",
             "PUB_ENVIRONMENT": "flutter_cli:get",
             "PUB_CACHE": "/home/slava/.pub-cache",
           }
           exit code: 69
           
[   +1 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      _DefaultPub._runWithStdioInherited (package:flutter_tools/src/dart/pub.dart:468:7)
           <asynchronous suspension>
           #2      _DefaultPub.get (package:flutter_tools/src/dart/pub.dart:346:5)
           <asynchronous suspension>
           #3      PubDependencies.update (package:flutter_tools/src/flutter_cache.dart:125:5)
           <asynchronous suspension>
           #4      Cache.updateAll (package:flutter_tools/src/cache.dart:677:9)
           <asynchronous suspension>
           #5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1376:7)
           <asynchronous suspension>
           #6      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1257:27)
           <asynchronous suspension>
           #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #8      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
           <asynchronous suspension>
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
           <asynchronous suspension>
           #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #14     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>
           
           
[ +105 ms] ensureAnalyticsSent: 105ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 69
@jonasfj
Copy link
Member

jonasfj commented May 11, 2023

Was trying to add a cert as recommended #1882 (comment), but it changed nothing.

Why would you need to add a certificate?

TLS aims to ensure that you are talking to our server pub.dev.

Some people have software/proxies that intercept their TLS connections. But unless you know that you have this, or have an IT admin telling you to install a custom certificate, I'm not sure why this would be necessary.

@jonasfj jonasfj added the needs-info Additional information needed from the issue author label May 11, 2023
@SlavaSkvortsov
Copy link
Author

I'm not sure why this would be necessary.

Yeah, neither am I, I just wanted to show that I tried many options to solve the issue, even as weird as this one. None of them helped. If I'm running it w/o any cert specified I get the same result

@github-actions github-actions bot removed the needs-info Additional information needed from the issue author label May 19, 2023
@sigurdm
Copy link
Contributor

sigurdm commented Jun 1, 2023

Can you try running: https://github.com/dart-lang/pub-dev/blob/master/app/bin/tools/check_domain_access.dart and post the output? That will hopefully give us more information about your network.

@sigurdm sigurdm added the needs-info Additional information needed from the issue author label Jun 1, 2023
@github-actions
Copy link

Without additional information we're not able to resolve this issue. Feel free to add more info or respond to any questions above and we can reopen the case. Thanks for your contribution!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2023
@fengjiongmax
Copy link

Hello, I'm having similar issues, and this is the result of running check_domain_access.dart

Testing host resolves...
- pub.dev IPv4 resolve and connect succeeded: 4 / 4
- pub.dev IPv6 resolve and connect succeeded: 4 / 4
- pub.dartlang.org IPv4 resolve and connect succeeded: 1 / 1
- pub.dartlang.org IPv6 lookup failed: SocketException: Failed host lookup: 'pub.dartlang.org' (OS Error: 不知道这样的主机。
, errno = 11001)
- storage.googleapis.com IPv4 resolve and connect succeeded: 3 / 3
- storage.googleapis.com IPv6 lookup failed: SocketException: Failed host lookup: 'storage.googleapis.com' (OS Error: 不知道这样的主机。
, errno = 11001)
Testing one connection per request...
Unhandled exception:
HandshakeException: Handshake error in client (OS Error:
        CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:393))
#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99:46)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142:25)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:918:54)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1047:19)
<asynchronous suspension>

不知道这样的主机 means unknown host, I'm guessing this is an DNS issue? but I can ping the domain:

> ping pub.dartlang.org

正在 Ping ghs.googlehosted.com [142.251.42.243] 具有 32 字节的数据:
来自 142.251.42.243 的回复: 字节=32 时间=29ms TTL=110
来自 142.251.42.243 的回复: 字节=32 时间=30ms TTL=110
来自 142.251.42.243 的回复: 字节=32 时间=31ms TTL=110
来自 142.251.42.243 的回复: 字节=32 时间=30ms TTL=110

142.251.42.243 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 29ms,最长 = 31ms,平均 = 30ms
> ping storage.googleapis.com

正在 Ping storage.googleapis.com [172.217.160.123] 具有 32 字节的数据:
来自 172.217.160.123 的回复: 字节=32 时间=62ms TTL=110
来自 172.217.160.123 的回复: 字节=32 时间=61ms TTL=110
来自 172.217.160.123 的回复: 字节=32 时间=64ms TTL=110
来自 172.217.160.123 的回复: 字节=32 时间=63ms TTL=110

172.217.160.123 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 61ms,最长 = 64ms,平均 = 62ms

@Harshitk-cp
Copy link

@fengjiongmax were you able to find a solution for this? getting the exact same issue.

@fengjiongmax
Copy link

@Harshitk-cp I can't recall what I did to resolve this, sorry.
Maybe you could try reinstalling Flutter? or using Flutter behind a proxy: https://stackoverflow.com/questions/65555508/use-http-proxy-in-flutter?

@dizzib
Copy link

dizzib commented Mar 24, 2025

The following resolved this TLS error for me on Alpine linux…

apk add ca-certificates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Additional information needed from the issue author
Projects
None yet
Development

No branches or pull requests

6 participants