Closed
Description
I want to use cloud functions for various image operations (metadata, thumbnails, watermarking).
Unfortunately, in all image-related samples I encounter error:
ApiError: Forbidden
at new util.ApiError (/user_code/node_modules/@google-cloud/storage/node_modules/@google-cloud/common/src/util.js:107:10)
at Object.parseHttpRespMessage (/user_code/node_modules/@google-cloud/storage/node_modules/@google-cloud/common/src/util.js:149:33)
at Object.handleResp (/user_code/node_modules/@google-cloud/storage/node_modules/@google-cloud/common/src/util.js:124:18)
at Duplexify.<anonymous> (/user_code/node_modules/@google-cloud/storage/src/file.js:711:21)
at emitOne (events.js:96:13)
at Duplexify.emit (events.js:188:7)
at emitOne (events.js:96:13)
at DestroyableTransform.emit (events.js:188:7)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
Storage rules
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read;
allow write: if request.auth != null;
}
}
}
I tried samples:
- exif-images
- convert-images
- generate-thumbnail
I'm copy pasting index.js and package.json content without changes.
Storage triggers are working, there is no error if image operations will not be executed ( in case of deletion event, or if image is already jpg in convert-images sample), but it will crash when line
return bucket.file(filePath).download({destination: tempLocalFile}).then(() => {
is reached.
Thanks in Advance.
Metadata
Metadata
Assignees
Labels
No labels