Forum Discussion

snowdowne's avatar
snowdowne
Regular Visitor
6 years ago
Solved

Web Query Google API "The underlying connection was closed: An unexpected error occurred on a send."

Trying to pull google maps drive time between two fields.

I have tested the url in chrome and it works, see below.

When I create a web query it takes a long time trying to connect and eventually gives an error message. I don't know where to start as there is no error code. If I hit retry, it immediately gives the error message.

I am signed into my organizational account in power bi desktop and using the Anonymous verification setting (that won't open anymore so I can try the other types).

 

We encountered an error while trying to connect.

Details: "The underlying connection was closed: An unexpected error occurred on a send."

 

https://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC&destinations=Langley+BC&mode=driving&key=REMOVED

 

{
   "destination_addresses" : [ "Langley City, BC, Canada" ],
   "origin_addresses" : [ "Vancouver, BC, Canada" ],
   "rows" : [
      {
         "elements" : [
            {
               "distance" : {
                  "text" : "46.6 km",
                  "value" : 46637
               },
               "duration" : {
                  "text" : "46 mins",
                  "value" : 2777
               },
               "status" : "OK"
            }
         ]
      }
   ],
   "status" : "OK"
}

 

  • So my IT department scoured through our firewall and apparently one of the application signatures for google drive was being blocked. I'm not going to pretend to understand what that means but it works now.

3 Replies

    • snowdowne's avatar
      snowdowne
      Regular Visitor

      Thanks for replying amitchandak 

      I've cleared the permissions several times with no luck.

      I'm trying different level's to apply the permission to with no luck. 

      I did notice that it's missing the ? symbol below "https://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC&destinations=Ottawa+ON&mode=driving&key="

       

      Honestly Web API or Organizational account seems more applicable but don't work either. 

           1. Web API error message "An API key value wasn't supplied"

           2. Organizational account error message "The underlying connection was close: An un expected error occured on a send" even though I am already logged into my organizational account.

       

      • snowdowne's avatar
        snowdowne
        Regular Visitor

        So my IT department scoured through our firewall and apparently one of the application signatures for google drive was being blocked. I'm not going to pretend to understand what that means but it works now.