cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nicknow
Advocate II
Advocate II

Error When Installing Plugin Profiler and when Profiling Plugin (PRT 9.1.0.167)

I'm using the latest Plugin Registration Tool (PRT), 9.1.0.167, installed through the PAC CLI process. Dataverse database version is 9.2.22111.00206.

 

When installing the Profiler I get the following error:

Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.Entity' to type 'CrmSdk.PluginType'.

   at Microsoft.Crm.Tools.Libraries.OrganizationHelper.InstallProfiler(CrmOrganization org, String prtPath)

   at Microsoft.Crm.Tools.PluginRegistration.OrganizationControlViewModel.<>c__DisplayClass302_0.<InstallProfiler_Clicked>b__2(Object o, DoWorkEventArgs e)

 

But the profiler solution is installed and the PRT will allow you to enable profiling.

 

The plugin runs successfully. Then we turn on profiling for the plugin step and when executing the exact same transaction receive the follow error:

nicknow_0-1672955924014.png

 

When looking at the plugin trace we can see there is an infinite loop occurring in the profiler code that is eventually errors out:

nicknow_1-1672955996837.png

 

Here is the error message content from the first trace (Depth = 1):

Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: Unable to persist the profile.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>0107fa88-e11c-42ee-92ad-bbda48862d72</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">3</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>Plugin.ExceptionFromPluginExecute</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">PluginProfiler.Plugins.ProfilerPlugin</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>Plugin.ExceptionRetriable</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:boolean">false</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>Plugin.ExceptionSource</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">PluginExecution</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>Plugin.OriginalException</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">PluginExecution</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>Plugin.PluginTrace</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Getting PostUpdateImage
Getting afsdc_response from preMessageImage
Post - afsdc_response equals Yes
Unexpected Exception occurred in Profiler while persisting the profile:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.
&lt;OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;ActivityId&gt;07d7adb0-f7fd-42c8-8ade-a01a1fa437bd&lt;/ActivityId&gt;&lt;ErrorCode&gt;-2146893812&lt;/ErrorCode&gt;&lt;ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionSourceKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;Api/PostPipeline&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiSourceActivityKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"/&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionOwnerKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;OwnershipNotFoundInExceptionOwnerSettings&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiOriginalExceptionKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;Microsoft.Crm.CrmException: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&amp;#xD;
at Microsoft.Crm.BusinessEntities.ExecutionContext.ThrowIfInvalidPluginTransaction(Int32 countThreshold)&amp;#xD;
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)&amp;#xD;
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)&amp;#xD;
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.&amp;lt;&amp;gt;c__DisplayClass5_0.&amp;lt;Execute&amp;gt;b__0()&amp;#xD;
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)&amp;#xD;
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)&amp;#xD;
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentationOperation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.&amp;lt;&amp;gt;c__DisplayClass22_0.&amp;lt;ExecuteRequest&amp;gt;b__0()&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiStepKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;00000000-0000-0000-0000-000000000000&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiDepthKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;2&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiActivityIdKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;07d7adb0-f7fd-42c8-8ade-a01a1fa437bd&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiPluginSolutionNameKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;System&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiStepSolutionNameKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;System&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionCategory&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;ClientError&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionMessageName&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;IsvTransactionCount&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionHttpStatusCode&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;400&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;/ErrorDetails&gt;&lt;HelpLink&gt;http://go.microsoft.com/fwlink/?LinkID=398563&amp;amp;error=Microsoft.Crm.CrmException%3a8009000c&am... code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&lt;/Message&gt;&lt;Timestamp&gt;2023-01-05T21:23:47&lt;/Timestamp&gt;&lt;ExceptionRetriable&gt;false&lt;/ExceptionRetriable&gt;&lt;ExceptionSource&gt;SdkClientError&lt;/ExceptionSource&gt;&lt;InnerFault i:nil="true"/&gt;&lt;OriginalException&gt;System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing. (Fault Detail is equal to Exception details: &amp;#xD;
ErrorCode: 0x8009000C&amp;#xD;
Message: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&amp;#xD;
TimeStamp: 2023-01-05T21:23:47.8013818Z&amp;#xD;
--&amp;#xD;
).&lt;/OriginalException&gt;&lt;TraceText i:nil="true"/&gt;&lt;/OrganizationServiceFault&gt;
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.&lt;&gt;c__DisplayClass16_1.&lt;ExecuteStreamingCallBack&gt;b__1(ExecuteRequest response)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.GrpcClientSendAndReceive(ExecuteResponse executeResponse, Func`2 isTerminalResponse)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.&lt;&gt;c__DisplayClass16_0.&lt;ExecuteStreamingCallBack&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.ExecuteStreamingCallBack(Func`2 callback, Func`2 isTerminalChunk, Func`2 HandleClientException)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationService.Execute(String operation, ByteString serializedRequest, Assembly proxyTypes, Object traceSettings)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.&lt;&gt;c__DisplayClass23_0.&lt;ExecuteInternal&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.CreateInternal(Entity entity)
at PluginProfiler.Plugins.ServiceWrappers.OrganizationServiceWrapper.Create(Entity entity)
at PluginProfiler.Plugins.ProfilerBase`1.Execute(T operationContext, ProfilerPluginContext context, ProfilerPluginReport report, Object inputParameter)
</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<HelpLink i:nil="true" />
<Message>Unable to persist the profile.</Message>
<Timestamp>2023-01-05T21:23:47.8013818Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource>PluginExecution</ExceptionSource>
<InnerFault i:nil="true" />
<OriginalException>PluginExecution</OriginalException>
<TraceText>
Getting PostUpdateImage
Getting afsdc_response from preMessageImage
Post - afsdc_response equals Yes
Unexpected Exception occurred in Profiler while persisting the profile:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.
&lt;OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;ActivityId&gt;07d7adb0-f7fd-42c8-8ade-a01a1fa437bd&lt;/ActivityId&gt;&lt;ErrorCode&gt;-2146893812&lt;/ErrorCode&gt;&lt;ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionSourceKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;Api/PostPipeline&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiSourceActivityKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"/&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionOwnerKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;OwnershipNotFoundInExceptionOwnerSettings&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiOriginalExceptionKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;Microsoft.Crm.CrmException: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&amp;#xD;
at Microsoft.Crm.BusinessEntities.ExecutionContext.ThrowIfInvalidPluginTransaction(Int32 countThreshold)&amp;#xD;
at Microsoft.Crm.BusinessEntities.ExecutionContext.CommitTransaction(ProcessDependenciesOption option, FlushCacheOption flushOption)&amp;#xD;
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)&amp;#xD;
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.&amp;lt;&amp;gt;c__DisplayClass5_0.&amp;lt;Execute&amp;gt;b__0()&amp;#xD;
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)&amp;#xD;
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)&amp;#xD;
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, Guid callerRegardingObjectId, Int32 invocationSource, Version endpointVersion, OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.DispatchRequest(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest, SdkResponseDescription responseDescription, SdkPerformanceCounterContext sdkPerformanceCounterContext)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentationOperation(OrganizationRequest request, OrganizationInternalRequest organizationInternalRequest)&amp;#xD;
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.&amp;lt;&amp;gt;c__DisplayClass22_0.&amp;lt;ExecuteRequest&amp;gt;b__0()&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiStepKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;00000000-0000-0000-0000-000000000000&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiDepthKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;2&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiActivityIdKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;07d7adb0-f7fd-42c8-8ade-a01a1fa437bd&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiPluginSolutionNameKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;System&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiStepSolutionNameKey&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;System&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionCategory&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;ClientError&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionMessageName&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;IsvTransactionCount&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;KeyValuePairOfstringanyType&gt;&lt;a:key&gt;ApiExceptionHttpStatusCode&lt;/a:key&gt;&lt;a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"&gt;400&lt;/a:value&gt;&lt;/KeyValuePairOfstringanyType&gt;&lt;/ErrorDetails&gt;&lt;HelpLink&gt;http://go.microsoft.com/fwlink/?LinkID=398563&amp;amp;error=Microsoft.Crm.CrmException%3a8009000c&am... code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&lt;/Message&gt;&lt;Timestamp&gt;2023-01-05T21:23:47&lt;/Timestamp&gt;&lt;ExceptionRetriable&gt;false&lt;/ExceptionRetriable&gt;&lt;ExceptionSource&gt;SdkClientError&lt;/ExceptionSource&gt;&lt;InnerFault i:nil="true"/&gt;&lt;OriginalException&gt;System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing. (Fault Detail is equal to Exception details: &amp;#xD;
ErrorCode: 0x8009000C&amp;#xD;
Message: ISV code reduced the open transaction count. Custom plug-ins should not catch exceptions from OrganizationService calls and continue processing.&amp;#xD;
TimeStamp: 2023-01-05T21:23:47.8013818Z&amp;#xD;
--&amp;#xD;
).&lt;/OriginalException&gt;&lt;TraceText i:nil="true"/&gt;&lt;/OrganizationServiceFault&gt;
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.&lt;&gt;c__DisplayClass16_1.&lt;ExecuteStreamingCallBack&gt;b__1(ExecuteRequest response)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.GrpcClientSendAndReceive(ExecuteResponse executeResponse, Func`2 isTerminalResponse)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.&lt;&gt;c__DisplayClass16_0.&lt;ExecuteStreamingCallBack&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.ExecuteStreamingCallBack(Func`2 callback, Func`2 isTerminalChunk, Func`2 HandleClientException)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationService.Execute(String operation, ByteString serializedRequest, Assembly proxyTypes, Object traceSettings)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.&lt;&gt;c__DisplayClass23_0.&lt;ExecuteInternal&gt;b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.CreateInternal(Entity entity)
at PluginProfiler.Plugins.ServiceWrappers.OrganizationServiceWrapper.Create(Entity entity)
at PluginProfiler.Plugins.ProfilerBase`1.Execute(T operationContext, ProfilerPluginContext context, ProfilerPluginReport report, Object inputParameter)

</TraceText>
</OrganizationServiceFault>

 

This only occurs when the plugin attempts to execute an UpdateRequest. If I comment out that line of code the plugin runs to completion without error. And if I turn off profiling then the plugin always runs successfully.

3 REPLIES 3
joeristroy
Helper I
Helper I

This error usually occurs when the plugin you are trying to profile causes an infinite execution loop, meaning it is constantly retriggering itself, or when the profiled plugin triggers another plugin that throws an exception deeper down the execution pipeline.

 

The fact that it doesn't fail when you comment out the update line also supports this theory. 

 

I would look in that direction.

 

Add some tracing to your code an see what gets written to the plugin trace log. 

The plugin code isn't creating an infinite loop. Filtering is applied on the Update step to ensure it won't trigger twice. Additionally, if we turn off profiling the plugin runs successfully without error. It's only when the profiler is wrapping the plugin execution that the error occurs.

PX_200
New Member

Hi Nick,
could you find a solution? 
I got the same error message.

 

Best regards

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,575)