-
Notifications
You must be signed in to change notification settings - Fork 199
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
Issue on the post-install script behind corporate proxy #945
Comments
It was the sauce-connect-launcher that doind a simple https request in function fetchAndUnpack(options, callback) {
var req = https.request({
host: "saucelabs.com",
port: 443,
path: "/downloads/" + getArchiveName()
}); and I don't if the standard https module honor the HTTP_PROXY , HTTPS_PROXY and NO_PROXY system env. |
I found a ticket about this subject : bermi/sauce-connect-launcher#26 |
I have the same problem with my proxy at work. After reading the ticket mentioned above, I've put up this workaround:
|
I am also hitting this same error, also behind a firewall but with working proxy settings for npm (meaning I have no problems installing other modules from the standard registry). Tried the workaround @sylvainemery provided above, but it did not solve the problem for me. One thing to double check... after installing sauce-connect-launcer, I did not have an |
Hi @sbryan, You're right, the |
OK, so I did the right thing, and yet, it behaves as if it still can't find sauce-connect and tries to download it again... meaning it still does this:
I did notice that when I grabbed the prebuilt sc module from the URL provided in an earlier comment, what I got was the latest version (4.3.6) but the sauce-connect-launcher seems to want an earlier version (4.3.5)... so, I found and unzipped that one instead (removing the 4.3.6 version) into the There must be something I'm missing or doing wrong as it seems like wct-sauce (or sauce-connect-launcher?) is just not finding the pre-built sc binary... ideas? As further data points, this morning I tried installing when not behind the proxy/firewall (actually, I tried installing web-component-tester, which is my real goal here). It got past the timeout (still pre-fetching sauce-connect, despite having it installed), but now web-component-tester install fails:
Note the This is probably now an issue I should bring up in web-component-tester repo, not here. Never-the-less, installation of wct-sauce from behind a proxy still remains broken, or, more diagnosis and explicit instructions on exactly where (local, global for user, system global) to install sauce-connect-launcher (and pre-built sc module) so that wct-sauce postinstall.sh will not trigger an attempt to fetch it again. I'm happy to provide any more details on my env or commands used if it will help, just let me know what info is needed. One possibly relevant piece of data is that I am using nvm (node version manager) to juggle between versions of node, so when I do install modules globally, they actually end up installed in |
@sbryan, have you tried installing sauce-connect-launcher and wct-sauce directly and not via web-component-tester? Also, I've installed web-component-tester on my MBP at home, without proxy, and I have not encountered your error. Maybe it is related to nvm. |
It would help if the postinstall.js had the sauce-connect-launcher download() call in a try/catch (or maybe wct-sauce becomes an optional dependency...not sure if that solves the issue). It seems unstable over proxies, at least, so If it errors out due to a connection issue npm can still proceed and it doesn't bomb the whole web-component-tester install. This appears to be the intention judging by the console log messages after the call to download(), but there are lots of ways the download() can blow up and not be handled. |
Yes. sauce-connect-launcher does not complain... installs fine, but does not attempt to build or fetch the native sauce-connect module. Direct install of just wct-sauce fails as I described above, same as when being installed as a dependency of web-component-tester. When I can, I'll try to isolate nvm from the equation to see if it's the related. |
It would be even nicer if web-component-tester did not require wct-sauce :/ Seems odd that it is required to me, especially since it is a plug-in. That's a feature request for web-component-tester though, not a bug of wct-sauce... |
I completely agree, and this plugins cause me a lot of trouble in order to validate for using it in my company. In assurance company, I could select a tool only if it guarantee the Business Continuity Plan (BCP), and the non installation in case of no internet connectivity is a blocking point for my company use case. And this break this rules, because the install of dev environment of the project fail for an optional plugins. In any case, the good way to solve this problem is not using the http.request and to create the npm dependencies this the various ArchiveName that wtc-saucer have to download. |
I have open an issue on |
This seems to be working now/atm? Can anyone please confirm? |
I found the phamtomjs that do download with proxy management function getRequestOptions(conf) {
var strictSSL = conf.get('strict-ssl')
if (process.version == 'v0.10.34') {
console.log('Node v0.10.34 detected, turning off strict ssl due to https://github.com/joyent/node/issues/8894')
strictSSL = false
}
var options = {
uri: downloadUrl,
encoding: null, // Get response as a buffer
followRedirect: true, // The default download path redirects to a CDN URL.
headers: {},
strictSSL: strictSSL
}
var proxyUrl = conf.get('https-proxy') || conf.get('http-proxy') || conf.get('proxy')
if (proxyUrl) {
// Print using proxy
var proxy = url.parse(proxyUrl)
if (proxy.auth) {
// Mask password
proxy.auth = proxy.auth.replace(/:.*$/, ':******')
}
console.log('Using proxy ' + url.format(proxy))
// Enable proxy
options.proxy = proxyUrl function requestBinary(requestOptions, filePath) {
var deferred = kew.defer()
var count = 0
var notifiedCount = 0
var writePath = filePath + '-download-' + Date.now()
console.log('Receiving...')
var bar = null
requestProgress(request(requestOptions, function (error, response, body) {
console.log('');
if (!error && response.statusCode === 200) { |
I'm seeing this today too, so it seems like it is still current. |
Completely agree! I left it as a hard dependency so that it would not break compatibility with existing users who are expecting that. I hope to drop it as a dependency in 3.0 of WCT (or at least mark it as an |
This would be a good feature to request over at https://github.com/bermi/sauce-connect-launcher |
I'm hitting this again today. I ended up installing on the internet and copying it via usb flash drive. It's a bit difficult to see if there's a workaround in this thread...could someone tell me if there is a way to make this work? |
Workaround: bermi/sauce-connect-launcher#26 (comment) |
Also, later versions of sauce-connect-launcher don't try to download sauce-connect on |
FWIW, in case it helps anyone else, to fix it for me, I had to unzip sauce-connect-launcher (master.zip) to : node_modules/web-component-tester/node_modules/wct-sauce/node_modules/sauce-connect-launcher/sc |
Is there any progress on this issue? It's a real pain to have to workaround this problem. |
+1 |
+1 please fix |
+1 please fix it |
+1 still have problem. please fix it |
Any update on this yet, The work around does not seem to work for me. |
+1 You seriously need to fix this, please |
I've reviewed the sauce-connect-launcher plugin for what options I could use with wct-sauce, but there are few. There are two workarounds right now for restricted environments:
I'm going to request that sauce-connect-launcher be able to take an arbitrary system path to the sauce connect executable, so that the same mechanisms for starting and stopping the tunnel can be used, but requires less arcane file placement than the first option. |
What no love for proxys?
|
sauce-connect-launcher@0.15.1 has added support for http_proxy and https_proxy environment variables and could potentially solve this issue. |
awesome! Will give it a go. |
@bermi I have tried all the suggestions mentioned within this thread (even downloaded the sauce-connect-launcher manually to configure with the wct-sauce) but I still get no 🎲... Is there another workaround? |
@azakus Are you still on this? According to this PR, a simple version bump of |
hitting this too. come on guys, #17 seems to be a simple fix. thanks for the project! please accept the PR to help us move on. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Dead project |
On Ubuntu 13.04, behing a corporate proxy I have this error (same as https://github.com/Polymer/wct-sauce/issues/3 ) :
They a way to activate a verbose mode, in order to check the correct reading of system env http_proxy, https_proxy, no_proxy?
The text was updated successfully, but these errors were encountered: