postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.83k stars 839 forks source link

Monitoring is failing in postman pro #5868

Closed vmarkova closed 5 years ago

vmarkova commented 5 years ago

Describe the bug Monitors keep failing. Have exactly same issue described in ticket #3128, but that ticket is closed and I'm not sure if I could get any other response there. Tried advised there disabling of SSL - didn't help :( All tests are successful in Postman API Runner, monitor keeps being failed thou (Console logs in monitor aare actually saying that monitor gets correct and successful status code, but it is still failing for some reason) . Exact same errors in console log, but all advices above don't help (tried disabling SSL, checked url, checked enviroment).

To Reproduce Steps to reproduce the behavior:

  1. Go to Postman API (Mac), create collection, try with runner - all tests pass.
  2. Create Monitor, disable SSL, go check it in Postman Chrome - all monitors fail.

Expected behavior If Collection tests are successfully passing in runner - monitor have to be successful as well.

Screenshots Attached with covered company information for security reasons.

screen shot 2019-01-29 at 1 54 27 pm screen shot 2019-01-29 at 1 53 53 pm

Thank you in advance, looking for your help!

godfrzero commented 5 years ago

@vmarkova Two things you could check:

  1. Is the URL in question publicly accessible?
  2. Are the correct environment variables present in the "Initial value" column?

To help you debug further, have you tried adding console logs within the monitor run to verify that environment values are being populated correctly? The errors in the console seem to imply that a non-JSON response is being parsed as JSON, which is throwing an exception.

vmarkova commented 5 years ago

I cannot share URL due to confidentiality of company, but it is working well. When you run same collection with same environment in Postman Runner - it works without any exceptions (please see screenshot above attached), but when you create monitor (without modification) - monitor fails.

vmarkova commented 5 years ago

Hello, could somebody give an update on this issue? It's been a month so far.. Thank you!

DarrylGwinnett commented 5 years ago

You're getting ECONNREFUSED. Doesn't like like a Postman problem really. when you run them in your app, presumably you're on a company network which can access your confidential URL. When it runs as a monitor the URL needs to be accessible from Postman's servers. You might need to change your firewall settings.

godfrzero commented 5 years ago

@vmarkova It looks like you're trying to connect to a URL which cannot be reached publicly. Because monitors run on the Postman Cloud, any URL to be contacted should resolve to a publicly accessible IP. Again, you don't have to disclose the actual URL, but unless the address is publicly accessible this is not a bug.

Thor07 commented 5 years ago

I have a publicly available URL and global variable doesn't substitute the value on monitor ,works fine on app.

godfrzero commented 5 years ago

@Thor07 Globals aren't supported within monitors. Only variables that are present in the collection + environment can be used.

twelve-cgn commented 4 years ago

Hello, this issue should not be closed. Same problem here. The collection passed in the app. But the monitor fails. The url is public (tested with mobile). But i think the "disable ssl verification" option in monitor is not be considered.

godfrzero commented 4 years ago

Hey @moellerbj, what's the error you're seeing here? If you can open up a ticket via our support center, we can probably get to the root of the problem faster.

twelve-cgn commented 4 years ago

hallo @godfrzero , sorry false alarm (embarrassing). My mobile was configured in the firewall.

godfrzero commented 4 years ago

No problem, happens to all of us. 👍