Issue 45767: NAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet

issues
Status:closed
Assigned To:Guest
Type:Defect
Area:Assay
Priority:1
Milestone:22.03
Opened:2022-06-24 16:13 by mohara
Changed:2022-07-01 09:37 by mohara
Resolved:2022-06-30 07:32 by cnathe
Resolution:Fixed
Related:45764
Support Ticket:45764
Pull Requests:platform#3494
Closed:2022-07-01 09:37 by mohara
2022-06-24 16:13 mohara
Title»NAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet
Assigned To»triage
Notify»Keith
Type»Defect
Area»Assay
Priority»3
Milestone»22.07
Related»45764
Support Ticket»45764
The related ticket has 5 comments and includes attachments.

Using the .xlsx file attached to the ticket, this error is raised in the NAb assay import UI:
There was an error parsing TheFileName.xlsx.
Your data file may not be in xls format.
Error details: java.lang.NullPointerException: Cannot invoke "String.length()" because "r" is null

If you convert it to an .xls file, Excel warns you of 'minor fidelity loss', i.e. some formatting is being removed... but then the file works fine/loads the data expected.
If you remove the first sheet from the original .xlsx file, it loads normally.
If you only remove the logo image from the first sheet of the original .xlsx, it also uploads normally.

This was difficult to dig into because there is nothing in the logs, JS console, or by enabling any loggers. Karl suggests this might be related to Excel parsing changes.
In any event it would be great to have either error reporting/logging/or some other better outcome from problems in the Excel parser - in this case, it's looping through a multi-sheet Excel file to find the plate data, and so would possibly also work to ignore problems on one sheet and try the next one, at least in this case.

To repro, use the .xlsx file attached to the ticket to create a new NAb assay design, then try to import it.
Internal repro set up on the shared 22.3 server here:
https://serviceteam.labkey.com/Molly%20Sandbox/Assay%20Tutorial/project-begin.view?

2022-06-27 07:00 Keith
NotifyKeith»Keith;josephy

2022-06-27 09:16 josephy
Priority3»1
Increasing priority. The machines outputting xlsx files cannot output xls files so a workflow change to accommodate xls files is not a viable work-around for the long term. The current work-around is to manually change the file type from xlsx to xls or remove the first sheet of the xls for every file to be uploaded.

2022-06-27 09:25 josephy
additionally, client confirmed that there was no change to the machine outputs being fed to labkey.

2022-06-27 09:31 hannahb
Assigned Totriage»cnathe
Cory, do you mind estimating please? It's been changed to a Pri1, so ideally a 21.7 fix would be applied

2022-06-28 15:13 cnathe
NotifyKeith;josephy»Keith;josephy;Matthew Bellew
I have done a little investigation on this issue and tracked the error down to line 910 of ExcelLoader.startElement(). Matt, I might need to sync up with you to better understand the code patch here. I'll dig a bit deeper tomorrow morning and update this issue accordingly.

2022-06-29 07:54 cnathe
TitleNAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet»**NAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet
Milestone22.07»22.03
Pull Requests»https://github.com/LabKey/platform/pull/3494

2022-06-29 09:00 Matthew Bellew
The fix seems reasonable, but Adam is really the ExcelLoader guy.

2022-06-30 07:32 cnathe
resolve as Fixed
Title**NAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet»NAb assay design no longer accepting XLSX files - Error raised when image is included on first sheet
Statusopen»resolved
Assigned Tocnathe»mohara
NotifyKeith;josephy;Matthew Bellew»Keith;josephy;Matthew Bellew;adam
Fix has been merged to release22.3-SNAPSHOT and will be in LK v22.3.9. If this needs to be applied to a different LabKey release version, please let me know.

2022-07-01 09:37 mohara
close
Statusresolved»closed
Assigned Tomohara»Guest
Confirmed on release22.3-SNAPSHOT