When going into Software tab inside of CCM and then drilling down into a single software. When you attempt to click the Export to excel modal on the individual software's page you get an internal error.
What is Expected?
This should not error but result in an excel report being generated
How Did You Get This To Happen? (Steps to Reproduce)
Open the CCM webpage
Click on Software in the left hand site navigation.
Select any individual software entry. This should open a new page specific to just that software.
Click the Export to excel modal, located toward the top right on the page.
An internal error occurs.
Picture of Chocolatey software page for reference:
System Details
OS Build (In PowerShell run: 10.0.20348.0
Windows PowerShell version: 5.1.20348.558
Chocolatey version: 1.1.0
Chocolatey Central Management version: 0.10.0
Output Log
Relevant ccm-website.log output
~~~sh
2022-10-03 12:58:35,406 35 [ERROR] - sheetName 'Software and associated Computers' is invalid - character count MUST be greater than or equal to 1 and less than or equal to 31
System.ArgumentException: sheetName 'Software and associated Computers' is invalid - character count MUST be greater than or equal to 1 and less than or equal to 31
at NPOI.SS.Util.WorkbookUtil.ValidateSheetName(String sheetName)
at NPOI.XSSF.UserModel.XSSFWorkbook.CreateSheet(String sheetname)
at ChocolateySoftware.ChocolateyManagement.Computers.Exporting.ComputerSoftwareExcelExporter.#=z2nYXmS6F0tIBrSlnFg==.#=z2Jmbsl0XVfgv6T3vTg==(XSSFWorkbook #=zxAaZSsjjBV3pjB7ccQ==)
at ChocolateySoftware.ChocolateyManagement.DataExporting.Excel.NPOI.NpoiExcelExporterBase.CreateExcelPackage(String fileName, Action`1 creator)
at ChocolateySoftware.ChocolateyManagement.Computers.Exporting.ComputerSoftwareExcelExporter.ExportToFile(DateTime reportDate, SoftwareDto softwareDto, List`1 computerDtos)
at ChocolateySoftware.ChocolateyManagement.Computers.ComputerSoftwareAppService.GetSoftwareComputersToExcel(Int64 softwareId)
at lambda_method2755(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
~~~
What You Are Seeing?
When going into Software tab inside of CCM and then drilling down into a single software. When you attempt to click the
Export to excel
modal on the individual software's page you get an internal error.What is Expected?
This should not error but result in an excel report being generated
How Did You Get This To Happen? (Steps to Reproduce)
Picture of Chocolatey software page for reference:
System Details
Output Log
Relevant ccm-website.log output
~~~sh 2022-10-03 12:58:35,406 35 [ERROR] - sheetName 'Software and associated Computers' is invalid - character count MUST be greater than or equal to 1 and less than or equal to 31 System.ArgumentException: sheetName 'Software and associated Computers' is invalid - character count MUST be greater than or equal to 1 and less than or equal to 31 at NPOI.SS.Util.WorkbookUtil.ValidateSheetName(String sheetName) at NPOI.XSSF.UserModel.XSSFWorkbook.CreateSheet(String sheetname) at ChocolateySoftware.ChocolateyManagement.Computers.Exporting.ComputerSoftwareExcelExporter.#=z2nYXmS6F0tIBrSlnFg==.#=z2Jmbsl0XVfgv6T3vTg==(XSSFWorkbook #=zxAaZSsjjBV3pjB7ccQ==) at ChocolateySoftware.ChocolateyManagement.DataExporting.Excel.NPOI.NpoiExcelExporterBase.CreateExcelPackage(String fileName, Action`1 creator) at ChocolateySoftware.ChocolateyManagement.Computers.Exporting.ComputerSoftwareExcelExporter.ExportToFile(DateTime reportDate, SoftwareDto softwareDto, List`1 computerDtos) at ChocolateySoftware.ChocolateyManagement.Computers.ComputerSoftwareAppService.GetSoftwareComputersToExcel(Int64 softwareId) at lambda_method2755(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
~~~
References
┆Issue is synchronized with this Gitlab issue by Unito ┆Milestone: 0.10.1