ARI icon indicating copy to clipboard operation
ARI copied to clipboard

[Bug]: Multiple issue associated - Stuck in % & Failed to write the result in excel

Open spartafiset143 opened this issue 7 months ago • 9 comments

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.

spartafiset143 avatar May 15 '25 18:05 spartafiset143

Hello @spartafiset143

What version specifically? 3.6.6?

Claudio-Merola avatar May 15 '25 20:05 Claudio-Merola

Hello @spartafiset143

What version specifically? 3.6.6?

The latest version

spartafiset143 avatar May 15 '25 20:05 spartafiset143

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.

Claudio-Merola avatar May 15 '25 20:05 Claudio-Merola

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.

space-goose avatar May 16 '25 00:05 space-goose

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?

Claudio-Merola avatar May 16 '25 13:05 Claudio-Merola

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)

spartafiset143 avatar May 20 '25 14:05 spartafiset143

I am in the same situation

bkarakashev avatar May 22 '25 15:05 bkarakashev

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?

Claudio-Merola avatar May 23 '25 13:05 Claudio-Merola

This Issue is stale and may be automatically close soon.

github-actions[bot] avatar Jun 22 '25 14:06 github-actions[bot]