Я получаю следующую ошибку от функции Cloud, которая использует API Cloud Vision:
Error: 1 CANCELLED: The operation was cancelled.
at Object.callErrorFromStatus (/srv/functions/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
at Http2CallStream.call.on (/srv/functions/node_modules/@grpc/grpc-js/build/src/client.js:96:33)
at Http2CallStream.emit (events.js:203:15)
at Http2CallStream.EventEmitter.emit (domain.js:466:23)
at process.nextTick (/srv/functions/node_modules/@grpc/grpc-js/build/src/call-stream.js:100:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 1,
details: 'The operation was cancelled.',
metadata:
Metadata {
internalRepr:
Map {
'google.rpc.debuginfo-bin' => [Array],
'grpc-status-details-bin' => [Array] },
options: {} },
note:
'Exception occurred in retry method that was not classified as transient' }
Код выглядит следующим образом:
const vision = require('@google-cloud/vision');
const client = new vision.ImageAnnotatorClient();
const [result] = await client.textDetection(`gs://${process.env.GCLOUD_PROJECT}.appspot.com/${fileName}`)
.catch((err: any) => {
return db.doc(event.ref.path).update({ status: 'error' });
});
Не уверен, что это связано с проблемами, которые были у Firebase сегодня?