pub upgrade issue on windows

97 views
Skip to first unread message

Daniel Davidson

unread,
Mar 20, 2015, 12:48:52 PM3/20/15
to mi...@dartlang.org
I'm trying to get dart working on windows and when I run pub I get the error below.
I was actually not able to find a file called chain.dart, so don't know where it is coming from.
My search for the error pointed me to https://code.google.com/p/dart/source/detail?r=32267
which sounds like what I'm seeing, but it was fixed on Feb 3 and I'm using:

  pub --version
  Pub 1.9.0-dev.10.10
 
Any ideas what I am doing wrong?

Thanks
Dan

```
-*- mode: compilation; default-directory: "c:/Users/dbdavidson/install/tmp/" -*-
Compilation started at Fri Mar 20 11:40:39

pub update "c:/Users/dan.davidson/install/tmp/pubspec.yaml" 
Resolving dependencies...
Invalid argument(s): Cannot create a Trace from null.
package:stack_trace/src/chain.dart 121                                                                        Chain.Chain.forTrace
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\solver\version_solver.dart 240  PubspecCache.getVersions.<fn>
dart:isolate                                                                                                  _RawReceivePortImpl._handleMessage
This is an unexpected error. Please run

    pub --trace 'update' 'c:/Users/dan.davidson/install/tmp/pubspec.yaml'

and include the results in a bug report on http://dartbug.com/new.

Compilation exited abnormally with code 1 at Fri Mar 20 11:40:40
```

Günter Zöchbauer

unread,
Mar 20, 2015, 1:11:12 PM3/20/15
to mi...@dartlang.org
Have you checked if the output with --trace contains more information?

Daniel Davidson

unread,
Mar 20, 2015, 4:35:20 PM3/20/15
to mi...@dartlang.org
I get the following output. Maybe it is related to a firewall? What is the suggested work around?

 pub --trace 'upgrade' 'pubspec.yaml'
Resolving dependencies...
Handshake error in client (OS Error: Peer's Certificate issuer is not recognized., errno = -8179)
---- Log transcript ----
FINE: Pub 1.9.0-dev.10.10

Thanks
Dan

Daniel Davidson

unread,
Mar 24, 2015, 10:24:51 AM3/24/15
to mi...@dartlang.org
Are there *any* blogs/how-tos that tell specifically how to pub update on a windows behind a firewall?

I have some Dart goodness that I can not use and would love to.

I'm on windows and I've tried to set HTTP_PROXY but I'm having no luck (maybe I'm doing it wrong). This old thread seems to indicate there are no real options: http://stackoverflow.com/questions/13849336/is-there-a-workaround-for-pub-dependency-resolution-through-proxies

Has anyone succeeded with this?
How can I run pub behind a firewall on windows?

Thanks
Dan

Günter Zöchbauer

unread,
Mar 24, 2015, 10:56:00 AM3/24/15
to mi...@dartlang.org

Daniel Davidson

unread,
Mar 24, 2015, 2:35:18 PM3/24/15
to mi...@dartlang.org
I think I am following that advice. Any ideas?


Here are my relevant settings:

    env|grep proxy
    https_proxy=https://dan.davidson:PASSWORD@PROXY:8080/
    http_proxy=http://dan.davidson:PASSWORD@PROXY:8080/
    no_proxy=localhost,127.0.0.1

Running the suggested code:


import 'dart:io';

printCertificate(cert) {
  print('${cert.issuer}');
  print('${cert.subject}');
  print('${cert.startValidity}');
  print('${cert.endValidity}');
}

main() {
  var client = new HttpClient();
  client.badCertificateCallback = (cert, host, port) {
    print('Bad certificate connecting to $host:$port:');
    printCertificate(cert);
    print('');
    return true;
  };
      .then((request) => request.close())
      .then((response) {
        print('Response certificate:');
        printCertificate(response.certificate);
        response.drain();
        client.close();
      });
}
-----------------------------------------------------------------------------------------------------------
    dart goo.dart
    Bad certificate connecting to pub.dartlang.org:443:
    CN=hq-webpx,O=XR Trading LLC,L=Chicago,ST=IL,C=US
    CN=*.dartlang.org,O=Google Inc,L=Mountain View,ST=California,C=US
    2014-09-29 10:46:58.000
    2015-09-29 10:46:58.000
    
    Response certificate:
    CN=hq-webpx,O=XR Trading LLC,L=Chicago,ST=IL,C=US
    CN=*.dartlang.org,O=Google Inc,L=Mountain View,ST=California,C=US
    2014-09-29 10:46:58.000
    2015-09-29 10:46:58.000

Running pub:

    c:\ebisu>pub --trace upgrade
    pub --trace upgrade
    Resolving dependencies...
    Handshake error in client (OS Error: Peer's Certificate issuer is not recognized., errno = -8179)
    ---- Log transcript ----
    FINE: Pub 1.9.0-dev.10.10
    IO  : Spawning "cmd /c ver" in c:\ebisu\.
    IO  : Finished ver. Exit code 0.

Daniel Davidson

unread,
Mar 24, 2015, 2:40:52 PM3/24/15
to mi...@dartlang.org
Is there some way to specify a certificate to use on windows?

Thanks,
Dan

Daniel Davidson

unread,
Mar 25, 2015, 5:33:51 PM3/25/15
to mi...@dartlang.org
Does anyone have any suggestions? A way to troubleshoot perhaps?
Reply all
Reply to author
Forward
0 new messages