Error "The required event providers were not found." when running custom script

When running D365FO custom script we ran into the following error.

[19.11.2024 13:06:53] Unable to start trace: The required event providers were not found. Contact your system administrator
[19.11.2024 13:06:53] at Dynamics.AX.Application.SysTraceController.`startSQLTrace(String _traceSessionName, Boolean @_traceSessionName_IsDefaultSet)
at Dynamics.AX.Application.SysTraceController.startSQLTrace(String _traceSessionName, Boolean @_traceSessionName_IsDefaultSet)
at Dynamics.AX.Application.SysTraceController.startSQLTrace(String _traceSessionName)
at Dynamics.AX.Application.AppConsistencyCustomScriptTraceParser.startSQLTrace() in xppSource://Source/AppTroubleshooting\AxClass_AppConsistencyCustomScriptTraceParser.xpp:line 30
at Dynamics.AX.Application.AppConsistencyCustomScriptStateChange.process(Boolean _isTestRun) in xppSource://Source/AppTroubleshooting\AxClass_AppConsistencyCustomScriptStateChange.xpp:line 108
[19.11.2024 13:06:53] Infolog:
Unable to start trace: The required event providers were not found. Contact your system administrator
[19.11.2024 13:06:53] Completed

It has turned out that the problem was in missing log group in Event viewer.


This article explains the same problem at some other functionality and provides the resolutions script that recreates the missing log groups. It has solved the problem :slight_smile:

The question is why some log groups are missing. I do not know the answer, but it seems like an upgrade related problem. Out of several local D365 environments the problem appeared just on some of them even though all have been created from the same VHD (and later upgraded to different D365FO versions). One environment was missing the whole Applications and Services Logs\Microsoft\Dynamics! Most of the functionalities do not complain about missing log group, but some are throwing errors as in our case.