web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Plug-in Profiler Error

(1) ShareShare
ReportReport
Posted on by 18
I am trying to debug a plug-in in my online Customer Service environment and I am getting the following error message when the plugin is triggered whilst being profiled. I get the same error for other working plugins when they profiled.
 
Exception Message: Unexpected Exception in the Plug-in Profiler
ErrorCode: -2147220891
HexErrorCode: 0x80040265
ErrorDetails: 
    OperationStatus: 3
    SubErrorCode: -2146233088
    Plugin: 
        ExceptionFromPluginExecute: PluginProfiler.Plugins.ProfilerPlugin
        ExceptionRetriable: False
        ExceptionSource: PluginExecution
        OriginalException: PluginExecution
        PluginTrace: An exception occurred during the initialization of the Plug-in Profiler.
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: s
   at System.Convert.FromBase64String(String s)
   at PluginProfiler.Plugins.PluginLoaderUtility.RefreshAssembly(IOrganizationService service, ProfilerConfiguration config, PluginInitializationContext context)
   at PluginProfiler.Plugins.PluginLoaderUtility.RefreshPluginInitializationContext(IOrganizationServiceFactory factory, ProfilerConfiguration config, PluginInitializationContext currentContext)
   at PluginProfiler.Plugins.ProfilerBase`1.InitializeProfiler(Dictionary`2 services, T operationContext, ProfilerPluginContext& context)
 
I have uninstalled the Profiler and ensured I am using the latest version of the PRT (9.0.0.9689) to install the profiler and start profiling.
 
I am out of ideas. Can ayone help?
 
I have the same question (0)
  • Community member Profile Picture
    2 on at
    I'm getting the same error. Did you manage to find a solution?
  • Community member Profile Picture
    4 on at
    I'm running into the error as well.   I've traced it to the pluginassembly table.  The content column was NULL for the assembly I was trying to profile.   After using SQL4CDS in the XrmToolbox to update the content field, I was able to profile the plugin.   How did you register the plug-in assembly?

    Edited to add:   The issue is the plugin registration method.  If you register it using a package, the assembly is saved to the File Store.  The Profiler Plug-in (which hasn't been updated since 2015) expects the assembly to be saved to the Database.  As a result, it throws the ArgumentNullReference. 

    TLDR:   The Plugin Profiler Solution needs to be updated to be aware of the File Store SourceType for plugin assembly storage.
  • AZ79 Profile Picture
    19 on at
    I'm facing the same issue. Any update on how this can be solved? There surely there must be a way of debugging plugins part of .nuget package? 
  • Roddas77 Profile Picture
    18 on at
    No, I have not found an answer to this issue as yet.
  • Community member Profile Picture
    7 on at
    I am facing the same issue. Are there any updates on this issue? 
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Hello User,
     
    For the debugging have you tried to use FakeXRM ? this assembly does not even required the plugin registration tool.
     
     
    Thank you,
    Amit Katariya
  • Verified answer
    RA-12021357-0 Profile Picture
    19 on at
    To debug plug-ins that are part of a plug-in package, you must: (Do not install profiler it's old now, you don't need to install profiler anymore)
    1. Use the latest version of the Plug-in Registration tool (PRT). Version 9.1.0.184 or higher.
      Use the pac CLI pac tool prt command with the --update switch to update. > pac tool prt --update
    2. In the folder that contains the PRT, edit the appsettings.json file. Set LegacyPluginProfiler to false.
      If you have installed using pac CLI, the folder should be:
      C:\Users\<you>\AppData\Local\Microsoft\PowerPlatform\PRT\9.1.0.184\tools
    3. From PRT tool Select Settings>Logging to Plugin Trace >> Select ALL
    4. In D365 environment, go to Advanced settings -> System settings -> Customizations tab. For Enable logging to plug-in trace log select value as All
    5. rest is same
    Other tips: 
    log some Trace in your plugin code using ITraceLogger. (There is a bug which will soon get fixed) 
     
     var localPluginContext = new LocalPluginContext(serviceProvider);
     localPluginContext.Trace($"Entered");

    Feel free to drop email to my gmail andy.ravi if still not getting this fixed.
  • Tyler TS Solutions Profile Picture
    6 on at
    I have confirmed that setting LegacyPluginProfiler to false allows me to debug plugins within packages.  Thanks to "Community member" for the resolution!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans