Skip to content
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

[bug] Can't update meteor behind a proxy on Linux! #689

Closed
aadrian opened this issue Feb 15, 2013 · 18 comments
Closed

[bug] Can't update meteor behind a proxy on Linux! #689

aadrian opened this issue Feb 15, 2013 · 18 comments

Comments

@aadrian
Copy link

@aadrian aadrian commented Feb 15, 2013

Was trying to update meteor from 0.5.4 with:

meteor update

behind a proxy, but it seems to give all the time:

"Failed to download manifest."

This is quite unexpected since the system is setup correctly, wget and curl work too, and "npm", "bower" and all other dependency managers work without problems too behind the proxy.

Thanks in advance.

@gschmidt
Copy link
Member

@gschmidt gschmidt commented Feb 19, 2013

Thanks @aadrian! This is going to difficult to tackle without a reproduction. We will take a look at it when we get a chance but having a reproduction (maybe an EC2 instance that we can look at?) would both let us give it a high priority and would assist us in finding the problem.

Does curl https://install.meteor.com | sh still work, as a workaround?

@aadrian
Copy link
Author

@aadrian aadrian commented Feb 20, 2013

Does curl https://install.meteor.com | sh still work, as a workaround?

Of course. As I mentioned earlier, everything including else including curl, except meteor seems to work behind the proxy.

@glasser
Copy link
Member

@glasser glasser commented Feb 27, 2013

This is similar to #429.

@gotwig
Copy link

@gotwig gotwig commented Mar 22, 2013

I am still affected... What can I do?

@lukejagodzinski
Copy link

@lukejagodzinski lukejagodzinski commented Apr 18, 2013

I have the same problem. Any ideas how to make it work? I work on Ubuntu on virtual machine, can it be the problem?

@gotwig
Copy link

@gotwig gotwig commented Apr 18, 2013

jagi: no you can do anything about it :( its a bug.

@lukejagodzinski
Copy link

@lukejagodzinski lukejagodzinski commented Apr 18, 2013

Is anyone going to fix it and when? I can't work on my application, I'm stuck. I still have installed version with major security bug, so I need to update Meteor. Is there any workaround?

@awwx
Copy link
Contributor

@awwx awwx commented Apr 18, 2013

Yes, you can do something about it: create a reproduction (see gschmidt's comment above), so that the team can see what's wrong.

@lukejagodzinski
Copy link

@lukejagodzinski lukejagodzinski commented Apr 19, 2013

curl https://install.meteor.com | sh

does not work.

But what should I certainly do to help in solving problem? I'm not the pro in linux so I need some advices. However it worked for me something like 1-1.5 months ago. I didn't do anything, no changes in internet settings etc.

@lukejagodzinski
Copy link

@lukejagodzinski lukejagodzinski commented Apr 22, 2013

Any ideas? I can help but I have to know what to do.

@awwx
Copy link
Contributor

@awwx awwx commented Apr 22, 2013

Hi @jagi, I don't know if this will help or not, but here goes: for someone to create a reproduction they would need to know Linux networking, but they don't need to know anything about Meteor. So maybe you could find someone to help you who has that skill set (a friend, or at a user's group if there's one in your area, or perhaps in a forum)...

(Asking here is kind of hit-or-miss... you might get lucky and be heard here by someone who knows Linux networking and happens to also be here looking at Meteor bugs... but you may find it easier to find someone in a forum that's more specific to Linux networking).

@lukejagodzinski
Copy link

@lukejagodzinski lukejagodzinski commented Apr 23, 2013

Ok I will try to find someone but one thing puzzles me, why it stopped working? Meteor team had to make some change that causes error so they're the most skilled to fix it. As I said I didn't change anything I've just updated Meteor and from this version it doesn't work. For me it looks like there is the problem with Meteor server because I can't even install fresh copy.

@Crenshinibon
Copy link

@Crenshinibon Crenshinibon commented Apr 24, 2013

Hi. I have the same problem: "Failed to download manifest" on: meteor update.

curl https://install.meteor.com | sh

didn't work for me either. I looked in the script and there is a passage in the beginning that looks for an already installed meteor. And in case it finds one it executes: meteor update. Which results in:

"Failed to download manifest."

I downloaded the script, without executing, and deleted the first part (existing version check). Afterwards the above command worked. Well, almost. Now I have some issues regarding the placement of the executables.

@jagi: if curl is unable to download anything, look here: http://stackoverflow.com/questions/9445489/linux-curl-command-with-proxy

Update: after deletion of the old Meteor installation, the modified script worked and installed the most recent version of Meteor.

But I have problems downloading Npm modules, at least from private packages. Seems to hang on: tedious: updating npm dependencies -- tedious... I guess this has to do with the general proxy problem as well.

@spang
Copy link
Contributor

@spang spang commented Jul 19, 2013

@Crenshinibon, the reason it works if you delete the existing version check is that you're completely sidestepping the meteor launcher script, which is the failure point here.

The node "request" library doesn't support automatically setting a proxy based on env vars; all clients need to do it themselves (I've opened a discussion about this here: request/request#595). npm works properly because it sets the proxy to the system proxy before calling out to request:

https://github.com/joyent/node/blob/9da67fa5198f3c0839904ae05cbfe88c61b3ad09/deps/npm/node_modules/npmconf/config-defs.js#L260
https://github.com/joyent/node/blob/master/deps/npm/lib/utils/fetch.js#L76

Curl and wget do the same.

There seem to be only two places where the 'request' library is currently used:

➜  meteor git:(master) git grep "var request = require" 
tools/deploy.js:9:var request = require('request');
tools/files.js:15:var request = require('request');

It's probably smart to use some sort of quick wrapper around the library to set the proxy unless there's another sensible place to query for the system proxy just once, though.

It's easy to globally set a default proxy with request as such, as well:

var request = require('request');
request = request.defaults({proxy: process.env.https_proxy});
@Crenshinibon
Copy link

@Crenshinibon Crenshinibon commented Jul 23, 2013

@spang, thanks for the clarification. I will try to go with the wrapper until a built-in solution is available.

Maybe I could change the "request" package itself to use the system proxy by default. Do you know where the NPM packages, that Meteor uses, are located? I looked through the folder structure but couldn't find it at first glimpse.

Found it:
~/.meteor/tools/latest/lib/node_modules/request
~/.meteor/tools/latest/lib/node_modules/npm/node_modules/request

@n1mmy
Copy link
Member

@n1mmy n1mmy commented Sep 27, 2013

Thanks for the pointers, @spang! That was really helpful.

Implemented on devel in 3177d9a

@daxpablo
Copy link

@daxpablo daxpablo commented Sep 18, 2015

That's what worked for me:

export HTTP_PROXY="http://user:password@1.2.3.4:5678" && curl https://install.meteor.com/ | sh

@kenorb
Copy link

@kenorb kenorb commented May 7, 2016

Same here.

$ meteor update
Failed to download manifest.
$ curl https://install.meteor.com
curl: (35) SSL peer handshake failed, the server most likely requires a client certificate to connect

I'm not behind the proxy.

This command works fine for https: curl https://www.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet