New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmbiguousMatchException at SearchServiceClient #2516

Closed
ahmettahasakar opened this Issue Nov 1, 2016 · 14 comments

Comments

Projects
None yet
7 participants
@ahmettahasakar

ahmettahasakar commented Nov 1, 2016

On the latest search preview, I'm trying to create a new SearchServiceClient like below

new SearchServiceClient(searchServiceName, new SearchCredentials(apiKey));

then I get the following error. However, this is only on the server. What is the problem?

[AmbiguousMatchException: Multiple custom attributes of the same type found.]
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +122
   Microsoft.Rest.ServiceClient`1.get_FrameworkVersion() +103
   Microsoft.Rest.ServiceClient`1.SetDefaultUserAgentInfo() +177
   Microsoft.Rest.ServiceClient`1.SetUserAgent(String productName, String version) +50
   Microsoft.Azure.Search.SearchServiceClient..ctor(String searchServiceName, SearchCredentials credentials) +79
@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Nov 1, 2016

Member

@AhmetTaha This looks like an issue with the Microsoft.Rest.ClientRuntime library. Are you able to reproduce the problem with any other Azure SDKs that take a dependency on the same version of Microsoft.Rest.ClientRuntime that the Search SDK does?

@shahabhijeet Digging through the history, I see that you're the author of ServiceClient.FrameworkVersion. Any idea what the problem could be?

Member

brjohnstmsft commented Nov 1, 2016

@AhmetTaha This looks like an issue with the Microsoft.Rest.ClientRuntime library. Are you able to reproduce the problem with any other Azure SDKs that take a dependency on the same version of Microsoft.Rest.ClientRuntime that the Search SDK does?

@shahabhijeet Digging through the history, I see that you're the author of ServiceClient.FrameworkVersion. Any idea what the problem could be?

@ahmettahasakar

This comment has been minimized.

Show comment
Hide comment
@ahmettahasakar

ahmettahasakar Nov 1, 2016

I dont use ClientRuntime for anything else. Also, this error does not happen on my local compute simulator. It happens on azure cloud service deploy. I'm not sure if it means anything.

ahmettahasakar commented Nov 1, 2016

I dont use ClientRuntime for anything else. Also, this error does not happen on my local compute simulator. It happens on azure cloud service deploy. I'm not sure if it means anything.

@ahmettahasakar

This comment has been minimized.

Show comment
Hide comment
@ahmettahasakar

ahmettahasakar Nov 1, 2016

ok. BotFramework is also using it apperantly, and I got the same error when using it.

ahmettahasakar commented Nov 1, 2016

ok. BotFramework is also using it apperantly, and I got the same error when using it.

@ahmettahasakar

This comment has been minimized.

Show comment
Hide comment
@ahmettahasakar

ahmettahasakar Nov 1, 2016

ok. got it fixed. I downgraded Microsoft.Rest.ClientRuntime from 2.3.3 to 2.3.2.

ahmettahasakar commented Nov 1, 2016

ok. got it fixed. I downgraded Microsoft.Rest.ClientRuntime from 2.3.3 to 2.3.2.

@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Dec 1, 2016

Member

Possibly related: Azure/autorest#1542

Member

brjohnstmsft commented Dec 1, 2016

Possibly related: Azure/autorest#1542

@jeradrose

This comment has been minimized.

Show comment
Hide comment
@jeradrose

jeradrose Dec 7, 2016

I was not able to downgrade Microsoft.Rest.ClientRuntime from 2.3.4 to 2.3.2 due to Microsoft.Azure.Search 3.0.1 having a dependency on 2.3.4. So I had to downgrade Microsoft.Azure.Search to 1.1.3.

jeradrose commented Dec 7, 2016

I was not able to downgrade Microsoft.Rest.ClientRuntime from 2.3.4 to 2.3.2 due to Microsoft.Azure.Search 3.0.1 having a dependency on 2.3.4. So I had to downgrade Microsoft.Azure.Search to 1.1.3.

@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Dec 8, 2016

Member

@jeradrose Are you also using Application Insights by any chance?

Member

brjohnstmsft commented Dec 8, 2016

@jeradrose Are you also using Application Insights by any chance?

@brjohnstmsft brjohnstmsft reopened this Dec 8, 2016

@jeradrose

This comment has been minimized.

Show comment
Hide comment
@jeradrose

jeradrose Dec 8, 2016

On Azure, and client-side, yes. But not server-side (SDK).

jeradrose commented Dec 8, 2016

On Azure, and client-side, yes. But not server-side (SDK).

@rarobe

This comment has been minimized.

Show comment
Hide comment
@rarobe

rarobe Dec 8, 2016

Also receiving AmbiguousMatchException when initializing SearchServiceClient after upgrading to Microsoft.Azure.Search 3.0.1.

Application Insights is configured on my WebRole properties to send diagnostic data to App Insights - and I can confirm that when I disabled Application Insights on my web role properties I no longer receive the AmbiguousMatchException (App Insights SDK is still installed in my web project and collecting requests but not sending additional diagnostic data).

rarobe commented Dec 8, 2016

Also receiving AmbiguousMatchException when initializing SearchServiceClient after upgrading to Microsoft.Azure.Search 3.0.1.

Application Insights is configured on my WebRole properties to send diagnostic data to App Insights - and I can confirm that when I disabled Application Insights on my web role properties I no longer receive the AmbiguousMatchException (App Insights SDK is still installed in my web project and collecting requests but not sending additional diagnostic data).

@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Dec 8, 2016

Member

@jeradrose

On Azure, and client-side, yes. But not server-side (SDK).

And you observe the AmbiguousMatchException in all three cases...?

Member

brjohnstmsft commented Dec 8, 2016

@jeradrose

On Azure, and client-side, yes. But not server-side (SDK).

And you observe the AmbiguousMatchException in all three cases...?

@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Dec 8, 2016

Member

The Application Insights team are working on a fix:

We know the root cause and working on a fix. We expect the fix shipped next week. Meanwhile the work around is to disable Application Insights Azure WebSite extension or StatusMonitor. Please escalate using CSS channel if you need a hotfix sooner.

Member

brjohnstmsft commented Dec 8, 2016

The Application Insights team are working on a fix:

We know the root cause and working on a fix. We expect the fix shipped next week. Meanwhile the work around is to disable Application Insights Azure WebSite extension or StatusMonitor. Please escalate using CSS channel if you need a hotfix sooner.

@markcowl

This comment has been minimized.

Show comment
Hide comment
@markcowl

markcowl Jan 20, 2017

Member

@brjohnstmsft Assignign to you to resolve when the root issue is resolved. Please reassign if appropriate.

Member

markcowl commented Jan 20, 2017

@brjohnstmsft Assignign to you to resolve when the root issue is resolved. Please reassign if appropriate.

@wagsousa

This comment has been minimized.

Show comment
Hide comment
@wagsousa

wagsousa Jan 23, 2017

Updating the App Service - Application Insights extension to the latest version solves the issue.
Azure Portal > App Service > Extensions > click on Application Insights > click on Update

wagsousa commented Jan 23, 2017

Updating the App Service - Application Insights extension to the latest version solves the issue.
Azure Portal > App Service > Extensions > click on Application Insights > click on Update

@brjohnstmsft

This comment has been minimized.

Show comment
Hide comment
@brjohnstmsft

brjohnstmsft Feb 8, 2017

Member

The root issue has been resolved. See the related issue for details on how to deploy the fix.

Member

brjohnstmsft commented Feb 8, 2017

The root issue has been resolved. See the related issue for details on how to deploy the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment