I believe the GCF OCR sample needs to be updated to the latest Google Cloud client libraries, and there might be some code changes required.