Extensions: delete-user-data doesn't recognize {DEFAULT} Storage bucket

Created on 13 Dec 2020  Â·  3Comments  Â·  Source: firebase/extensions

[REQUIRED] Step 2: Describe your configuration

  • Extension name: delete-user-data
  • Extension version: 0.1.7
  • Configuration values (redact info where appropriate):

    • STORAGE_PATHS: {DEFAULT}/testext/{UID}.jpg

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Configure delete-user-data's Storage cleanup with the recommended {DEFAULT}/... config, add an image associated with a user, then delete that user.

Expected result

The user's image is successfully deleted from the default Storage bucket

Actual result
Error: Bucket name not specified or invalid. Specify a valid bucket name via the storageBucket option when initializing the app, or specify the bucket name explicitly when calling the getBucket() method.
    at new FirebaseError (/workspace/node_modules/firebase-admin/lib/utils/error.js:42:28)
    at Storage.bucket (/workspace/node_modules/firebase-admin/lib/storage/storage.js:109:15)
    at paths.map (/workspace/lib/index.js:87:31)
    at Array.map (<anonymous>)
    at clearStorageData (/workspace/lib/index.js:83:28)
    at exports.clearData.functions.auth.user.onDelete (/workspace/lib/index.js:53:23)
    at cloudFunction (/workspace/node_modules/firebase-functions/lib/cloud-functions.js:134:23)
    at Promise.resolve.then (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:199:28)
    at process._tickCallback (internal/process/next_tick.js:68:7) 

Most helpful comment

Fantastic, thanks Jeff. Will use your advice and wait on a fix to come
through.

Cheers and thanks again,
Vincent...

On Tue, 15 Dec 2020, 10:01 Jeff, notifications@github.com wrote:

@VincentBayliss https://github.com/VincentBayliss and others - until
this is fixed the workaround is to use the bucket name explicitly instead
of relying on {DEFAULT}. So, for example, if you currently have it
configured as {DEFAULT}/profilePhotos/{UID}.jpg, and your default Cloud
Storage bucket is my-cool-project.appspot.com, configure the extension
with my-cool-project.appspot.com/profilePhotos/{UID}.jpg
http://my-cool-project.appspot.com/profilePhotos/%7BUID%7D.jpg

To find your bucket name:

  1. Go to your Storage dashboard in the Firebase console.
  2. Click the Files tab, then look in the header of the file viewer.
  3. Copy the URL to your clipboard. It's usually in the form
    project-id.appspot.com.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/extensions/issues/531#issuecomment-744765556,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APS2PVZBNAWPNW7DYR5AUGTSU2KNJANCNFSM4UZXWE4Q
.

All 3 comments

Getting same outcome. Extension not deleting data from Cloud Storage. Data within Firestore is, however, deleting as expected.

@VincentBayliss and others - until this is fixed the workaround is to use the bucket name explicitly instead of relying on {DEFAULT}. So, for example, if you currently have it configured as {DEFAULT}/profilePhotos/{UID}.jpg, and your default Cloud Storage bucket is my-cool-project.appspot.com, configure the extension with my-cool-project.appspot.com/profilePhotos/{UID}.jpg

To find your bucket name:

  1. Go to your Storage dashboard in the Firebase console.
  2. Click the Files tab, then look in the header of the file viewer.
  3. Copy the URL to your clipboard. It's usually in the form project-id.appspot.com.

Fantastic, thanks Jeff. Will use your advice and wait on a fix to come
through.

Cheers and thanks again,
Vincent...

On Tue, 15 Dec 2020, 10:01 Jeff, notifications@github.com wrote:

@VincentBayliss https://github.com/VincentBayliss and others - until
this is fixed the workaround is to use the bucket name explicitly instead
of relying on {DEFAULT}. So, for example, if you currently have it
configured as {DEFAULT}/profilePhotos/{UID}.jpg, and your default Cloud
Storage bucket is my-cool-project.appspot.com, configure the extension
with my-cool-project.appspot.com/profilePhotos/{UID}.jpg
http://my-cool-project.appspot.com/profilePhotos/%7BUID%7D.jpg

To find your bucket name:

  1. Go to your Storage dashboard in the Firebase console.
  2. Click the Files tab, then look in the header of the file viewer.
  3. Copy the URL to your clipboard. It's usually in the form
    project-id.appspot.com.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/extensions/issues/531#issuecomment-744765556,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APS2PVZBNAWPNW7DYR5AUGTSU2KNJANCNFSM4UZXWE4Q
.

Was this page helpful?
0 / 5 - 0 ratings