-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add editor proxy configuration FAQ entry #15918
Comments
This comment was originally written by daniel.glass...@gmail.com Note that, on the same hardware, in a VM (VirtualBox) running a Ubuntu 13.04 (x86_64) guest with a system-wide proxy setting, this problem does not occur. |
It sounds like your proxy is just blocking pub.dartlang.org. Can you successfully request "https://pub.dartlang.org/api/packages/args" in your browser and from a plain Dart script? Added NeedsInfo label. |
This comment was originally written by daniel.glass...@gmail.com nweiz: I have no problem fetching "https://pub.dartlabg.org/api/packages/args" from Chrome on my desktop. I've attached said file. As I commented to my own post, under a Ubuntu guest VM running on this same box that is set up with "http_proxy" and "https_proxy" set in the environment to point to the corporate proxy, "pub" is able to fetch the packages. Under Windows 7, which doesn't define those environment variables, but instead expects apps to use the registry to get the network proxy info, "pub" is unable to get the packages, as shown in my original post. A wireshark trace shows that pub is not using the proxy address (which is "xxxx.yyyyy.com:9090", where "xxxx.yyyyy.com" is the domain name of the corporate proxy), but instead trying to directly access "pub.dartlang.org:80". For security reasons, I cannot post the Wireshark capture or specify the actual name of the proxy server. Since yesterday, I've noticed that the DartEditor "update" function (on the About dialog) in my Linux guest VM cannot reach the dartlang.org to check the version either, so though I think that "pub" is working properly there, DartEditor's own access is not paying attention to the "https_proxy" or "http_proxy" environment variables. Attachment: |
I'll reassign this to the Editor, then. Removed Area-Pub label. |
Set owner to @pq. |
The proxy settings issue is pretty confusing. We cannot use the .pac files that browsers normally use as these are JavaScript code. Therefore we rely on the environment variables http_proxy and https_proxy for IO in the Dart executable (which pub uses). The DartEditor being a Java application also cannot use .pac files. In this case I think you have to set the following Java system properties when running the DartEditor: http.proxyHost https.proxyHost |
This comment was originally written by daniel.gl...@gmail.com Setting the system environment variables "http_proxy" and "https_proxy" appear to solve the "pub" issues; I now can fetch the packages from my Windows desktop. I'm not sure how to set Java system properties under Windows 7 with the Oracle JRE. The Java Configuration applet has "Use browser settings" as an option, but I did set the configuration manually. The editor is still not using the proxy when attempting to check for updates. I'm not a Windows programmer anymore, and when I was, there was no published mechanism for getting the browser proxy settings, so I can't say how other apps handle this. It is possible that they find the auto-configuration script setting and evaluate the .pac files themselves, but since the browser also permits manual configuration, I assume that that info is available too. Chrome and Chromium both are able to pull this information, since they're both working fine. For the editor, I'd suggest adding configuration settings to allow the user to manually set the proxy information when all else fails, and when that's set, use information from that to set the environment variables "http_proxy" and "https_proxy" for "pub" when it spawns that process. I would also assume that the JRE has some facility for reading system environment variables at runtime, so (in the presence of the appropriate environment variables at runtime), DartEditor could use those. I'm working on putting together a prototype browser based tool to replace a Tcl/Tk application I wrote to generate configuration files for an embedded device. The polymer stuff shows great promise in replacing some of my Tk megawidgets. I'm an ancient C programmer and am far more comfortable with the Dart environment than I am the Java or Javascript development environment. Writing it in C or C++ requires different versions for different platforms, which we don't want to support. |
This comment was originally written by daniel.gla...@gmail.com I read over issue #5455 and found a solution to the "check for update" issue. Until this stuff is automated, I'd suggest adding proxy configuration to the Dartlang.org Dart Editor FAQ. To summarize, with Dart SDK 1.0.0.10_r30798 and Dart Editor 1.0.0_r30798 (STABLE): * Setting the environment variables "http_proxy", "https_proxy" and "no_proxy", as shown below, allows 'pub' to install packages (replace '9090' with the appropriate port for your proxy): * To enable the Dart Editor to check for updates, add the following to your "DartEditor.ini" file: |
Thanks Daniel! I think an FAQ entry is definitely in order (and overdue). Bouncing over Kathy to help us get that routed. Kathy: would you prefer a new case or can we repurpose this one? Set owner to @kwalrath. |
Oops, missed this. Bouncing over to Sharon. Set owner to @Sfshaza. |
You can see the new info here: Reviewed by Nathan and Phil. Added Fixed label. |
This issue was originally filed by daniel.gla...@gmail.com
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expect 'package:polymer/builder.dart' and other associated files from the "polymer" package to be downloaded and installed, and to be able to run the samples from the Dart Editor.
What I observe is that after a long wait, I get a number of errors that look like the following in the "Output" tab in the Dart Editor:
--- Jan 6, 2014 2:06:15 PM Running pub get ... ---
Pub get failed, [1] Resolving dependencies...Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
......Error in PubHttpClient.send (issue #12581) error: SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
stacktrace: #0 PubHttpClient.send (file:///e:/b/build/slave/dart-editor-win-stable/build/dart/sdk/lib/_internal/pub/lib/src/http.dart:60)
1 BaseClient._sendUnstreamed.<anonymous closure> (package:http/src/base_client.dart:118)
2 _Future._propagateToListeners.<anonymous closure> (dart:async/future_impl.dart:453)
3 _rootRun (dart:async/zone.dart:683)
4 _RootZone.run (dart:async/zone.dart:823)
5 _Future._propagateToListeners (dart:async/future_impl.dart:445)
6 _Future._complete (dart:async/future_impl.dart:303)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
8 _asyncRunCallback (dart:async/schedule_microtask.dart:18)
9 _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:11)
10 _Timer._createTimerHandler._handleTimeout (timer_impl.dart:151)
11 _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:166)
12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:93)
Got socket error trying to find package "args" at https://pub.dartlang.org.
SocketException: Connection failed (OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060), address = pub.dartlang.org, port = 443
** Warning: Application may fail to run since packages did not get installed.Try running pub get again. **
(see "dart_editor_output.txt", attached, for more examples)
I would include the output from the "Problems" window, but I can't find where the data for the Problems and Output windows is stored.
What version of the product are you using? On what operating system?
Dart Editor version 1.0.0_r30798 (STABLE)
Dart SDK version 1.0.0.10_r30798
Microsoft Windows 7 Enterprise Edition
Please provide any additional information below.
There appears to be no setting available under preferences for HTTP proxy setting. I also get "Unable to get latest revision" after it does "Checking for updates".
Attachment:
dart_editor_output.txt (95.11 KB)
The text was updated successfully, but these errors were encountered: