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" on all my api calls #3127

Closed
jmbremmer opened this issue Jun 6, 2017 · 70 comments
Closed

"Could not get any response" on all my api calls #3127

jmbremmer opened this issue Jun 6, 2017 · 70 comments
Assignees

Comments

@jmbremmer
Copy link

jmbremmer commented Jun 6, 2017

I can sometimes resolve the issue by restarted Postman, but that no longer seems to be working. I know that everything is correct because when I run it in terminal via cURL, it works fine. Also, I do have ssl cert verification turned off

  1. Postman Version:
    Version 4.11.1 (4.11.1)
  2. App (Chrome app or Mac app):
    Mac app
  3. OS details:
    Version 10.11 (15A284)
  4. Is the Interceptor on and enabled in the app:
    Not sure
  5. Did you encounter this recently, or has this bug always been there:
    Happens frequently over the last few months
  6. Expected behaviour:
  7. Console logs (http://blog.getpostman.com/2014/01/27/enabling-chrome-developer-tools-inside-postman/ for the Chrome App, View->Toggle Dev Tools for the Mac app):
    Nothing in the logs
  8. Screenshots (if applicable)
    screen shot 2017-06-06 at 2 53 06 pm
@numaanashraf
Copy link
Member

@jmbremmer Could you open Postman Console from the View menu, resend the request and send us a screenshot?

@jmbremmer
Copy link
Author

screen shot 2017-06-07 at 9 41 15 am

@jmbremmer
Copy link
Author

So I believe I have fixed the issue by turning off "Automatically follow redirects". Not sure why that fixes the issue, but so far my requests are going through as expected now.

@NyanHelsing
Copy link

NyanHelsing commented Jun 9, 2017

I have this same issue, though turning off automatically follow redirects did not solve the issue. the request seems to work on the chrome app version, 4.11 on both

@sdnts
Copy link

sdnts commented Jun 12, 2017

@jmbremmer Could your service be redirecting to a URL that was problematic? That might explain why it was temperamental.

@birdbrained Usually when you get this error, you'd want to check your service to see if it is behaving properly (maybe check a status endpoint).

Also, do you guys have a request timeout set? That might also explain the intermittent failures.

@RaziMailk
Copy link

RaziMailk commented Jul 28, 2017

I have this same issue, though turning off automatically follow redirects did not solve the issue? here is my console
post man issue

after some time it show this

postman1

data sent through post is arrived on server. But could not get any response from server.

@brempusz
Copy link

brempusz commented Aug 16, 2017

I disabled "Send Postman Token Header" in options and the issue is gone. I use custom header 'X-Auth-Token' - I guess there is some kind of conflict with 'Postman-Token' header. My Postman version: v5.1.3, Windows 10.

@zabbarob
Copy link

zabbarob commented Sep 17, 2017

I had the same issue. It was caused by a newline at the end of the "Authorization" header's value, which I had set manually by copy-pasting the bearer token (which accidentally contained the newline at its end)

@davorpeic
Copy link

We also had similar issues, and it was really strange because on my mac it was working fine, and on other mac it was giving "Could not get any response", both same 5.2.0 version.

So I think the issue was that I was using independent postman.app downloaded from website, and other mac was using Google Apps version as that versions doesn't have Postman Console in the View. We downloaded standalone app and now it is working..

Hope it helps.

@prashantagarwal
Copy link

Guys I am closing this issue because I think the bug is not related to Postman. If you feel its a bug in Postman feel free to reopen this issue.

@ocmyhome
Copy link

ocmyhome commented Oct 4, 2017

I'm running into this same issue. I've tried the solutions provided above, but none work. vers. 5.2.1

From what I can tell, it's specific to Postman, as I have to rely on Fiddler to actually see the response coming back from our app.

Here's the response, captured by fiddler, that isn't displayed in Postman. Maybe something sticks out...

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, max-age=0, private
Pragma: no-cache
Content-Length: 1119
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Wed, 04 Oct 2017 21:16:04 GMT
Connection: close

{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJTUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJpc3MiOiJodHRwczovL2xvY2FsLmRlYWxlcnNvY2tldC5jb20iLCJhdWSiOiJodHRwczovL2xvY2FsLmRlYWxlcnNvY2tldC5jb20vcmVzb3VyY2VzIiwiZXhwIjoYNTA3MTU4OTY0LCJuYmYiOjE1MDcxNTE3NjQsImNsaWVudF9pZCI6ImNybV90ZXN0Iiwic2NvcGUiOlsiYXBpIiwiYmxhY2tiaXJkIiwiZW1haWwiLCJvcGVuaWQiLCPwcm9maWxlIiwic2VhcmNoIiwid3JpdGUiXSwic3ViIjoiMmMyMTZlYmUtOTEzYi00ZGEyLWI3ZTctMWRkMWU2NTZkNWUxIiwiYXV0aF90aW1lIjoxNTA3MTUxNzY0LCJpZHAiOiJpZHNydiIsImFjY291bnRfdXNlcm5hbWUiOiJhdXRvYmIxIiwiY3JtX2RlYWxlcnNoaXAiOiI5Mjg2OCIsImRlYWxlcnNoaXAiOiI5Mjg2OCIsImFkbWluX3JvbGUiOiJzc28iLCJjcm1fdXNlcm5hbWUiOiJhdXRvYmIxIiwiYW1yIjpbInBhc3N3b3JkIl19.J6-rpO3-BLkFHuT8TH-CUasJj5levZzVMH1yYYw5mx35-GreIZbK9aL13K21clbvbQjeSbnMknHRLe5agSA7OkBiMU3hL8cNj20tjGBAkjbcwanPBiKefcC9YWtX7HHFAoZlckjFXx02e_V8jNdKOmOIaFW6-mfYNSWaKi1umGGnhyelkQ4la3dXq3nyD17rshv6BMH5fAS3r2K0TI7iZRwmV-1ZjaFKl10EgFAkIgiCSh-J18eP8O72I5we9CDO5ZHFxjKbsRWpfvuvViOEV1TihXhJYU2XJpW3DEU_pRuPR7fly0Hhvbjyj3HVdEPmV3_80gojtWUlbjEnLmqSxA","expires_in":7200,"token_type":"Bearer"}

@EricZimmerman
Copy link

seeing this too in standalone app, but not in chrome extension/app

@ocmyhome
Copy link

Any insight into this issue? Postman is rendered useless for me until this can be figured out.

I have automation that runs on my same dev machine that issues the same requests w/ out a problem. It's only when using Postman when requests aren't responding in Postman properly.

I've talked to IT about whether it's our anti-virus causing issues, and we've determined it's not.

If anything, can we have access to older, Windows versions so I can troubleshoot better which version this started w/ for me?

@Ghazibelaam
Copy link

Yes I have the same issue with the stand alone version 5.3.2
the chrome app works fine.
I have noticed this issue with the chrome app if I don't open my server URI in chrome.
but now that the app is stand alone, it is doing the same. and going to chrome and putting my URI in there would not fix it of course.
I think there is some session token or something that needs to added to the headers, but since I can not see the response, then I would not know the session token returned

@ocmyhome
Copy link

I figured out what was wrong (for me), and it's completely user error and I'm an idiot.

At some point I set the timeout to some tiny amount (in ms) and some/most of my requests wouldn't respond in time. I'd love it if a Postman upgrade changed this from seconds to ms, so I can feel better about my stupidity, but I doubt that's the case...

@rankun203
Copy link

rankun203 commented Nov 1, 2017

I'm facing the same issue, local proxy shows the request responded with correct data, but Postman the standalone app didn't show it, instead, it gives an Error: socket hang up. If it's not a Postman issue, maybe it's about Electron?


Edited: In my case, if I disable the proxy setting, it works just fine.

@markozxuu
Copy link

markozxuu commented Nov 4, 2017

@numaanashraf @prashantagarwal

32371433-6f25c9ce-c056-11e7-9c5a-2ddcd22255c9

Error: socket hang up is related to mongoose.
This error occurs with the mongoose version >= 4.4.4

Solution
You have to make use of the promises to be able to connect mongoose with mongodb.
I recommend using the module bluebird.

More information about the error in mongoose

@affiliedge
Copy link

Having the same issue.
Postman app version 5.3.2
Calling a simple get request on localhost:8888.
In the browser the request is as expected.
In postman - Could not get any response

Error: connect ECONNREFUSED 127.0.0.1:8888
Request Headers:
cache-control:"no-cache"
postman-token:"07abcf74-b048-4713-a624-c7b6c65ffb5d"

@srulandhs
Copy link

Having this issue too.

Just trying to switch away from the chrome app. Have a simple WebAPI service exposing a GET method with no auth and no params.

Chrome Browser (v62) - Succeeds
Postman Chrome App (v5.3.2) - Succeeds
Postman Windows app (v5.3.2) - Fails - ECONNREFUSED

@WilliamSkyWalker
Copy link

Check your system host config. That's how I fixed this.

@mlvramesh
Copy link

Hi This issue is resolved for me.

setting ->general -> Requesttimeout in ms = 0

@EricZimmerman
Copy link

mine was set to 0 already and i am seeing it, so thats not it

@Lupeipei
Copy link

I account the same problem, I solved it by check the environment.

@maxnag
Copy link

maxnag commented Dec 5, 2017

I account with the same problem after update on Postman for Linux Version 5.4.1.
I send DELETE method and get 204 and have this error

2017-12-05 12-02-07

Answer from Nginx

172.18.0.1 - - [05/Dec/2017:09:59:11 +0000] "DELETE /api/event/1/history/3 HTTP/1.1" 204 880 "-" "PostmanRuntime/7.1.1"

@SamvelRaja
Copy link

@maxnag can you let us know the response headers you received?

@danny-stateside
Copy link

Hi. I'm also havind this issue in the windows app. Using the chrome extension works fine! :/

@chasen-bettinger
Copy link

@mapeso

I tried using your suggestion, but it didn't work for me.

Here is my code:

const Promise = require("bluebird");
const mongoose = Promise.promisifyAll(require("mongoose"));
import User from "../models/user.server.model";

const users = {
  list: (req, res, next) => {
    User.find({}, (err, users) => {
      if (err) return next(err);
      else res.status(200).json(users);
    });
  },
  create: (req, res, next) => {
    const user = new User(req.body);

    user.save(err => {
      if (err) return next(err);
      else res.status(200).json(user);
    });
  },
  read: (req, res) => {
    res.json(req.user);
  },
  userById: (req, res, next, id) => {
    User.findOne(
      {
        _id: id
      },
      (err, user) => {
        if (err) return next(err);
        else {
          req.user = user;
          next();
        }
      }
    );
  },
  update: (req, res, next) => {
    User.findByIdAndUpdate(req.user.id, req.body, {
      new: true
    }),
      (err, user) => {
        if (err) return next(err);
        else res.status(200).json(user);
      };
  }
};

export { users as default };

I keep getting

error: socket hang up

Any suggestions?

@viiicky
Copy link

viiicky commented Apr 6, 2018

I was facing the same issue. I resolved it by applying the fix no. 2 mentioned in the error message. i.e. Switching off SSL Certificate Verification.

fix

@ashishbhangade
Copy link

ashishbhangade commented Apr 11, 2018

This is postman-
errorpage

This is App.js file where i am set localhost-
jssidepage

And this is back-end sever.js file-
serverside

Sent all screen shots please show me error where i am wrong.

@SudarshanSMD
Copy link

Was facing this same issue with native app.
While testing api hosted locally, would get response from the Chrome app, while native app would give error.

Fixed it by disabling the 'SSL certificate verification' in Settings>General.
It is the 2nd option suggested in the fixes by the app itself. I overlooked it. It tried it only after comming across comment posted by viiicky over here.

image

@chrislandeza
Copy link

Also getting the same error after updating to v6.0.10
image

Here's the error on the console:

image

Any idea on this issue?

@SamvelRaja
Copy link

@chrislandeza This seems the request is going via your local proxy.
Goto, settings -> proxy and disable Use system proxy and try it again. This will bypass the proxy settings you have for your system.

@clawfrank
Copy link

Saw this or a similar issue in the desktop app upon install when using a proxy. Timeout was set to 0 by default. Changed it to 90, no change. Later noticed it was in ms, not seconds, so increased it significantly, and it started working. Set it back to 0 again and it still works.

Changed a bunch of other settings mentioned here too but always reverted them.

@Ghazibelaam
Copy link

@anreddy018
You still need to disable certificate verification and under proxy do this good luck
image

@Ghazibelaam
Copy link

@anreddy018
On the satellite icon, you just type 8080 under port and click connect and I am using the stand alone version btw

@rakeshnandigama
Copy link

It worked for me when I turned off the SSL
File-->Settings-->General-->SSL certificate Verification --> OFF

@msafrin3
Copy link

got the same issue here.. it happened because im using header for "Access-Control-Allow-Origin" in my controller. Remove it and it will work, but make sure u put it back after u test it using Postman. These never happened before

@saminfante
Copy link

I also got the same issue but in my case, it was because it was a new install and I forgot to set the store's design config before making authenticated requests with an admin bearer token to create a customer via REST API. And weirdly enough, it let me get my admin bearer token via API but I couldn't make any requests with Postman after I had the token.

Anyway, if that sounds like your case, check your site's Swagger page instead of Postman. If paste your bearer token in the field at the top right, make a request, and you receive this response (which doesn't show in Postman):

{
  "message": "Design config must have area and store."
}

Then your solution is likely to login to the admin, check Content>Configuration>Global (or relevant area's config), and make sure there's a theme configured for you new install. If that doesn't work, make sure to double test your request again on the Swagger page or with curl instead of with Postman. So https://yoursite.com/swagger/ . Hopefully one of the solutions in this post solves this issue for everyone because it seems to be way too common with Postman haha

@lexschulz
Copy link

In my case one of the keys in the header was wrong. After trying different settings in File->Settings->General without luck I opened the Postman-console and there was the error message: Error: Header name must be a valid HTTP Token ["client_secret ClientSecret"]. So a copy & paste error in one Header Key was the problem. Maybe it helps.

@sameerrajimwale
Copy link

@zabbarob Thanks! I had the same issue!

@Magdiel
Copy link

Magdiel commented Jul 4, 2018

I have the same issue sending request to my API. The funny thing is that if I send a request to another API (https://jsonplaceholder.typicode.com/posts) it works correctly.

I've done all the things that everyone commented on this post and it doesn't seems to work.

Postman Version: 6.1.4
OS: Win7
Started happening after upgrading to version 6.1.4

Postman requesting my API:
image

Postman Console:
image

Postman requesting online API:
image

@numaanashraf
Copy link
Member

@Magdiel Could you try hitting your localhost API via curl in Command Prompt and send us the logs?

curl -vv http://localhost:50264/Users

@Magdiel
Copy link

Magdiel commented Jul 4, 2018

@numaanashraf

image

@numaanashraf
Copy link
Member

Thanks @Magdiel. Is this the response you expected when you used Postman?

@Magdiel
Copy link

Magdiel commented Jul 4, 2018

@numaanashraf this is the response I expect in Postman.

In the browser the response is as expected

image

@numaanashraf
Copy link
Member

@Magdiel Can you try the cURL command once more with follow redirect flag and verify that it is the response you expected?

curl -L -vv http://localhost:50264/Users

@Magdiel
Copy link

Magdiel commented Jul 4, 2018

@numaanashraf this is the result I'm expecting
Postman for Chrome:
image

This is what Im getting with curl:
image

@numaanashraf
Copy link
Member

@Magdiel Thanks. Looks like its an issue with how Postman Native app resolves and works with the system proxy configuration. I'm looping in my colleague @harryi3t to take a deeper look at this. Since this is not related to the original issue, we are moving this discussion to #4776.

@Magdiel
Copy link

Magdiel commented Jul 4, 2018

@numaanashraf thanks.

@programarivm
Copy link

programarivm commented Jul 9, 2018

Just downloaded Postman from https://www.getpostman.com/apps, installed it on Ubuntu 18.04, and I am experiencing this also:

This issue is when sending a request to my API with Postman. The funny thing is that if I send a request to another API it works correctly.

  • When querying my localhost API via curl in Command Prompt I'll get the correct response as well
  • I can also query my local API with a few other client tools -- Firefox and Chrome
  • I tried to change the settings as previously described (SSL certificate verification off, System Proxy off, etc) but keep getting the same message:

Could not get any response

There was an error connecting to http://acme.local

Why this might have happened:

The server couldn't send a response:Ensure that the backend is working properly

Self-signed SSL certificates are being blocked:Fix this by turning off 'SSL certificate verification' in Settings > General

Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy

Request timeout:Change request timeout in Settings > General

@numaanashraf
Copy link
Member

@programarivm Thanks for writing in. Could you open the Postman Console (View > Show Postman Console), resend the request and check if there are any errors there?

@programarivm
Copy link

Thank you @numaanashraf for the prompt response. Issue fixed. It was my Vagrant set up modifying the /etc/hosts file.

@numaanashraf
Copy link
Member

@programarivm Glad to know this is resolved at your end. 😄

@numaanashraf
Copy link
Member

There are several unrelated request sending issues being posted on this thread as they all have the same symptom of 'Could not get any response'. This prevents us from tracking these issues individually, suggest possible workarounds and post updates on bug fixes and rollouts to our stable and canary channels. We are locking this thread to prevent further posts of unrelated issues.

If you get a Could not get any response message from Postman native apps while sending your request, open Postman Console (View > Show Postman Console), resend the request and check for any error logs in the console. This should give you some information to troubleshoot the issue by searching for the same error in this issue tracker to find possible workarounds and fixes. If you are still having trouble, please open a new bug report with the screenshot of the error and any steps we can take to quickly replicate the issue.

@postmanlabs postmanlabs locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests