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

Could not get any response cause - Error: Parse Error #5704

Closed
testica opened this issue Jan 2, 2019 · 9 comments
Closed

Could not get any response cause - Error: Parse Error #5704

testica opened this issue Jan 2, 2019 · 9 comments

Comments

@testica
Copy link

testica commented Jan 2, 2019

I am fetching a JSON, but postman show me the message "Could not get any response" and postman console show:

image

To Reproduce
Steps to reproduce the behavior:

  1. Set Url and select GET method
  2. Click on Send
  3. See error

Expected behavior
Json response:

[{"ssid":"Medux","signal":4},{"ssid":"tpm_c_plus","signal":4},{"ssid":"Tufts Skidmore Students","signal":4},{"ssid":"Tufts Skidmore Students 5Ghz","signal":4},{"ssid":"WIFI_PLUS","signal":4}]

App information:

  • App Type: Native App
  • Postman Version: 6.6.1
  • OS: macOS Mojave 10.14.2

Additional Information:
I make the same request from curl and postman chrome extension and it works. The issue happens in the native app.

@numaanashraf
Copy link
Member

@testica Is there a publicly accessible endpoint we could use to replicate this?

@testica
Copy link
Author

testica commented Jan 3, 2019

@numaanashraf no, sorry. It's a private local service.
From curl:
image

From postman chrome extension:
image

@numaanashraf
Copy link
Member

@testica Thanks. Could you share the request and response headers from curl or postman chrome extension?

@testica
Copy link
Author

testica commented Jan 3, 2019

@numaanashraf
For request headers I am not specifying one.

For response headers:

connection → close
content-length → 1308
content-type → text/html 

@pvgomes
Copy link

pvgomes commented Feb 19, 2019

I know that my error is not exactly the same, but only for information usually its a webserver or app response headers problem.

For example, I configure my webserver to accept CORS according to enable-cors.org, everything is working fine through curl and browser but not in postman.
screen shot 2019-02-19 at 8

So I decided to check response header
curl -I http://www-development.mydomain.com.br/customer-api/ping
I saw a strange header:
GET,: POST, OPTIONS
It should be something like this:
Access-Control-Allow-Methods: GET, POST, OPTIONS

Basically I changed the webserver configuration and now Postman is able to parse my application response headers, the bug is in parse response.

This is my context:
Nginx webserver
Configuration CORS

Like I said, its just to show from us(customer users) that usually is our side issue (webserver response), but would be great if the postman console error shows more information.

@nochecksum
Copy link

I had misconfigured strict transport HTTP headers in my response which caused the "Error: Parse Error" in Postman. I had to use third party tools to debug this though, I sure would love plaintext request/response output with this error in the console to help me.

Additionally the user friendly message says "There was an error connecting to..." which suggested to me a network or DNS problem at first. Perhaps this could be more generic.

@ghostravenstorm
Copy link

Having this same problem with a custom C++ server.
This is the response I'm sending using std::ostringstream:
`
std::ostringstream oss;
std::string body;
body += "Test successful!\n";
oss << "HTTP/1.1 200 OK\r\n";
oss << "Content-Type: text/plain\r\n";
oss << "Content-Length: ";
oss << body.length();
oss << "\r\n\r\n";
oss << body;

std::string output = oss.str();
int size = output.size() + 1;
SendToClient(clientSocket, output.c_str(), size);
`

Firefox receives this just fine, but Postman give me the same parse error mentioned here.

@shamasis
Copy link
Member

shamasis commented Oct 31, 2019

Hi everyone. Apologies for jumping in late. Parse Error can be reached due to a failure from multiple flows. We are tracking some edge cases where we get parse error, but not sure if the ones mentioned here map on to those. "Works in browser X" is not helping us isolate what exactly the issue is.

I would love to have this tested via getting access to a shareable collection and either a publicly available server or a simple node/python code snippet that emulates this locally.

@shamasis
Copy link
Member

shamasis commented Nov 7, 2019

Hi all, especially @testica @ghostravenstorm @pvgomes,

I am closing this issue for now. Two reasons:

  1. Our error messages "Could not get response" and "Parse Error" is too generic to directly determine the cause or debug the issue without a deep discussion. We are working hard to make this experience better. Our first step was to make the Postman Console show deep details. Next on cards is to segregate between requesting issues and response receiving issue. Then we will provide more detailed info on the parse errors and receiving errors.

  2. This issue should have been curated by us or closed much earlier since a number of others will face the same issue titled "parse error". It has been a while since we got into a dialogue with the ones facing issues in this thread to get more details on how to reproduce the errors. (Apoliogies again.)


My hunch is that @testica, the server that is returning response is a device that is behaving slightly non-compatible with general HTTP cases handled by Postman. I will be happy to get into more detailed discussions to debug this. In case you have things that you cannot post publicly, please reach out to help@getpostman.com

@pvgomes ... your case, like you mentioned, is strange and interesting. Can you file a separate issue with the strange headers in question. An easy way for you to help us make it reproducible is make the request and then replace the URL with applicable https://postman-echo.com/ url and see if it is still reproducible. If yes, then simply share the collection with us. We will definitely get it sorted.

@shamasis shamasis closed this as completed Nov 7, 2019
Runtime Triage and Development automation moved this from Pending triage to Ready Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants