1

I keep getting error messages when I try the below code, the error message is

"Error in open.connection(con, "rb") : schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted."

However it doesn't seem like my code is wrong, if the error message is due to the security or permission issue, can anyone give me the solution to remove those security issue?

library(googleway)   
res <- google_geocode(address = "대한민국 경기도 안산시 단원구 성곡동 강촌로", language = "ko", key = <your_api_key>)
SymbolixAU
  • 25,502
  • 4
  • 67
  • 139
AAA
  • 83
  • 8
  • not sure this is a work-environment computer – AAA Apr 02 '18 at 00:13
  • if I am behind a firewall will it gonna be the reason for the error? then do I need to tell my company to unblock the website? if then which website. Otherwise thank you so much for keep giving me the solution @SymbolixAU – AAA Apr 02 '18 at 00:17
  • I've seen similar issues with users on company networks, but not with the same error as yours. Have a read through [this issue on the project page](https://github.com/SymbolixAU/googleway/issues/26) to see if it helps. – SymbolixAU Apr 02 '18 at 00:31
  • I just tried with curl_proxy, and it says "Error in validateBounds(bounds) : bounds must be a list of length 2, each item being a vector of lat/lon coordinate pairs" – AAA Apr 02 '18 at 01:00
  • Can you please check? I edited my question – AAA Apr 02 '18 at 01:17

1 Answers1

1

Solved, all right credits to @SymbolixAU

The issue is due to being behind a (company) firewall. In this case we need to use a curl_proxy

library(googleway)
library(curl)
curl_proxy <- function(url, verbose = TRUE){
  proxy <- ie_get_proxy_for_url(url)
  h <- new_handle(verbose = verbose, proxy = proxy)
  curl(url, handle = h)
}


res <- google_geocode(address = "대한민국 경기도 안산시 ", language = "ko", key =     "api_key", curl_proxy = curl_proxy)
AAA
  • 83
  • 8