department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

Faulty SC Evidence - 2024-08-03 #90344

Closed shaunburdick closed 2 weeks ago

shaunburdick commented 1 month ago

What happened?

Describe what went wrong:

We received a report from LH indicating that one SC Evidence Upload failed with the following error:

Upstream status: 415 - Unsupported or Corrupted File type (only PDFs are accepted)
shaunburdick commented 1 month ago

Pulled the file from our S3 bucket and I was able to open it (securely via AVD) using Adobe Acrobat.

Reached out to Michel McDonald who was also to verify the file would open, however they discovered that there was a non-fatal corruption of the file.

pdf_validator_options = VBADocuments::DocumentRequestValidator.pdf_validator_options

#Pull the BI multipart from s3 via guid
tempfile, timestamp = VBADocuments::PayloadManager.download_raw_file(GUID)

#splits the bi sub multipart upload into individual parts(metadata, pdfs)
parts = VBADocuments::MultipartParser.parse(tempfile.path)

validation_result = PDFUtilities::PDFValidator::Validator.new(parts['content'].path, pdf_validator_options).validate

validation_result.valid_pdf?
=> true

#the above was our BI checks, which works, but reader does not like:
reader = PDF::Reader.new(parts['content'].path)
=> `new': xref table not found at offset 2904045 (00058000 != xref) (PDF::Reader::MalformedPDFError)

From their investigation, it would appear that the PDF software EMMS/CMS uses has an issue with the file. I will work with our enablement team to decide where to go from here.

dfong-adh commented 4 weeks ago

LH response: push back to EVMS that this should have been accepted

dfong-adh commented 3 weeks ago

Shaun to reach out to Andrew with the actual PDF evidence file

dfong-adh commented 3 weeks ago

No updates - evidence file was sent

shaunburdick commented 2 weeks ago

File was sent to Andrew Gray (VBAVACO) via encrypted VA email.