Code Monkey home page Code Monkey logo

Comments (9)

textcolor avatar textcolor commented on July 25, 2024 8

After some digging I think I found a workaround for the issue.

Configure the extension with a correct bucket URL for a bucket that doesn't exist. (e.g. ThisDoesNotExist.appspot.com)

Go to Google Cloud Console and pick your project.

You should see something like this:

img

The function ext-storage-resize-images-generateResizedImage (your extension) should be have a red icon next to it.

Go to the function, and reconfigure it (Edit -> Bucket)
You can add your custom bucket there, the validation in there works just fine (actually you can use the bucket browser in there)

I hope this works for you. It's not elegant, but at least it's a temporary fix for me.

from extensions.

emielvanliere avatar emielvanliere commented on July 25, 2024 4

I'm trying to setup the extension for a custom bucket in my firebase project.

The default bucket in the Storage explorer is named myproject.appspot.com. When I use this in the extension configuration it works fine.

However, I want the extension to run on a different bucket, so I create a new bucket myproject-avatars (note that I cannot add .appspot.com here). Now the extension config forces me to enter a bucket name ending in .appspot.com so I enter myproject-avatars.appspot.com. This gives me the following error:

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":"Cloud Storage trigger bucket myproject-avatars.appspot.com not found"}

Screenshot of bucket config:
buckets

How can I use a custom bucket with this extension?

Thanks!

from extensions.

Salakar avatar Salakar commented on July 25, 2024

Hey @digimbyte 👋 I believe the expected format is my-project-or-bucket-12345.appspot.com based on the example in the extension configuration yaml

The example should be showing in the UI as below:
image

The validation regex here is a bit loose on its validation, perhaps we should change this to be explicit and include the .appspot.com domain. In its current format it accepts the input you posted in your issue (https://console.cloud.google.com/storage/browser/new-second-bucket) which is incorrect.

cc @Ehesp

from extensions.

emielvanliere avatar emielvanliere commented on July 25, 2024

@textcolor That works, thanks!

from extensions.

digimbyte avatar digimbyte commented on July 25, 2024

That work around is a great find! i'll pass this on, hopefully the next version doesn't need this.

from extensions.

patricsteiner avatar patricsteiner commented on July 25, 2024

Thank you very much @textcolor! I hope they fix this soon...

from extensions.

mapkbalaji avatar mapkbalaji commented on July 25, 2024

@textcolor Thanks. This worked. But, it shows "Error installing." in the Extensions section and shows the old bucket name. And, is it not possible to choose a source folder?

from extensions.

jhuleatt avatar jhuleatt commented on July 25, 2024

I've posted a Stack Overflow answer here that should help in this case.

from extensions.

Ehesp avatar Ehesp commented on July 25, 2024

Closing via #153

from extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.