firebase / extensions Goto Github PK
View Code? Open in Web Editor NEWSource code for official Firebase extensions
Home Page: https://firebase.google.com/products/extensions
License: Apache License 2.0
Source code for official Firebase extensions
Home Page: https://firebase.google.com/products/extensions
License: Apache License 2.0
This feature request is for extension: _ (storage-resize-images
)
To help discovering if resized images were created for an image add resized image path/name(s) as a meta information to the original image
Will help finding thumbnails without extra queries even with changing configurations.
Resize Image, default settings
set Bucket to name of any other bucket that is not your default
Deployment location Description
us-central1
Cloud Storage bucket for images Description
new-second-bucket
Sizes of resized images Description
128x128
Cloud Storage path for resized images (Optional) Description
Parameter not set
Cache-Control header for resized images (Optional) Description
Parameter not set
Cloud Storage Bucket is not clear on the naming convention
should it be "new-second-bucket" per "gs://new-second-bucket"
or <bucket>.<project>.appspot.com/
or something else?
needs to be clearer on how to define your custom bucket
Install new extention "Resize Image"
configure the bucket to match the url of the second or alternative bucket
ie "gs://new-second-bucket" to "new-second-bucket"
or other respectable forms
it should use the defined bucket
Error occurred while deploying resources: RESOURCE_ERROR: /deployments/firebase-ext-storage-resize-images/resources/generateResizedImage
{"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"The request has errors","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"event_trigger.resource","description":"GCS bucket resource projects/_/buckets/https://console.cloud.google.com/storage/browser/new-second-bucket does not match the expected pattern, which is projects/{project}/buckets/{bucket}"}]}],"statusMessage":"Bad Request","requestPath":"https://cloudfunctions.googleapis.com/v1/projects/worldsbeyond-1/locations/us-central1/functions/ext-storage-resize-images-generateResizedImage","httpMethod":"PATCH"}}There was an unknown error while processing the request. Try again.
I activated the resize extention on my Storage bucket.
I have photos inside a folder in the storage.
When uploading a picture, the extension keeps creating thumb in thumb folders and images
folder has a file named: _200x200.jpg and another folder thumb inside which has the same content.
Extension and bucket are in Europe-West
Thank you,
Bogdan
This feature request is for extension: delete-user-data
It would be helpful if the delete-user-data extension could delete all documents in subcollections as well.
Often you would have one or more subcollections below a user profile document.
Example: /users/{UID}/stories
or /users/{UID}/likes
.
In this case it would be really nice if the extension could delete all documents in a specified subcollection, or maybe all documents in any subcollections (recursively). This is not trivial to implement, and therefore fits very nicely in the delete-user-data
extension.
Yes
This feature request is for extension: firestore-translate-text
I want Translate Text to get its own mascot! Perhaps an olympics bear?
I would make stickers out of the new mascot.
Full-text Search
Currently, we'd have to use Algolia. It's not that hard to implement but having to manage both the data between Firebase and Algolia gives some sort of overhead. Maybe Firebase Extensions can bridge the two?
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
I installed it and it returned translated results!
Yes
fs-bq-import-collection
does not import collection that have the following security rule:
match /private_collection/{userId}/{document=**} {
allow read: if request.auth.uid == userId;
allow write, create: if false;
}
I am trying to import existing documents in a collection that can be read by the currently auth'ed user. However, the import script does not import any documents.
Finished importing 0 Firestore rows to BigQuery
Existing data imported to BigQuery.
No data imported to BigQuery.
Thanks for looking into this!
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
This feature request is for extension: firestore-counter
The current web client code is not safe for use in nodejs cloud function environment due to the reliance on document
, specifically, document.cooke
for the storage of the shard id.
var sharded = require('sharded-counter')
...
I would expect that other folks have need to be able to update counters in a more secure fashion rather than exposed on the client. In my case, updating inventory counts.
I've already tested the below as a possible solution
change /extensions/firestore-counter/clients/web/src/index.ts
to:
function getShardId(cookie: string): string {
const shardId = uuid.v4();
// make node env friendly...
if (typeof document !== 'undefined') {
const result = new RegExp(
"(?:^|; )" + encodeURIComponent(cookie) + "=([^;]*)"
).exec(document.cookie);
if (result) return result[1];
const date = new Date();
date.setTime(date.getTime() + 30 * 24 * 60 * 60 * 1000);
const expires = "; expires=" + date.toUTCString();
document.cookie =
encodeURIComponent(cookie) + "=" + shardId + expires + "; path=/";
}
return shardId;
}
change: /extensions/firestore-counter/clients/web/webpack.config.js
:
change: libraryTarget: 'var',
to:
libraryTarget: 'umd',
globalObject: 'this',
I can make the above as a PR since I've already done this locally for my testing to use.
I wanted to ask about this before just submitting a PR since you all might have a really good reason not to have a node friendly option that I'm not aware of - for example is there a terrible thing not to re-use shardId
's?
I see transactional e-mails as a common use case firebase users will implement. If this feature gets picked I'd be happy to contribute to its development. However I'd appreciate some guidelines as to how a function technically differs from an extension.
In my company we currently use mailjet in combination with firebase functions. This is a minimal example to send welcome mails on authentication events, but other triggers could be useful as well.
firestore-bigquery-export
When browsing the records I noticed they return the payload in a catchall data
field. If I want to query on this field as if it were parsed into a record from json what is the best practice here?
Use big query more effectively on collection attributes.
Excelent extension the Resize Images, really usefull!
How can I uninstall it or change the location from US to Europe as to be near my storage bucket location?
Best regards,
Bogdan
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
This feature request is for extension: storage-resize-images
I would like to have an option to make it so that instead of just resizing GIFs, it would generate a still frame of that GIF.
Furthermore, extending the extension to be able to generate video thumbnails or making a new extension for that purpose would be greatly appreciated as well.
This would greatly improve workflow for social platforms where users upload a mix of GIFs, images and video.
Similar to how there is an extension for Google Translate, I was wondering
if there are any plans to make an extension for Google Cloud Speech To Text?
I'd be happy to contribute to the open source development, if this gets picked up and there are some general directions on how to go about developing a firebase extensions etc..
I've already raised it through Firebase support directly, and they mentioned to raise it here as well.
I'd use it to make Apps that have a transcription service component with Firebase, eg bbc/digital-paper-edit, autoedit2.
yes
storage-resize-images
When uploading an image to the storage bucket, seemingly infinite thumbnails
folders are created, which exceeded my quota for SocketConnectNonbillable
within seconds.
Upload an image to storage bucket.
Image should be resized inside one lowRes
folder.
The folder was created multiple times, each containing the resized image, which probably lead to my quota exceeding.
Logs i managed to get before my quota was exceeded:
(shortened paths with ... in order to make it more readable)
Function execution started
Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions
Started execution of extension with configuration { bucket: '[...]', cacheControlHeader: undefined, imageSizes: [ '200x200' ], resizedImagesPath: 'lowRes' }
Creating temporary directory: '/tmp/[...]/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes'
Created temporary directory: '/tmp/[...]/lowRes/.../lowRes'
Downloading image file: '[...]/lowRes.../lowRes/_200x200'
Downloaded image file: '[...]/lowRes/.../lowRes/_200x200' to '/tmp/[...]/lowRes/.../lowRes/_200x200'
Resizing image at path '/tmp/_200x200' to size: 200x200
Resized image created at '/tmp/_200x200'
Uploading resized image to '[...]/lowRes/.../lowRes/_200x200'
Uploaded resized image to '[...]/lowRes/.../lowRes/_200x200'
Deleting temporary resized file: '[...]/lowRes/.../lowRes/_200x200'
Deleted temporary resized file: '[...]/lowRes/.../lowRes/_200x200'
Completed execution of extension
Deleting temporary original file: '[...]/lowRes/.../lowRes/_200x200'
Deleted temporary original file: '[...]/lowRes/.../lowRes/_200x200'
Function execution took 465 ms, finished with status: 'ok'
Error: quota exceeded (Quota exceeded for quota group 'SocketConnectNonbillable' and limit 'CLIENT_PROJECT-100s' of service 'cloudfunctions.googleapis.com' for consumer 'project_number:[...]'.);
In conclusion, the cloud function was called ~500 times which can be seen in my statistics.
(I never used cloud functions before and only tried to upload an image two times)
Later i also got this error, probably as a result:
at Util.parseHttpRespBody (/srv/node_modules/@google-cloud/common/build/src/util.js:191:38)
at Util.handleResp (/srv/node_modules/@google-cloud/common/build/src/util.js:135:117)
at retryRequest (/srv/node_modules/@google-cloud/common/build/src/util.js:423:22)
at onResponse (/srv/node_modules/retry-request/index.js:206:7)
at /srv/node_modules/teeny-request/build/src/index.js:158:17
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
code: 400,
errors:
[ { domain: 'global',
reason: 'invalid',
message: 'The maximum object length is 1024 characters, but got a name with 1025 characters: \'\'[...]/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRe...\'\'' } ],
response: undefined,
message: 'The maximum object length is 1024 characters, but got a name with 1025 characters: \'\'[...]/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRes/lowRe...\'\'' }```
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
firestore-send-email
firestore-send-email throw an unhandled error at cold start :
Unhandled error occurred during processing: { Error
at Http2CallStream.call.on (/srv/node_modules/@grpc/grpc-js/build/src/client.js:96:45)
at emitOne (events.js:121:20)
at Http2CallStream.emit (events.js:211:7)
at process.nextTick (/srv/node_modules/@grpc/grpc-js/build/src/call-stream.js:71:22)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickDomainCallback (internal/process/next_tick.js:219:9)
code: 13,
details: '',
metadata: Metadata { options: undefined, internalRepr: Map {} },
note: 'Exception occurred in retry method that was not classified as transient' }
Mail send / or send retry
Mail not sent and not retried
firestore-translate-text
firestore-translate-text
extension.ar
I except for the target languages field to be able to accept ONE target languages
The target languages field only accepts MORE than one language
OR
firestore-send-email
the ability to add custom header in a mail
We use Mandrill API to send emails and we can add some custom metadata to every message.
We can also add metadata sending email with Mandrill smtp but we need to pass them in the X-MC-Metadata header.
It would be great if we can specify in each message and at template level some headers to include in the message
50x50,200x200,400x400,800x800
images
A few days ago I tried and the below occurred. I just tried again tonight and I'm facing the same issue, so figure this is the best place for this. I've just set the Resize Image extension up and the test run (just uploading an image) is causing an infinite loop of uploads and deletes (and error messages), where the newly resized images appear to be attempting to create new images, or something similar. My input for Cloud Storage path for resized images
is images
and this is leading to this error:
Deleting temporary resized file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_200x200'
I'm currently seeing an issue where a single image is causing the function to run until it hits:
Error when resizing image { Error: Backend Error
...
code: 503,
errors:
[ { domain: 'global',
reason: 'backendError',
message: 'Backend Error' } ],
response: undefined,
message: 'Backend Error' }
Any ideas for a solution to this? I uninstalled the extension to stop the infinite loop but not sure how to make the extension run smoothly.
The only steps I've taken so far were the setup guide of accepting a few things and changing the path to images
.
What happened? How can we make the problem occur?
Configure extension for images folder.
Upload image to images folder.
Watch logs explode!
Here's an example of the logs:
12:10:59.174 AM
ext-storage-resize-images-generateResizedImage
Function execution took 18269 ms, finished with status: 'ok'
12:10:59.169 AM
ext-storage-resize-images-generateResizedImage
Deleted temporary original file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:59.169 AM
ext-storage-resize-images-generateResizedImage
Deleting temporary original file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:59.169 AM
ext-storage-resize-images-generateResizedImage
Failed execution of extension
12:10:59.169 AM
ext-storage-resize-images-generateResizedImage
Deleted temporary resized file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:59.168 AM
ext-storage-resize-images-generateResizedImage
Deleting temporary resized file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:59.168 AM
ext-storage-resize-images-generateResizedImage
Uploaded resized image to 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:57.072 AM
ext-storage-resize-images-generateResizedImage
Function execution took 11315 ms, finished with status: 'ok'
12:10:57.058 AM
ext-storage-resize-images-generateResizedImage
Deleted temporary original file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:57.058 AM
ext-storage-resize-images-generateResizedImage
Deleting temporary original file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_50x50'
12:10:57.058 AM
ext-storage-resize-images-generateResizedImage
Failed execution of extension
Resized images at /images.
Mayhem, as detailed above. I know the functionality is new, only let out into the wild 2 weeks ago! Definitely will be patient with it.*
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
This feature request is for extension: firestore-send-email
If would like to be able to attach files when I use the send email extension.
I want to send my users some files when they request them.
Hi - not sure if this is the right place for support, but here goes...
My emails are stuck in 'PROCESSING' mode
i'm using gmail to send my mails, using smtp://[email protected]:[email protected]:465
what am i doing wrong?
thanks in advance
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
firestore-send-email
If the mail subject contains specials characters, they are printed in html code.
Exemple :
A field name: "Jack o'neill"
used in mail subject : "Welcome to {{name}}"
should be printed Welcome Jack o'neill
in mail subject.
Welcome Jack o'neill
Maybe I miss something ?
PS : It works well in email's body
yes
This feature request is for extension: storage-resize-images
I would like to only store the resized image.
This could be useful for profile pictures, which are never seen in full resolution.
This feature request is for extension: firestore-limit-child-nodes
I would like a firestore-limit-child-nodes
to be created, just like rtdb-limit-child-nodes
.
Same use-case as for rtdb-limit-child-nodes
, but for Firestore.
Yes
This feature request is for extension: _ (storage-resize-images
)
Any object on firebase storage contains firebaseStorageDownloadTokens from object metadata. However this is not available for resized images
I use firebaseStorageDownloadTokens to construct the downloadUrl for the object
Describe the problem
When an image is uploaded to the storage bucket using the Firestore Javascript client library (I didn't test it with other libraries), if the image doesn't have an extension (e.g .jpg) in its filename, the name of the resized image is just "_200x200". It is missing the actual original filename. If multiple images are uploaded, each resized image overwrites the previous one because they all have the exact same "_200x200" as the filename.
1 - Setup Resize Images Firebase Extension using standard config settings.
2 - Use the Firebase Javascript library to upload an image with a filename that does not contain an extension (e.g. "uploaded_file") to the Firebase storage bucket.
The filename of the resized image should contain the original filename with the size appended to the name.
The filename of the resized image is just the file size without the original filename
Hi,
Can you provide and example of how to use templates with Trigger Email extension ?
What I'm not sure about :
Some code example would be great :)
Thanks a lot
Yes
This feature request is for extension: delete-user-data
When setting up delete-user-data, it would be great if we could also delete items by a value. In the friendlymarket codelab for example, we store items in the forsale
collection. Each item then contains the uid of the user in the seller
field. The path here is forsale/{Item UID}/seller
Right now, the extension only allows us to delete items if the UID
is part of the path. It would be great if we could also delete items that have a UID as a value.
In the friendlymarket example, I could delete all items a user is selling when the user wants their account deleted
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
This feature request is for extension: **\firestore-send-email
Allow multiple collections to trigger emails. I tried adding "mail, contactMe" and got the following message:
Error installing. Some extension resources may not be fully provisioned or ready to use.
Multiple collections to trigger emails through comma separated list.
OMG I know this is not a BUG or REPORT post but I gotta let the team behind this knows that this extensions works very wonderful. Tried upload a JPG image of 787kB and after a refresh it resize the size to a freaking 13kB! That's a massive reduction of pixel as well as sizes. I wonder what happens if I reupload all my WEBP format.
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
npm run import
chats/{chatid}/posts
>> The collection path must only contain letters or spaces
Allow widecard paths to import.
Get an error: >> The collection path must only contain letters or spaces
In the IMPORT_EXISTING_DOCUMENTS.md guide there is guide to run Run npx @firebaseextensions/fs-bq-import-collection
script. This gives an error:
404 @firebaseextensions/fs-bq-import-collection@latest' is not in the npm registry.
run
npx @firebaseextensions/fs-bq-import-collection@latest
runs the script
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@firebaseextensions%2ffs-bq-import-collection - Not found
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
storage-resize-images
Image auto resize based on Firestore/Realtime Database document creation/update.
When a user uploads a profile image, I save the image path on the document of the user in either Firestore or Realtime Database, I would like to run the resize extension, but attach the downloadURL for the new resized image to the document as well, either overwriting the parameter for the original image, or have the option to create a new parameter for the thumbnail.
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
Currently, in the worst case, firestore-counter will act on 499 documents at once since that's the shard limit. (https://github.com/firebase/extensions/blob/master/firestore-counter/functions/src/worker.ts#L32). This is not recommended by the Firestore team. A transaction will have decreased performance if it writes/deletes more than 100 documents inside a transaction.
The code needs to be modified to ensure no more than 100 documents are touched inside a single transaction. It might require changing the number of plans: https://github.com/firebase/extensions/blob/master/firestore-counter/functions/src/worker.ts#L186
Yes
storage-resize-images
)I just added storage-resize-images extension to my firebase project, it is working as expected when i upload an image manually from the firebase console, but the problem is that whenever i use
storageRef.putString()
function to upload base64 url encoded image to the firebase storage cloud, the compressed image will be created but its name is only _64x64 (not original_64x64).
Obviously i am resizing images as 64x64.
Since the created file doesn't contain a unique name it is unaccessible for me dynamically...Is there something am i missing?
Install storage-resize-images extension to my firebase project.(web)
storage-resize-images extension to create an image file using the "original.jpeg" image as "original_64x64.jpeg"
The extension generated the image as expected but the naming was wrong, it is _64x64.jpeg instead of original_64x64.jpeg
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to
Firebase support directly.
Multiple
Fix vulnerability alerts by updating some dependencies: https://github.com/firebase/extensions/network/alerts
Tell us how you'd use this feature in your app.
This feature request is for extension: storage-resize-images
Currently, the file extension is being read from the original file name. If no file extension is provided, the type should be read from the image contentType to generate the new image.
Appending the extension to the resulting resized images should be conditional based on if the original name included the extension.
It is possible that this feature will solve issue 20. I experienced the same issue when I first uploaded files w/o extensions.
Store images keyed off of a field in a db w/o having the manage the image file type.
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
storage-resize-images
, firestore-send-email
, etc)What happened? How can we make the problem occur?
It works for simple filenames like "foo.jpg"
but fails for filenames like " 4D44HulplLt35S6VDbf22:2019-03-18T16:58:41.123-05:00.jpg"
TypeError: Cannot read property 'startsWith' of undefined at Object.exports.isImage (/srv/functions/lib/validators.js:18:48) at Object.<anonymous> (/srv/functions/lib/index.js:46:32) at Generator.next (<anonymous>) at /srv/functions/lib/index.js:22:71 at new Promise (<anonymous>) at __awaiter (/srv/functions/lib/index.js:18:12) at exports.generateResizedImage.functions.storage.object.onFinalize (/srv/functions/lib/index.js:43:82) at cloudFunctionNewSignature (/srv/node_modules/firebase-functions/lib/cloud-functions.js:120:23) at /worker/worker.js:825:24 at <anonymous>
This could be a description, log/console output, etc.
Cloud Firestore structure: /users/{UID}/
Regardless of whether I delete a user from the console or the client (Android app), the user's document nor any sub-collections/documents are deleted. This occurs whether the user is created via the console or the client.
Function logs indicate that it finishes with status OK.
This feature request is for extension: \firestore-counter
Make the sharded-counter.js
work not only for the frontend but for backend services like node.js
. This requirement includes not to depend on requiring / importing firebase/app
and firebase/firestore
in the user code, but on the SDK code instead.
In our case, we use a backend service to make our web site cleaner and lighter without Firebase SDK, so, all the usage of Firebase occurs in the backend. We would like to use the counter so that's why we need to use it on the backend.
Expected behaviour:
Able to enter the name of firebase storage buckets in the extension configuration as they appear in the firebase console.
Actual behaviour:
'Invalid storage bucket' warning in extension configuration for names of storage buckets created in the firebase console. 'Install extension' button is not in a disabled state but does not respond in this scenario.
Further notes:
The firebase-admin sdk works perfectly well with storage names as they are entered when creating a new bucket in the console / displayed in the firebase console. It seems odd that you would restrict what can be entered in the extension configuration with validation rules different to whatever is used for creating buckets in the first place.
I have installed the Export Collections to BigQuery extension and it works fine however now I am attempting to import my existing data using firestore-bigquery-export by following the instructions here:
https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/guides/IMPORT_EXISTING_DOCUMENTS.md
However I am getting the error detailed below.
Note: I get exactly the same error even if I enter a firebase projectid or collection that does not exist.
This may be an local environment issue, if so and this is not an appropriate place for this issue please let me know and close it.
$ node -v
v12.13.0
$ npm -v
6.12.0
Run: npx @firebaseextensions/fs-bq-import-collection
Enter the ${PROJECT_ID}, ${COLLECTION_PATH} and ${DATASET_ID} parameters as follows:
my-fb-project-id, members, qmtbc_dev_export
Collection imports successfully into BigQuery
Error returned:
Importing data from Cloud Firestore Collection: members, to BigQuery Dataset: qmtbc_dev_export, Table: members_raw_changelog
Error unlinking journal file C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\lib/from-members-to-qmtbc-dev:qmtbc_dev_export:members_raw_changelog
after successful import: Error: ENOENT: no such file or directory, unlink 'C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\lib\from-members-to-qmtbc-dev:qmtbc_dev_export:members_raw_changelog'
---------------------------------------------------------
Finished importing 0 Firestore rows to BigQuery
---------------------------------------------------------
Error importing Collection to BigQuery: Error: EPERM: operation not permitted, unlink 'C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node'
Also I looked at the script here:
https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/scripts/import/src/index.ts
And the error is being generated at line 187.
It looks like it may throw this error if no data is found or if can't access the project/collection.
yes
storage-resize-images
When uploading an image, it is only named _WIDTHxHEIGHT
without the name.
Upload an image to storage bucket.
The picture in the thumbnails folder should be named with the id corresponding to a firestore database document.
The picture was named _WIDTHxHEIGHT
.
Hello,
I am trying to install Email Trigger Extension through the Firebase Console. I wan't to send email's based on user actions in my app through Google's SMTP service.
For testing purposes I entered my personal email and password in the form that the extension wanted. Like this,
(except with my actual credentials)
smtps://[email protected]:[email protected]:465
even
smtp://[email protected]:[email protected]:465
(my account allows less secure apps to access it)
After doing it, I got the very vague error of "The caller does not have permission," at the top of the page. I am not sure if it is an issue with using google's smtp with a personal account or simply that Firebase does not permit using it.
Another issue might be that I don't own the project itself, I am an admin. So I don't know who has permission to do so.
Right now, I have reverted to using the pub package "Mailer," but I don't like storing passwords in the Firebase so explicitly or even [locally.](url
)
Yes.
An email address from email credential should sync to MailChimp.
Did not sync.
Firestore structure
test_users -> uid1, uid2 ...
users -> uid3, uid4 ...
Cloud Firestore Paths: users/{UID}, test_users/{UID}
Logs:
Deleted: ' test_users/uid1' from Cloud Firestore
Deleted: ' users/uid1' from Cloud Firestore
What happen: Documents were not deleted
Backfilled data rows in BigQuery receive different document_name
values than rows inserted into BigQuery by the Firebase extension:
document_name
values in this format: <collection_name>/<document_id>
document_name
values in this format:<projects/<project_name>/databases/(default)/documents/<collection_name>/<document_id>
The consequence is that updates to imported documents will cause the original document to be duplicated in the *_raw_latest
view.
To reproduce:
test
. Add a document to this collection.test_raw_changelog
) and a view (test_raw_latest
).test_raw_latest
view. The single Firestore document now appears twice, with different document_name.Expected document_name
values to be the same for backfilled and exported rows.
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
My documents were imported successfully, though I found copies of my iam private key in the document data when querying. Is this expected behaviour?
If this is expected could it be clarified somewhere in the instructions or the extension?
It's not obvious sensitive data like private keys will be included in the table data based upon reading the extension information.
Ran npx @firebaseextensions/fs-bq-import-collection
Only one collection is exported, no way to sync multiple collections
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
storage-resize-images
, firestore-send-email
, etc)The documentation would lead you to believe that you will have a persistent subcollection in your documents that have a counter containing count shards. However, this isn't necessarily the case because once the shards are aggregated they get deleted. I thought I was going crazy because I could not find any subcollection with shards but yet somehow the function was accurately counting. It left me scratching my head wondering what was getting counted if they aren't in the DB.
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
I think it would be helpful to make it more clear that if you are running a few simple tests, you will not see any of these subcollections.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.