dart-lang / pub

The pub command line tool
https://dart.dev/tools/pub/cmd
BSD 3-Clause "New" or "Revised" License
1.04k stars 229 forks source link

pub global activate <package> fails #1248

Closed DartBot closed 9 years ago

DartBot commented 9 years ago

Originally opened as dart-lang/sdk#22459

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


What steps will reproduce the problem?

  1. pub global activate stagehand (or grinder or tuneup, i.e. packages with executables)
  2. it also fail with pub get from darteditor. 3.

What is the expected output? What do you see instead?

--- 3:07:20 PM Auto running pub get on D:\dicom_web\api_test ... --- Resolving dependencies...

Failed to precompile tuneup:tuneup: Unhandled exception: Uncaught Error: Load Error: SocketException: OS Error: The semaphore timeout period has expired. , errno = 121, address = localhost, port = 55563 Stack Trace:

­0 _asyncLoadErrorCallback (dart:_builtin:335)

­1 _asyncLoadError (dart:_builtin:354)

­2 _httpGet.<anonymous closure> (dart:_builtin:45)

­3 _RootZone.runUnary (dart:async/zone.dart:1155)

­4 _Future._propagateToListeners.handleError (dart:async/future_impl.dart:515)

­5 _Future._propagateToListeners (dart:async/future_impl.dart:570)

­6 _Future._completeError (dart:async/future_impl.dart:366)

­7 _Future._asyncCompleteError.<anonymous closure> (dart:async/future_impl.dart:421)

­8 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)

­9 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

­10 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)

­11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)

­0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)

­1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)

­2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

­3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)

­4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)

What version of the product are you using? Dart Editor version 1.9.0.dev_08_00 (DEV) Dart SDK version 1.9.0-dev.8.0

On what operating system? Windows 7

What browser (if applicable)? N/A

Please provide any additional information below.

DartBot commented 9 years ago

Comment by iposva-google


Added Area-Pub, Triaged labels.

DartBot commented 9 years ago

Comment by nex3


I've never seen this error before. Søren, can you shed some light on what might cause it and how we can avoid it?


cc @sgjesse.

DartBot commented 9 years ago

Comment by sgjesse


From what I can find then Windows error 121 (ERROR_SEM_TIMEOUT) is an indication of some I/O timeout on the TCP connection. Are there singns of delays, or something waiting for a longer period of time before the error occurs? Does it reproduce?

DartBot commented 9 years ago

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


It fails about 30 seconds after I run $pub build --mode==debug

I've deleted my pub cache directory and I've run both stable (1.8.5) and dev (1.9.0-dev.8.0) after that and I continue to get the same error. Any idea what file it could be waiting for? Is there a way have the debugger catch this error?

DartBot commented 9 years ago

Comment by nex3


Wait, is this a problem with "pub build" or "pub global activate"?

DartBot commented 9 years ago

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


This bug should be closed. The problem turned out to be a corrupted etc/hosts file! Sorry for the noise.

DartBot commented 9 years ago

Comment by munificent


Added Invalid label.

DartBot commented 9 years ago

Comment by sgjesse


@jamesfphilbinII could you explain what the corruption in the /etc/hosts (assuming %WINDOWSDIR%\System32\drivers\etc\hosts as this is Windows) was? I would like to see how that error emerged in the IO stack.