googlecodelabs / feedback

Provide feedback to our codelabs by filing an issue here
18 stars 22 forks source link

[cloud-usercontent-mlapis]: #684

Open jeffreycunn opened 4 years ago

jeffreycunn commented 4 years ago

In step 9 of the the codelab for "Scan User-generated content using Cloud Vision and Video Intelligence APIs" deploying the cloud functions requires a --runtime flag. The --runtime flag is not used in the example command. Also, it's not clear which nodejs runtime to use.

jeffreycunn commented 4 years ago

I added the --runtime flag with nodejs8. The functions loaded into Cloud Functions correctly. Then tried uploading my own .mp4 and .jpg to the upload bucket, but I received the following error: textPayload: "TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. at Function.Buffer.from (buffer.js:183:11) at GCStoPubsub (/srv/index.js:55:27) at /worker/worker.js:825:24 at at process._tickDomainCallback (internal/process/next_tick.js:229:7)"

jeffreycunn commented 4 years ago

I made the fix identified here: https://github.com/GoogleCloudPlatform/cloud-functions-intelligentcontent-nodejs/pull/2/commits/3e6f376aca362d92343ec4f8c29f2a4bfdf3e37d

And it worked!