[Bug]: Multiple issue associated - Stuck in % & Failed to write the result in excel
Describe the bug
No issue before the last update, since that we tried on 5 different computers, VM in Azure, Azure CLI in Azure portal, even with personal computer. We are getting a various different bug, but still the same result.
Some time it's just stuck in 12-22%, sometime just failed,
Here's the second message we are received randomly :
"""
WARNING: ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
brew install mono-libgdiplus
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
brew install mono-libgdiplus
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
brew install mono-libgdiplus
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: Auto-fitting columns is not available with this OS configuration.
WARNING: Auto-fitting columns is not available with this OS configuration.
DEBUG: 2025-05-15_11_00_21 - Creating Overall Panel.
WARNING: Failed adding PivotTable 'P0': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P0': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P1': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P1': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P3': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P3': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P4': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P4': Cannot bind argument to parameter 'PivotTable' because it is null.
WARNING: Failed adding PivotTable 'P5': Cannot index into a null array.
WARNING: Failed adding chart for pivotable 'P5': Cannot bind argument to parameter 'PivotTable' because it is null.
Write-Error: /Users/XXXXXX/.local/share/powershell/Modules/AzureResourceInventory/3.6.5/modules/Private/3.ReportingFunctions/StyleFunctions/Start-ARIExcelCustomization.ps1:92
Line |
92 | Build-ARIExcelComObject -File $File
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'ComObject'."
""""""
But still receiving the results of the data retrieved by the tool. Looks like is not able to write them to the excel. Sometime it's working, sometime partially, sometime not at all.
Same result on MacOS, Windows 10-11 - tested on 5 different machines + Azure CLI, same results.
We have all the GA/SA, Owner accesses on the subscriptions. Wasn't an issue last month.
Hello @spartafiset143
What version specifically? 3.6.6?
There was a bug in version 3.6.5 very much like that, but it was fixed at version 3.6.6.
I'm suspecting you might have both version installed, and sometimes it is using binaries from version 3.6.5 and sometimes it is using binaries from version 3.6.6.
Can you try to uninstall all the versions (just run uninstall-module AzureResourceInventory multiple times ) and then install the module and give it a try.
I'm having the same issue with both the prerelease version of 3.6.6 and 3.6.6 I believe in my case its to do with company policy requiring documents to be tagged with a "sensitivity label".
After an excel document is created it must be given a label before it can be saved.
I've noticed opening the generated excel doc will throw "Cannot edit PivotTable on protected sheet" until I select a sensitivity label and save. I believe this is ths source of the issue I'm experiencing.
I'm having the same issue with both the prerelease version of 3.6.6 and 3.6.6 I believe in my case its to do with company policy requiring documents to be tagged with a "sensitivity label".
After an excel document is created it must be given a label before it can be saved.
I've noticed opening the generated excel doc will throw "Cannot edit PivotTable on protected sheet" until I select a sensitivity label and save. I believe this is ths source of the issue I'm experiencing.
That is interesting. During the script we use to methods to edit the Excel file, the first one is actually creating the excel sheets, and the sensitivity label will not affect it.
But after that we use a method that will open the excel file and add some extra features to it (like conditional formatting..), and at this step the sensitivity label will bet affected.
There is no way to bypass the sensitivity label policy or to ignore it for a certain folder?
I'm getting the same error after re-installing the tool, but on Mac even with the Error, i'm still getting the results expected.
Note i did update Brew and this recommend command : "Please run the following command to install dependencies: brew install mono-libgdiplus" And start again, same result
Other information - On Windows corporate machine, OneDrive is indeed automatically sync with the User profile, the other Dev has indeed the Sensitive label available, but in audit mode and not forcing to label document. On my MacBook, the user profiles is not automatically sync with OneDrive. However, on the isolated VM, Azure CLI we are getting the same kind of error. Only on the Personal Windows machine, i got 1-2 errors, but mostly working okay(Including the Mac)
I am in the same situation
Let's split the issues, one issue is regarding the sensitivity label, that I believe is set by corporate policy and we can't do much from the script perspective, Only recommend to use the parameter -Lite, this will prevent the script from opening the Excel File and do extra customization.
The other and main issue, is the report not getting created or the process get stuck. This is still happening?
This Issue is stale and may be automatically close soon.