I see the following when running angular scenario tests:
info (Chrome 22.0): Connected on socket id d3eUh0FBtoVaT-CdRlHB
Chrome 22.0: Executed 2 of 7
Chrome 22.0: Executed 3 of 7
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
Chrome 22.0: Executed 5 of 7
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
Chrome 22.0: Executed 7 of 7 SUCCESS (1.134 secs / 0.988 secs)
You can use angular-phonecat to repro the issue.
I think that the issue is that the app initiates multiple requests per test that are proxied via the built in proxy. Most of the requests are for asset files (images) and some of these get handled by the proxy only after the test is done. At this point, the browser navigates (within the iframe) to a new page and cancels all the pending requests. Proxy then freaks out because it has all these requests mid-flight and issues a warning log.
Since this particular scenario is harmless, I would reclassify the log as debug instead of warn
I have this exact same issue. The warning is not printed when I run the test standalone, however, it is when I run the entire test suite:
WARN [proxy]: failed to proxy test/assets/generic.jpg (socket hang up)
WARN [proxy]: failed to proxy test/assets/generic.jpg (socket hang up)
WARN [proxy]: failed to proxy test/assets/generic.jpg (socket hang up)
I am still facing this issue
WARN [proxy]: failed to proxy /images/terremark.png (socket hang up)
Just figured it out:
...
files: [
{pattern: 'www/lib/angular-i18n/angular-locale_en.js', watched: false, included: true, served: true, nocache: false}],
proxies: {
'/lib/angular-i18n/': '/base/www/lib/angular-i18n/'
},
...
the /base/ at the begging of the proxie values was what was missing for me
/base/ doesn't work either. Also, why? Where does it say everything is served from /base/www?
I tried to be clever and map proxies to the regular node-paths conventions, but ./dir caused the issue and /dir without the dot fixed it for me.
So I replaced:
...
proxies: {
'/images':'./dist/images'
},
...
to:
...
proxies: {
'/images':'/dist/images'
},
...
and Ta-Dah! the annoying message is gone.
Most helpful comment
Just figured it out:
the
/base/at the begging of the proxie values was what was missing for me