ODataConnectedService icon indicating copy to clipboard operation
ODataConnectedService copied to clipboard

Adding a connected service gets stuck on the "Adding connected service to project..." window.

Open A9G-Data-Droid opened this issue 3 years ago • 4 comments

Describe the bug

After I complete the dialog to add a connected service it gets stuck on the "Adding connected service to project..." window.

Version of the Project affected

VisualStudio Version v16.11.11 (2019) OData Connected Service v0.13.0 Microsoft.Odata.Client v7.10.0

To Reproduce

Steps to reproduce the behavior:

  1. Open the Add new OData Connected Service dialog
  2. Use an endpoint that requires authentication through API Key and Bearer token in the header
  3. Finish
  4. See Window that never goes away

Expected behavior

Shouldn't there be a timeout? Some sort of message about the current step in that text box?

Actual behavior

I never get an error. I never get any progress messages or bar movement. Visual Studio is hung at this dialog and the only way out is to force close visual studio. I left it open for an hour and it never completed.

Screenshots

image

Additional context

I am connecting to a live API on a remote endpoint that works fine in testing. I can get raw OData v4 responses. I am using the same API key and bearer token in the header that gets a real response from the server using HttpClient.

A9G-Data-Droid avatar Mar 14 '22 21:03 A9G-Data-Droid

@A9G-Data-Droid how are you passing authentication headers? Can you look at this blog https://devblogs.microsoft.com/odata/odata-connected-service-version-0-6-0-release/ on how to pass custom headers when working with an endpoint that requires authentication

ElizabethOkerio avatar Mar 15 '22 14:03 ElizabethOkerio

Yes @ElizabethOkerio, I am using the Custom Headers box. I know I'm doing it correctly because it won't let you move to this step if you have it wrong. You get authentication errors when you hit next. Once you have the headers correct, it connects and even shows the object name in the second screen. It's when I get to Finish that I see this blank window problem I made the issue for.

EDIT: Is there a log file I can look at?

A9G-Data-Droid avatar Mar 15 '22 15:03 A9G-Data-Droid

@A9G-Data-Droid how big is your metadata?

ElizabethOkerio avatar Mar 16 '22 04:03 ElizabethOkerio

@ElizabethOkerio If I manually navigate to the same $metadata endpoint and download the resultant XML file it is 3KB on disk.

A9G-Data-Droid avatar Mar 16 '22 17:03 A9G-Data-Droid