Closed CNBoland closed 2 years ago
Upgraded package Microsoft.Azure.WebJobs.Extensions.ServiceBus
to v5.5 (released yesterday). Still getting MissingMethodException
.
Here's a full exception stack trace from App Insights:
System.MissingMethodException:
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver+<ReceiveMessagesAsyncInternal>d__37.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.ReceiveMessagesAsyncInternal (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver+<>c+<<ReceiveMessagesAsync>b__36_0>d.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Threading.Tasks.ValueTask`1.get_Result (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy+<RunOperation>d__21`2.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy+<RunOperation>d__21`2.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver+<ReceiveMessagesAsync>d__36.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.ServiceBusReceiver+<ReceiveMessagesAsync>d__39.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Messaging.ServiceBus.ServiceBusReceiver+<ReceiveMessagesAsync>d__38.MoveNext (Azure.Messaging.ServiceBus, Version=7.8.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Azure.Core.Pipeline.TaskExtensions+WithCancellationTaskAwaiter`1.GetResult (Microsoft.Azure.WebJobs.Extensions.ServiceBus, Version=5.5.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
at Microsoft.Azure.WebJobs.ServiceBus.Listeners.ServiceBusListener+<RunBatchReceiveLoopAsync>d__29.MoveNext (Microsoft.Azure.WebJobs.Extensions.ServiceBus, Version=5.5.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8)
Another project in our organization has a simple message receiver and was experiencing the same exception scenario. They were able to downgrade to v4.x of the package and the problem went away.
public async Task SimpleMessageSubscriber( [ServiceBusTrigger("topic", "subscription", Connection = "ConnectionString")] byte[] message, ILogger logger) { . . .
This issue has been incidentally resolved by virtue of adding direct reference to package Azure.Messaging.ServiceBus
v7.8.x for the sake of new feature development.
I've attached package lock files generated from source code versions both before when the MME exception was occurring and after when the exception no longer occurred. I was unable to determine the root of the problem. These may be useful for further investigation.
Here are descriptions of the various lock files: packages.lock (Bus).json - Business layer project. packages.lock (Dat).json - Data layer project. The direct package ref was added to this project. packages.lock (Dom).json - Domain layer project. packages.lock (FA).json - Azure Function App project. This is the project we deployed to Azure. packages.lock (Tst).json - Unit test project.
Description: We have an Azure Function App that receives messages via
ServiceBusTrigger
. When running locally, messages are received as expected. When deployed to Azure, messages are never received and the exception message below is logged to Application Insights.Exception (reported in Application Insights):
The Azure Function App message receiver:
App Version Info: Target Framework: netcoreapp3.1 Azure Functions Version: v3
Package Version Info: Microsoft.Azure.Functions.Extensions: v1.1.0 Microsoft.Azure.WebJobs.Extensions.ServiceBus: v5.4.0 Microsoft.Azure.WebJobs.Extensions.OpenApi: v1.3.0 Microsoft.NET.Sdk.Functions: v3.1
Azure Functions Core Tools Version Info: (running locally) Core Tools Version: 3.0.4502 Commit hash: N/A (64-bit) Function Runtime Version: 3.5.2.0
Additional Info:
ServiceBusReceivedMessage
objects, but that had no effect.