saschakiefer / generator-openui5

yeoman generator for OpenUI5 applications and assets
Other
64 stars 17 forks source link

Running application using connect-proxies behind a corporate proxy #66

Closed dewdad closed 10 years ago

dewdad commented 10 years ago

Hi,

Firstly, great project.

I'm attempting to run the application against the http://services.odata.org. I've commented the proxy scripts in "index.html" and uncommented the configuration for connect and livereload in "Gruntfile.js".

This is the response for oData queries: "An error has occurred: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo"}"

I imagine this is happening because I'm running behind a proxy myself. Any ideas on how to configure it to work through my corporate proxy?

js1972 commented 10 years ago

I've had no end of problems with services.odata.org. It won't work for me from a windows laptop which is why I included the mock using sinon.js. From my mac it does work; however I get further issues if I include routing in my app. For one thing it you look at services.odata.org its DNS entries don't seem to be setup right. There are issues with the ui5 provided mock OData service as well that's in the current release of the generator (it doesn't cater for all OData scenarios). I have since replaced this with my own json data which works perfectly in all scenarios. This will be part of the next release and is in the develop branch if you want to take a look.

dewdad commented 10 years ago

Thank you for the prompt response. I'll take a look at the dev branch. So a corporate proxy in your experience does not imply further configuration in connect-proxy?

js1972 commented 10 years ago

Check out this: cntlm. http://stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy/18570201#18570201

Cntlm is what I use when stuck behind a hideous corporate proxy. Depending on the proxy though it can still make things difficult. I find I still have to run npm install twice allot of times for example whereas at home everything runs flawlessly...

js1972 commented 10 years ago

Sorry... To answer : no further config for connect.

saschakiefer commented 10 years ago

Normally, it shouldn't. I'm running behind a proxy as well, and set the environment variables http_proxy, https_proxy and so on. That works pretty fine for my.

But I can reproduce your issue. When I call http://services.odata.org/Northwind/Northwind.svc/from the browser directly, I get the $metadata document back. When calling the same through the proxy (http://localhost:8081/Northwind/Northwind/Northwind.svc/), I get the error you described above... So there seems not to be a general issue with the service...

js1972 commented 10 years ago

Just notice that you have one extra "Northwind" term in your url through the proxy above..? Is that just a typo?

saschakiefer commented 10 years ago

No, the first one is the prefix configuration in my proxy configuration (pointing to http://services.odata.org/). The other two belong to the Service URL. Might not have been the best choice of names, but I just wanted to reproduce the error...

js1972 commented 10 years ago

Is this still an issue? Closing. If there's any problems please open a new issue.