Skip to content

polymer-dart pub build not supported behind proxy #729

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
DartBot opened this issue Jun 5, 2015 · 17 comments
Closed

polymer-dart pub build not supported behind proxy #729

DartBot opened this issue Jun 5, 2015 · 17 comments
Labels
closed-stale Closed as the issue or PR is assumed stale type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

Originally opened as dart-lang/sdk#15161

This issue was originally filed by [email protected]


  1. Create a new polymer library web application in DartEditor with sample content
  2. either Build Polymer App from DartEditor (pub build --no-minify) or run 'pub build' from the command line

When running outside of a proxy, the build goal succeeds. When behind a corporate proxy, 'pub build' fails with an error: "Transformer library "package:polymer/transformer.dart" not found."

Dart 1.0.0.3_r30188, Mac OS X 10.8 and 10.9

Pub is able to see the proxy settings ("pub upgrade" successfully downloads dependencies) but the transformer library does not seem to respect those settings. Could this be related in any way to the IPv6 issues in [Issue #696]? (though I'm not trying to run pub serve)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


I have encountered the same issue.

Pub files and output: https://gist.github.com/xlevus/acba5f930214eff6d693

Additionally, when running pub build with blank http_proxy environment variables, it also fails.

    $ http_proxy='' https_proxy='' pub build
    Transformer library "package:polymer/transformer.dart" not found.

While

    $ env --unset=http_proxy --unset=https_proxy pub build

Works.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


And further, setting the no_proxy env var to contain IPv6 localhost addresses, does not work either.

$ no_proxy="localhost,127.0.0.0/8,::1,[::1]" pub build
Transformer library "package:polymer/transformer.dart" not found.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Pub doesn't explicitly handle any proxy configuration; it just calls dart:io and dart:isolate and lets those libraries do the low-level work.

The problem here is that pub starts a server that serves Dart code, then spawns an isolate that imports this Dart code. Apparently this isn't working when a proxy is active. I've filed issue dart-lang/sdk#15215 to track the issue in the underlying libraries.


Marked this as being blocked by dart-lang/sdk#15215.

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) Priority-Medium closed-stale Closed as the issue or PR is assumed stale labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #768 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1343914?v=3" align="left" width="48" height="48"hspace="10"> Comment by sgjesse


After looking further into this the 'no_proxy' setting in comment #­2 is wrong. The syntax 127.0.0.0/8 is not supported. Use 127.0.0.1 instead:

$ no_proxy="localhost,127.0.0.1,::1,[::1]" pub build

Should work.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


I'm having the same issue with 'Transformer library "package:observe/transformer.dart" not found.', but I'm not behind a proxy. My code works fine in dartium, run alone or with the dart-editor, but when I try to "pub build" on the command line, it fails with the aforementioned "not found" error. Very confused, because the file is obviously there. Here's the output of my pub build -v: http://sprunge.us/AJRI

I've also attached it to this message.

There are some warnings in there.


Attachment:
build.log (136.80 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


Oh, and for reference, here's my example project: https://github.com/wulftone/tabby-element/

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


@trevor, I'm not seeing any errors in either of those logs. Am I missing something?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


This looks like it might be stale. Is anyone on this thread still having problems?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added AssumedStale label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


hi i am seeing the same error on window
Pub build failed, [1] Transformer library "package:observe/transformer.dart" not found.

with Dart Editor version 1.2.0.release behind a proxy.

code works fine in dartium but cannont build and run as javascript.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


Hi. I saw the same in dart 1.3...without a proxy...
pub serve
Loading source assets... (0.8s)
Loading di transformers... (0.8s)
Transformer library "package:di/di.dart" not found.

Turns out my pub cache (AppData\Roaming\Pub\Cache) was corrupt (because I once was behind a proxy), and removing it solved the problem.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


It's not stale. Still having some problems, probably related to that proxy issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


It sounds from issue dart-lang/sdk#15215 that the solution is to disable the proxy when using pub by setting the environment variable "no_proxy=localhost" when invoking pub.

@trevor
Copy link

trevor commented Jun 5, 2015

@munificent 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-stale Closed as the issue or PR is assumed stale type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants