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

Running Pub get or upgrade in Dart Editor on Win 2008 32 bit give Handshake error in client #17664

Closed
DartBot opened this issue Mar 20, 2014 · 17 comments
Assignees
Labels
closed-duplicate Closed in favor of an existing report library-io

Comments

@DartBot
Copy link

DartBot commented Mar 20, 2014

This issue was originally filed by BillFenderstru...@gmail.com


What steps will reproduce the problem?
1.Open Dart Editor and create a polymer wbe project
2. Select pubspec.yaml
3. Right click to select the pub get or pub upgrade in context menu

What is the expected output? What do you see instead?
Expect to see pub get importing dart package / libraries. But instead I get

--- 3:48:43 PM Running pub get ... ---
Pub get failed, [1] Resolving dependencies...
Handshake error in client (OS Error: Peer's certificate issuer has been marked as not trusted by the user., errno = -8172)
This is an unexpected error. Please run

    pub --trace 'get'

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

** Warning: Application may fail to run since packages did not get installed.Try running pub get again. **

What version of the product are you using? On what operating system?
Dart Editor ver 1.3.0.dev_04.4.1
OS: Windows 2008 Server 32 bit

Please provide any additional information below.

@keertip
Copy link
Contributor

keertip commented Mar 20, 2014

Bill,

Could you run pub --trace 'get' from the terminal and paste the trace.


Set owner to @munificent.
Added Area-Pub, Triaged labels.

@nex3
Copy link
Member

nex3 commented Mar 21, 2014

Pub doesn't do anything special with certificates anymore, but perhaps the dart:io folks may know more about this.


Removed Area-Pub label.
Added Area-IO label.

@andersjohnsen
Copy link

Hi Bill,

Can you supply some more information:

  • Run pub --trace --verbosity all upgrade, as it can tell us a bit about the URLs.
  • Are you using some sort of LDAP system?
  • Do you use a proxy?
  • Do you have problems accesing 'https://pub.dartlang.org/api/packages/args' in a browser on the machine in question?

Thanks!,

@DartBot
Copy link
Author

DartBot commented Mar 21, 2014

This comment was originally written by BillFender...@gmail.com


See attachment for response to

  • Run pub --trace --verbosity all upgrade, as it can tell us a bit about the URLs.
  • Are you using some sort of LDAP system?
  • Do you use a proxy?
  • Do you have problems accesing 'https://pub.dartlang.org/api/packages/args' in a browser on the machine in question?

Attachment:
dartbug.txt (66.27 KB)

@andersjohnsen
Copy link

Oh, can I get you to navigate to the package you are trying to fetch packages for?
  Could not find a file named "pubspec.yaml" in "C:\dart\darteditor-windows-

ia32_devchannel\dart\dart-sdk\bin

It should be the same folder as where the pubspec.yaml is located

Thanks!

@DartBot
Copy link
Author

DartBot commented Mar 21, 2014

This comment was originally written by BillFender...@gmail.com


ajohnsen
There is no specific package that I am looking for. This error, I get is from the template of creating a new web application or new polymer web project in Dart Editor. Once I create a new project and check of the generate sample content and then right click on pubspec.yaml, I get the error.

@andersjohnsen
Copy link

I'm sorry, I was not very precise.

To run 'pub upgrade' successfully, you need to be located in the directory where the pubspec.yaml file is located. Try:

  1. Open cmd.
  2. Navigate to the folder, where the pubspec.yaml from the project you created in the editor, is located.
  3. Run pub as suggested in #­3.

That should be sufficient for us to better understand what's going on.

Thanks!

@DartBot
Copy link
Author

DartBot commented Apr 24, 2014

This comment was originally written by rscottfree...@gmail.com


It doesn't look like Bill ever responded--but I'm having the same issue here--trying to go through the tutorial. I ran "pub --trace --verbosity all upgrade" and attached the output.

I don't have any issue accessing https://pub.dartlang.org/api/packages/args or https://pub.dartlang.org/api/packages/browser (referenced in the output) in my browser--no cert errors, invalid certs, etc.

The pubspec.yaml is just this:
name: avast_ye_pirates
description: Write a Dart web app code lab
dependencies:
  browser: any


Attachment:
one-hour-code-lab-error.txt (27.59 KB)

@DartBot
Copy link
Author

DartBot commented May 2, 2014

This comment was originally written by rscot...@gmail.com


This might be an issue with the network at my company somehow blocking this request. I tried it on my linux and windows machine and got the same error on both, but at home I am able to run it without issue. Would a firewall or proxy be causing the Dart Editor to fail to fetch these pub packages? Even though I can access these URLs in the browser/curl without issue?

@andersjohnsen
Copy link

Firewall rules can be per program, meaning e.g DartEditor/pub can be black-listed while your browser is white-listed.

I'm not 100% sure that is the case here, but it's possible. I'll see if I can come up with a test you can run, to check if your access indeed is blocked.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Library-IO label.

@DartBot
Copy link
Author

DartBot commented Jul 3, 2014

This comment was originally written by justin.mcfar...@gmail.com


Im having this issue as well. I've fought through my company's blocking of my access to updates by adding the environment variables and darteditor.ini additions as seen in other threads.
Once I got that working, I am now faced with this. I would suspect missing cert-chains, etc but I can go through the IDE and update Dart just fine (by specifying the proxy as before mentioned.) I would imagine that it would work just fine via pub get. Unless the Dart Editor uses an http proxy to update itself and the pub get/upgrade uses the https and there is an issue with the actual security certs (or darts handling of them).

Not to side-track too much but is there a way to download all of the standard packages that I'll need and stick them on my local machine and then have pub point to that directory? I'd hate to not get fresh libraries/packages but I'd also like to be able to compile Dart apps on my company's network.

Thanks, google!

@sgjesse
Copy link
Contributor

sgjesse commented Jul 3, 2014

Could you please try to run the following program:

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;
  };
  client.getUrl(Uri.parse('https://pub.dartlang.org/api/packages/browser'))
      .then((request) => request.close())
      .then((response) {
        print('Response certificate:');
        printCertificate(response.certificate);
        response.drain();
        client.close();
      });
}

If you are behind a proxy remember to set the http_proxy environment variable as well, e.g (replacing localhost:8080 with your proxy).

On Windows

set http_proxy=localhost:8080
dart test.dart

On Mac OS / Linux

$ http_proxy=localhost:8080 dart test.dart

Also see issue #18929.

@DartBot
Copy link
Author

DartBot commented Jul 3, 2014

This comment was originally written by justin.mcfa...@gmail.com


Thanks for the quick response. Here is the output with the name X'ed out.

Bad certificate connecting to pub.dartlang.org:443:
CN=XXXXXX TLS Certification Authority-1c,OU=XX,O=XXXXXXXXXXXX
XXXX,L=XXXXX,ST=XXXXX,C=US
CN=.dartlang.org,O=Google Inc,L=Mountain View,ST=California,C=US
2013-09-30 03:07:15.000
2014-09-30 03:07:15.000
 
Response certificate:
CN=XXXXXX TLS Certification Authority-1c,OU=XX,O=XXXXXXXXXXXX
XXXX,L=XXXXX,ST=XXXXX,C=US
CN=
.dartlang.org,O=Google Inc,L=Mountain View,ST=California,C=US
2013-09-30 03:07:15.000
2014-09-30 03:07:15.000

@DartBot
Copy link
Author

DartBot commented Jul 3, 2014

This comment was originally written by justin.mcfa...@gmail.com


Looking at issue #18929:
There are a number of ways this can be fixed:

  1. Add an option to 'pub get' to use HTTP instead of HTTPS.
  2. Add an option to 'pub get' to provide an alternative certificate database

Are these options available currently or do they need to be created?

Thanks!

@sgjesse
Copy link
Contributor

sgjesse commented Jul 3, 2014

The options mentioned in issue #18929 are currently not suggestions.

Merging into issue #18929.


Added Duplicate label.
Marked as being merged into #18929.

@sgjesse
Copy link
Contributor

sgjesse commented Jul 3, 2014

The options mentioned in issue #18929 are currently not suggestions.

Merging into issue #18929.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report library-io
Projects
None yet
Development

No branches or pull requests

7 participants