It is very frustrating. I get this message when trying decode file scan.jpg.
According to doc:
DocumentA document value that represents a PDF document or a TIFF image that contains one or more barcodes to decode.
So, jpg is not supported format ... Great ...