Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 18

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&amp;amp;client=platform&lt;/HelpLink&gt;&lt;Message&gt;ISV 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&amp;amp;client=platform&lt;/HelpLink&gt;&lt;Message&gt;ISV 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.

  • Atilio Profile Picture
    2 on at
    Re: Error When Installing Plugin Profiler and when Profiling Plugin (PRT 9.1.0.167)

    Hi Teams, 

     

    Somebody know how i can fix it?

     

    i got the same error :'(

  • Community Power Platform Member Profile Picture
    on at
    Re: Error When Installing Plugin Profiler and when Profiling Plugin (PRT 9.1.0.167)

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

     

    Best regards

  • nicknow Profile Picture
    18 on at
    Re: Error When Installing Plugin Profiler and when Profiling Plugin (PRT 9.1.0.167)

    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.

  • Joeri Stroy Profile Picture
    49 on at
    Re: Error When Installing Plugin Profiler and when Profiling Plugin (PRT 9.1.0.167)

    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. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard