dmpe / urlshorteneR

R package for 2 URL shortening service :loudspeaker: Compatible with Bitly API v4
http://cran.r-project.org/package=urlshorteneR
Apache License 2.0
22 stars 7 forks source link

Problem with timeout #24

Closed r0bis closed 3 years ago

r0bis commented 3 years ago

problem in corporate environment where a web browser (chrome) can get to is.gd shortener but when I run it from urlshortener I get timeout. It is of 10 seconds which should be default httr timeout. is.gd is reached via various browsers in 2 to 3 seconds.

> isgd_LinksShorten("http://neverssl.org")
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failed to connect to is.gd port 80: Timed out

Initially I thought to try increasing timeout, but that does not seem to be an issue. How does one go about troubleshooting this kind of scenario? Many thanks, Roberts

dmpe commented 3 years ago

I would first check/ask if there is some firewall issue maybe ? can your VM (via powershell,cmd,shell) reach is.gd like with a ping or something similar.

have you tested creating a final/desired URL with curl and executing it?

r0bis commented 3 years ago

Thanks John, That definitely has something to do with firewall; if I switch from corporate wifi to public wifi, everything is fine. I just do not understand why it is still possible to reach is.gd via browser. And how would I test with curl; I would much appreciate knowing that.

On Fri, 5 Feb 2021 at 13:28, John notifications@github.com wrote:

I would first check/ask if there is some firewall issue maybe ? can your VM (via powershell,cmd,shell) reach is.gd like with a ping or something similar.

have you tested creating a final/desired URL with curl and executing it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmpe/urlshorteneR/issues/24#issuecomment-774032995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABM25PIDUS5334GN4OSX4TS5PXAXANCNFSM4XESUVUQ .

dmpe commented 3 years ago

Probably some corporate proxy. Check that with your network people what they do (e.g. filtering?).

Lookup docs for curl, basically execute in shell/cmd/powershell "curl -v is.gd" and see what it gives.

I close it for now but feel free to get back to me, if you can debug this further. Code changes are always welcome ;)

r0bis commented 3 years ago

Thank you John,

very helpful, I will let you know when I debug this. It has got to do with proxy, I think.

Roberts

On Mon, 8 Feb 2021 at 23:03, John notifications@github.com wrote:

Probably some corporate proxy. Check that with your network people what they do (e.g. filtering?).

Lookup docs for curl, basically execute in shell/cmd/powershell "curl -v is.gd" and see what it gives.

I close it for now but feel free to get back to me, if you can debug this further. Code changes are always welcome ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmpe/urlshorteneR/issues/24#issuecomment-775521716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABM25M36HKXIYWRJHUVZCTS6BUULANCNFSM4XESUVUQ .