[2026-02-09 10:37:01.000] === STARTING PROCESSING SESSION === [2026-02-09 10:37:01.000] PHP Version: 8.4.16 [2026-02-09 10:37:01.000] Memory Limit: 128M [2026-02-09 10:37:01.000] Max Execution Time: 120 [2026-02-09 10:37:01.000] Disabled functions: NONE [2026-02-09 10:37:01.000] Raw body length: 6592 [2026-02-09 10:37:01.000] Provided signature: 8de67301495916dc5e9d... [2026-02-09 10:37:01.000] Expected signature: 8de67301495916dc5e9d... [2026-02-09 10:37:01.000] Signature verified successfully [2026-02-09 10:37:01.000] Payload JSON decoded: SUCCESS [2026-02-09 10:37:01.000] Number of PDFs to process: 1 [2026-02-09 10:37:01.000] --- Processing PDF #1 --- [2026-02-09 10:37:01.000] PDF base64 provided: YES, length: 6548 [2026-02-09 10:37:01.000] PDF bytes decoded: 4911 bytes [2026-02-09 10:37:01.000] Temp PDF written to /tmp/invoice_6989b8cd6f394.pdf, bytes written: 4911 [2026-02-09 10:37:01.000] Temp PDF exists: YES [2026-02-09 10:37:01.000] Temp PDF size: 4911 bytes [2026-02-09 10:37:01.000] PDF hash: 0622971147486e1900037eff229d921d14f5b51aac7171729b2b66f81cdf6585 [2026-02-09 10:37:01.000] Checking database cache for hash: 0622971147486e19... [2026-02-09 10:37:01.000] CACHE MISS - Not found in database [2026-02-09 10:37:01.000] Starting PDF processing (not cached) [2026-02-09 10:37:01.000] STEP 1: Quick Smalot parser attempt [2026-02-09 10:37:01.000] Smalot parsing took: 0 seconds [2026-02-09 10:37:01.000] Number of pages detected: 1 [2026-02-09 10:37:01.000] Smalot extracted text length: 0 [2026-02-09 10:37:01.000] Smalot parser returned insufficient text (length: 0) [2026-02-09 10:37:01.000] Smalot failed or insufficient, GOING STRAIGHT TO LAMBDA (skipping pdftoppm/tesseract) [2026-02-09 10:37:01.000] run_lambda_ocr called, base64 length: 6548 [2026-02-09 10:37:01.000] Calling Lambda OCR... [2026-02-09 10:37:04.000] Lambda call took: 3.01 seconds [2026-02-09 10:37:04.000] Lambda HTTP response code: 200 [2026-02-09 10:37:04.000] Lambda response length: 14 [2026-02-09 10:37:04.000] Lambda response preview | Data: {"rawOCR": ""} [2026-02-09 10:37:04.000] Lambda OCR result length: 0 [2026-02-09 10:37:04.000] Lambda OCR preview | Data: [2026-02-09 10:37:04.000] Lambda OCR returned empty text [2026-02-09 10:37:04.000] No OCR text available, cannot parse with OpenAI [2026-02-09 10:37:04.000] Final AI result [2026-02-09 10:37:04.000] Using default values (AI parsing failed) [2026-02-09 10:37:04.000] Final extracted values | Data: {"invoice_number":"","amount":"0.00","due_date":null,"invoice_date":null,"currency":""} [2026-02-09 10:37:04.000] Attempting to save PDF to: /var/www/sandbox/pdfs/invoice_c73c7a54c410706b53781b6524b8e038.pdf [2026-02-09 10:37:04.000] PDF saved successfully to /var/www/sandbox/pdfs/invoice_c73c7a54c410706b53781b6524b8e038.pdf [2026-02-09 10:37:04.000] Database INSERT SUCCESS [2026-02-09 10:37:04.000] Adding to invoices array | Data: {"uuid":"c73c7a54c410706b53781b6524b8e038","invoice_number":"","amount":"0.00","due_date":null,"invoice_date":null,"currency":"","cached":false,"ocr_method":"lambda_primary","local_ocr_failed":true} [2026-02-09 10:37:04.000] --- Finished processing PDF #1 --- [2026-02-09 10:37:04.000] === TOTAL PROCESSING TIME: 3013.3ms === [2026-02-09 10:37:04.000] Total invoices processed: 1 [2026-02-09 10:37:04.000] Response sent, size: 213 bytes