-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlTraceFlag: Cannot bind argument to parameter 'ReferenceObject' because it is null. #1688
Comments
Hmm... strange. @johlju What do you think? Could this be the same? If so, how do you want this to be fixed? |
@joshshand Two things to test to rule things out.
|
@johlju and @Fiander I hopefully have a decent update for you here:
In my console output:
I noticed TraceFlags is in fact null...because when I have a "fresh" server there are no flags set. |
Just found that for the Test-TargetResource 5 test were missing. The tests with an empty server. Just added those tests, and they failed. Its kind of busy at the real job at the moment, sow i did not have the time yet to use this module myself. |
@joshshand great job debugging this! @Fiander thank you for taking the time to make a fix for this! I will review it. And, no worries - bugs happen - part of life 😄 Awesome job! 🙇 |
heej, I'm not worried :-) just stupid for forgetting those tests. Mainly because i already did all the preparation for those tests. |
It happens to everyone. When coding one is so in the code so one forget stuff. I missed it in the review too. 😅 |
Thanks again for sorting this, look forward to testing the next release! |
The release will be available shortly, it is building now. |
Details of the scenario you tried and the problem that is occurring
Re-testing SqlTraceFlag with basic configuration.
Assemblies are now loaded as per resolved issue #1680 but now running into new problems 😢 .
First error thrown relates to
Test-TargetResource
where TraceFlags is compared with Actual TraceFlags: https://github.com/dsccommunity/SqlServerDsc/blob/main/source/DSCResources/DSC_SqlTraceFlag/DSC_SqlTraceFlag.psm1#L375Not sure why ReferenceObject would be null - I tried running sections of the code manually and it seems to generate the required object.
@Fiander @johlju you may have interest in this. Thanks
Verbose logs showing the problem
Suggested solution to the issue
N/A
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SQL Server edition and version the target node is running
SQL Server PowerShell modules present on the target node
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: