cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

CUSTOM CONNECTOR: API call returns blank array.

Hello,

I just created a custom connector. In the connector "Test" area, I receive a Status 200, success:

azureBlank1.png

In the app, I have the following code OnSelect of a button control: 

ClearCollect(azureTest, azureMapTimezone.AzureMaps(
    "1.0", {query: Location.Latitude & "," & Location.Longitude})
)

The query seems to run without error, but returns a blank collection: 

azureBlank.png
Troubleshooting so far: 

- Closed/Reopened app

- Removed/Added the connector from Data Sources

- Deleted/Reconnected the connection

- Tried Custom Connector in a brand new app, same result. (thanks @KickingApps!)

- Tried BOTH Chrome and IE (thanks Tricia!)

- Deleted/Recreated the Custom Connector (thanks persistence!)

- Tried every variation of Location.Latitude & "," & Location.Longitude I could think of including:

    - LatLong.Text (where the above is placed in a Label control)
    - Concatenate(Text(Location.Latitude), , , Text(Location.Longitude) )

What am I missing here?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
ericonline
Community Champion
Community Champion

Aight, well... 

  • Deleted Custom Connector
  • Deleted all Connections to Connector
  • Recreated the exact same way I did before
  • Then I just waited..... for like 2 hours before testing....

2018-12-14_13-35-05.png

Unsolved mystery!

 

View solution in original post

5 REPLIES 5
ericonline
Community Champion
Community Champion

This is driving me nuts. If the custom connector works in the "Test" area, it most certainly should work in the app! Whats the deal?

Hi @ericonline

Sorry to hear how much this is driving you crazy!
With AzureMaps, it appears you have to provide the API Key in the URI, and I couldn't find a way to avoid this by using OAuth authentication.
In the Test area, I suspect the test page picks up the API key from the test arguments that you supply. I suspect this is missing when you call the API from PowerApps, and this is the cause of the problem.

Anyway, I've added a bit more detail in your other post here....

https://powerusers.microsoft.com/t5/General-Discussion/JSON-SCHEMA-Which-is-correct/m-p/192517/highl...

ericonline
Community Champion
Community Champion

Aight, well... 

  • Deleted Custom Connector
  • Deleted all Connections to Connector
  • Recreated the exact same way I did before
  • Then I just waited..... for like 2 hours before testing....

2018-12-14_13-35-05.png

Unsolved mystery!

 

View solution in original post

Hi @ericonline

I'm glad this is working for you now! However, it would be great if someone could offer a plausible explanation as to why this happened. I noticed this afternoon that if I passed invalid arguments (eg, an invalid query or APIKey), PowerApps would report the error.

AzureFailure.png

In your case, this didn't happen so maybe there was some corruption in the connector which prevented it from calling the Azure web service alltogether? If it were the case that Azure was down, I'd imagine we would have seen a 500 or 404 error in PowerApps. What is clear however is that diagnosing these kinds of problems is really difficult! There have been times when I've even struggled to diagnose failures in the test page due to lack of detail.

I hope this custom connector continues to work reliably for you and that you don't have a repetition of this problem!

 

 

ericonline
Community Champion
Community Champion

Thanks @timl. I think we are witnessing the very nature of the animal we’ve chosen to tame:
This low code platform provides incredible opportunities for rapid development, rapid deployment and innovation that I’m VERY grateful for.
In return for the additional layer of abstraction (or two) that makes this all possible, I (my org) give up the ability to “get my hands in there”.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,303)