Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Plug-in Profiler Error

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?
 
  • 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
    Community member Profile Picture
    Community member 13 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
    Amit Katariya007 8,525 Super User 2024 Season 1 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
  • Plug-in Profiler Error
    I am facing the same issue. Are there any updates on this issue? 
  • Roddas77 Profile Picture
    Roddas77 18 on at
    Plug-in Profiler Error
    No, I have not found an answer to this issue as yet.
  • Alen79 Profile Picture
    Alen79 2 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? 
  • 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.
  • 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans