web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Tyler TS Solutions Profile Picture
    6 on at
    Plug-in Profiler Error
    I have confirmed that setting LegacyPluginProfiler to false allows me to debug plugins within packages.  Thanks to "Community member" for the resolution!
  • Verified answer
    RA-12021357-0 Profile Picture
    19 on at
    Plug-in Profiler Error
    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.
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Plug-in Profiler Error
    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
  • Community member Profile Picture
    7 on at
    Plug-in Profiler Error
    I am facing the same issue. Are there any updates on this issue? 
  • Roddas77 Profile Picture
    18 on at
    Plug-in Profiler Error
    No, I have not found an answer to this issue as yet.
  • Alen79 Profile Picture
    13 on at
    Plug-in Profiler Error
    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? 
  • Community member Profile Picture
    4 on at
    Plug-in Profiler Error
    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.
  • Community member Profile Picture
    2 on at
    Plug-in Profiler Error
    I'm getting the same error. Did you manage to find a solution?

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 100 Super User 2025 Season 2

#2
Suresh Kulla Profile Picture

Suresh Kulla 72 Super User 2025 Season 2

#3
DAnny3211 Profile Picture

DAnny3211 54

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans