Newbie - Getting "IO : HTTP error: | TlsException: Failure trusting builtin roots (OS Error: errno = 0)" with example dart web app.

321 views
Skip to first unread message

Manfred Usselmann

unread,
Aug 15, 2019, 9:39:06 AM8/15/19
to Dart Web Development
I've just installed the Dart sdk and tried to run the example Dart Web App in WebStorm.

I get "502 Bad Gateway" in the browser.

The event log contains:

D:\dart-sdk\bin\pub.bat global run webdev serve web:53322
No active package webdev.
Dart Webdev terminated


To analyse the problem I entered the following command in PowerShell:

pub global activate webdev -v


FINE: Pub 2.4.1
IO  : Spawning "cmd /c ver" in P:\.
IO  : Finished ver. Exit code 0.
    | stdout:
    | |
    | | Microsoft Windows [Version 10.0.16299.1268]
    | Nothing output on stderr.
MSG : Resolving dependencies...
SLVR: fact: pub global activate is 0.0.0
SLVR: derived: pub global activate
SLVR: fact: pub global activate depends on webdev any
SLVR:   selecting pub global activate
SLVR:   derived: webdev any
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: global activate
    | X-Pub-Session-ID: 4F728B31-0FFB-4DB4-A160-C6EABA56143C
    | user-agent: Dart pub 2.4.1
IO  : HTTP error:
    | TlsException: Failure trusting builtin roots (OS Error: errno = 0)
    |
    | dart:_http                                   _HttpClient.openUrl
    | package:http/src/io_client.dart 33:36        IOClient.send
    | ===== asynchronous gap ===========================
    | dart:async                                   _asyncThenWrapperHelper
    | package:http_throttle/http_throttle.dart     ThrottleClient.send
    | package:http/src/base_client.dart 169:38     BaseClient._sendUnstreamed
    | ===== asynchronous gap ===========================
    | dart:async                                   _asyncThenWrapperHelper
    | package:pub/src/solver/version_solver.dart   VersionSolver.solve
    | package:pub/src/solver.dart 35:10            resolveVersions.<fn>
    | package:pub/src/log.dart 378:18              progress
    | package:pub/src/solver.dart 32:10            resolveVersions
    | package:pub/src/global_packages.dart 183:22  GlobalPackages._installInCache
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: windows
    | X-Pub-Command: global activate
    | X-Pub-Session-ID: 4F728B31-0FFB-4DB4-A160-C6EABA56143C
    | user-agent: Dart pub 2.4.1


How can I fix this error "HTTP error: TlsException: Failure trusting builtin roots (OS Error: errno = 0)"?

I tried to solve the problem by providing the root certificate from https://github.com/dart-lang/root_certificates/blob/master/certdata.pem

$env:DART_VM_OPTIONS="--root-certs-file=D:\dart-sdk\certdata.pem"

but this didn't help either.


Reply all
Reply to author
Forward
0 new messages