mohansn / quorastuff

9 stars 9 forks source link

App fails to get data. #4

Closed piyushlahoti closed 9 years ago

piyushlahoti commented 9 years ago

On entering the quora profile url in "http://www.quora.com/My-Profile-Name" format an alert "Failed to get data. Please try again." is displayed. On trying numerous times, the same alert message is displayed. Internet is functioning properly and the Quora session is active.

kratsg commented 9 years ago

Try putting in just "My-Profile-Name" rather than the full url.

mohansn commented 9 years ago

There are no server-side errors (HTTP 200 for every request for Piyush Lahoti). Hence this must be some error on the client side. Need to investigate.

piyushlahoti commented 9 years ago

"My-Profile-Name" format also gives the same error. I've tried Google Chrome and Mozilla Firefox and the response is same in both. However, I am currently connecting to internet via a restrictive proxy server which might be the reason of this problem. I'll try w/o proxy server and update soon.

kratsg commented 9 years ago

If you're using Chrome, go ahead and open up the console and see what the network looks like when you make the request.

piyushlahoti commented 9 years ago

Oh yes!! It's working w/o the proxy server.

kratsg commented 9 years ago

@piyushlahoti - the proxy server would not affect the results... The backend is making requests on behalf of you, not through you.

piyushlahoti commented 9 years ago

Very true @kratsg. What can be the other possible reasons? Also, the console does not display any messages. I think it must mean a HTTP 200.

kratsg commented 9 years ago

No, you need to click the Network tab and see what requests are happening and the responses.

piyushlahoti commented 9 years ago

All GET methods receive a HTTP 200 status.

kratsg commented 9 years ago

Are you using the proxy still?

piyushlahoti commented 9 years ago

No. Directly connected to the network.

kratsg commented 9 years ago

Then obviously we can't trace your error...

mohansn commented 9 years ago

Thanks @kratsg !

piyushlahoti commented 9 years ago

@kratsg While using the proxy, a GET request to "http://quorastuff.appspot.com/getdata?user=http%3A%2F%2Fwww.quora.com%2FPiyush-Lahoti&async=false" gives a redirection(HTTP 307) status message and further the GET request to redirected URL gives empty response error.

piyushlahoti commented 9 years ago

However, directly copying the URL on my browser returns a JSON with all the relevant data. I still think this a problem due to the proxy I am using.

kratsg commented 9 years ago

@piyushlahoti The 307 is a server thing. It must mean google appspot doesn't like it. Does http://quora-pie-chart.herokuapp.com/ give you an issue on the proxy at all?

piyushlahoti commented 9 years ago

The herokuapp link is working perfectly.

kratsg commented 9 years ago

Ok, it's because of the DNS associated with the proxy forcing the temporary redirect.

piyushlahoti commented 9 years ago

But it should have given an empty response error when I directly copied the link into the browser, shouldn't it? That would have made the behavior consistent in both the cases.

kratsg commented 9 years ago

^Nope. 307 requires you send a specific set of headers from the previous request so the server tracks you.

mohansn commented 9 years ago

@piyushlahoti : I can't see any 307 errors in the server logs.

piyushlahoti commented 9 years ago

quoraapperror