Skip to content

Dartium dependency on Pub Serve makes it not start if NW proxies are in use #18964

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
scheglov opened this issue May 22, 2014 · 17 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@scheglov
Copy link
Contributor

Originally in https://code.google.com/p/dart/issues/detail?id=18847

Unfortunately, with the continuous build of May 22, our application does not work anymore (Dartium reports errors and does not start). Is there a bit more stable version available with that fix?

@a-siva
Copy link
Contributor

a-siva commented May 22, 2014

Can you be a little more specific about what error is being reported.


Added NeedsInfo label.

@scheglov
Copy link
Contributor Author

I don't know.
I hope that user from https://code.google.com/p/dart/issues/detail?id=18847 will provide more information.

@DartBot
Copy link

DartBot commented May 23, 2014

This comment was originally written by [email protected]


Hi,

I use Dart from my company's network with proxy.

When I start Dartium (Dart SDK version 1.5.0-edge.36468), then I get the error:

--- 08:58:09 Starting pub serve : hanalite-admin ---
Loading source assets... (1.6s)
Loading smoke/src/default_transformer transformers... (1.0s)
Transformer library "package:smoke/src/default_transformer.dart" not found.

In older version, pub serve was not called.
Why is pub serve called with the new version?

Best regards, Anja

@DartBot
Copy link

DartBot commented May 23, 2014

This comment was originally written by @zoechi


pub serve is the new default

@DartBot
Copy link

DartBot commented May 23, 2014

This comment was originally written by [email protected]


I think the issue is that pub serve does not work with proxies.
(we are using Windows as OS)

When I start Dartium from a network without proxies, this error does not appear, but other errors. I will open an extra bug for this.

@anders-sandholm
Copy link
Contributor

cc @munificent.
Added C7, Triaged labels.
Changed the title to: "Dartium dependency on Pub Serve makes it not start if NW proxies are in use".

@a-siva
Copy link
Contributor

a-siva commented May 23, 2014

Removed Area-Dartium label.
Added Area-Pub label.

@nex3
Copy link
Member

nex3 commented May 23, 2014

When loading transformers, "pub serve" starts a server on localhost and starts an isolate that loads its sources from that server. All the HTTP requests go through the VM, so if there's special configuration that needs to happen to make it work with proxies that's where it should go. If your proxy forbids any localhost connections, though, there may not be a solution until issue #16368 is fixed.


Removed Area-Pub label.
Added Area-VM label.

@iposva-google
Copy link
Contributor

Removed Area-VM label.
Added Library-IO, Area-Library labels.

@iposva-google
Copy link
Contributor

Bob, are you guys using "localhost" or "127.0.0.1" to connect locally to pub? In the past I have experienced issues where the latter would work in places where the name localhost wouldn't.


cc @nex3.

@nex3
Copy link
Member

nex3 commented May 23, 2014

We use "localhost" for "pub serve" and "127.0.0.1" for "pub build".

Anja: if you run "pub serve --hostname 127.0.0.1", does it work?

@anders-sandholm
Copy link
Contributor

Removed Priority-Unassigned label.
Added Priority-High, NeedsInfo labels.

@DartBot
Copy link

DartBot commented May 26, 2014

This comment was originally written by [email protected]


In my environment variables, I have set

http_proxy proxy.wdf.sap.corp:8080
https_proxy proxy.wdf.sap.corp:8080

Otherwise, pub get would not work.

With this settings, "pub serve --hostname 127.0.0.1" does not work:

c:\git\hanalite-admin>pub serve --hostname 127.0.0.1
Loading source assets... (1.2s)
Loading smoke/src/default_transformer transformers... Uncaught Error: Failure getting http://127.0.0.1:54655/packages/smoke/src/default_transformer.dart: 403 Forbidden
Stack Trace:
#­0 _httpGet.<anonymous closure>.<anonymous closure> (dart:builtin:128)
#­1 _rootRun (dart:async/zone.dart:719)
#­2 _RootZone.run (dart:async/zone.dart:862)
#­3 _BaseZone.runGuarded (dart:async/zone.dart:574)
#­4 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:385)
#­5 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:394)
#­6 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283)
#­7 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:93)
#­8 _handleDone (dart:async/stream_pipe.dart:159)
#­9 _rootRun (dart:async/zone.dart:719)
#­10 _RootZone.run (dart:async/zone.dart:862)
#­11 _BaseZone.runGuarded (dart:async/zone.dart:574)
#­12 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:385)
#­13 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:394)
#­14 _DelayedDone.perform (dart:async/stream_impl.dart:604)
#­15 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:701)
#­16 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:661)
#­17 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#­18 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#­19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:128)

(1.1s)
Transformer library "package:smoke/src/default_transformer.dart" not found

"pub serve --hostname localhost" does not work either:

c:\git\hanalite-admin>pub serve --hostname localhost
Loading source assets... (1.1s)
Loading smoke/src/default_transformer transformers... Uncaught Error: Failure getting http://[::1]:54658/packages/$pub/transformer_isolate.dart: 503 Service Unavailable
Stack Trace:
#­0 _httpGet.<anonymous closure>.<anonymous closure> (dart:builtin:128)
#­1 _rootRun (dart:async/zone.dart:719)
#­2 _RootZone.run (dart:async/zone.dart:862)
#­3 _BaseZone.runGuarded (dart:async/zone.dart:574)
#­4 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:385)
#­5 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:394)
#­6 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283)
#­7 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:93)
#­8 _handleDone (dart:async/stream_pipe.dart:159)
#­9 _rootRun (dart:async/zone.dart:719)
#­10 _RootZone.run (dart:async/zone.dart:862)
#­11 _BaseZone.runGuarded (dart:async/zone.dart:574)
#­12 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:385)
#­13 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:394)
#­14 _DelayedDone.perform (dart:async/stream_impl.dart:604)
#­15 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:701)
#­16 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:661)
#­17 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#­18 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#­19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:128)

(1:16.9s)
'Unhandled exception:
Failure getting http://[::1]:54658/packages/$pub/transformer_isolate.dart: 503 Service Unavailable
#­0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:713)
#­1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#­2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#­3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#­4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:128)'
dart:isolate-patch/isolate_patch.dart 254
            Isolate.spawnUri
e:\b\build\slave\dart-editor-win-be\build\dart\sdk\lib_internal\pub\lib\src\dart.dart 161 _isolateBuffer
dart:isolate-patch/isolate_patch.dart 221 _startIsolate.isolateStartHandler
dart:isolate-patch/isolate_patch.dart 124 _RawReceivePortImpl._handleMessage

@andersjohnsen
Copy link

Hi Anja,

It appears that your proxy intercepts localhost connections. They may need to be explicitly allowed.

Can you try adding the following to your existing environment:

  no_proxy localhost,127.0.0.1,::1

Thanks!,

  • Anders

@DartBot
Copy link

DartBot commented May 26, 2014

This comment was originally written by [email protected]


Hi Anders,
The error is now gone by setting no_proxy localhost,127.0.0.1,::1
Thanks a lot, Anja

@sgjesse
Copy link
Contributor

sgjesse commented May 26, 2014

Great to hear it is now working. For a bit of background see issue #15215, where we considered automatically adding the loopback addresses to 'no_proxy', but due to the behavior of wget and curl put that on hold.

@anders-sandholm
Copy link
Contributor

Added Fixed label.

@scheglov scheglov added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures library-io area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels May 26, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

8 participants