dbachecks icon indicating copy to clipboard operation
dbachecks copied to clipboard

When using Update-DbcPowerBiDataSource I get an error that ListDictionaryInternal is not supported for serialization

Open dbaduck opened this issue 3 years ago • 4 comments

Bug Report

General Troubleshooting steps

  • [X] Verified running the latest release of dbachecks?

Does (Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString() Yes

image

  • [X] Verified errors are not related to permissions?
  • [X] Can duplicate in new/clean PowerShell session (clean = powershell -NoProfile)?

Version Information

  • Operating System (Name|Version): Windows 10 Pro | 10.0.19043
  • PowerShell Version: 5.1.19041.1237
  • SQL Server (Edition|Version): SQL 2019 Standard | 15.0.4153

Steps to Reproduce

<--
PLEASE include as much information as possible if this is a bug report. The more you include the faster we can identify the problem and get it fixed --> I just run the command like this: Invoke-DbcCheck -SqlInstance instancename -AllChecks -ExcludeCheck TestLastBackup, TestLastBackupVerifyOnly -passthru | Update-DbcPowerBiDataSource

Errors at the end: Convertto-Json : The type 'System.Collections.ListDictionaryInternal' is not supported for serialization or deserialization of a dictionary. Keys must be strings.

  • [ ] Attach any screenshots (if possible/allowed)
  • [X] Attach output from PowerShell console (if possible/allowed) (above)

Description of Bug

<--
PLEASE include as much information as possible if this is a bug Explain what it does that you would like it not to do or What it doesnt do that you would like it to do :-) --> It should update my PowerBiDataSource.

dbaduck avatar Mar 12 '22 05:03 dbaduck

I hit the same problem. is there a any workaround to by-pass?

aryasoft avatar Apr 20 '22 11:04 aryasoft

as a workaround tried another user and problem disappear. we have same permission with my friend. he can run this command without any error, but I can't. interesting.. I didn't investigate to identify to root cause.

aryasoft avatar Apr 21 '22 12:04 aryasoft

I wonder if this error is memory related with converting to Json. Maybe we want to add the function Convert-OutputObject and use that instead of ConvertTo-Json? I know Rob states to output to database for best results, however, if we can possibly eliminate use of ConvertTo-Json with the above, that might eliminate the challenges with ConvertTo-Json.

jstexasdba avatar Jul 08 '22 14:07 jstexasdba