Skip to content

🐛 [firestore-bigquery-export] Version 0.1.57 fails to install in functions project #2274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aronsuarez opened this issue Feb 3, 2025 · 2 comments
Labels
type: bug Something isn't working

Comments

@aronsuarez
Copy link

[REQUIRED] Step 2: Describe your configuration

  • Extension name: firestore-bigquery-export
  • Extension version: 0.1.57

[REQUIRED] Step 3: Describe the problem

I install the extension via "firebase ext:sdk:install firebase/firestore-bigquery-export" the build steps fail, because the event callback functions are existing twice in the code.

Go back to 0.1.56 solves the issue.

Steps to reproduce:

Install the plugin in a firebase functions project with "firebase ext:sdk:install firebase/firestore-bigquery-export"

Expected result

Extension will be installed

Actual result

Build step fails

@aronsuarez aronsuarez added the type: bug Something isn't working label Feb 3, 2025
@aronsuarez aronsuarez changed the title 🐛 [EXTENSION_NAME_HERE] Your issue title here 🐛 [firestore-bigquery-export] Your issue title here Feb 3, 2025
@aronsuarez aronsuarez changed the title 🐛 [firestore-bigquery-export] Your issue title here 🐛 [firestore-bigquery-export] Version 0.1.57 fails to install in functions project Feb 3, 2025
@cabljac
Copy link
Contributor

cabljac commented Feb 11, 2025

Hi there, do you have the exact error message you recieved?

@aronsuarez
Copy link
Author

aronsuarez commented Feb 22, 2025

No, because I'm now on 0.1.56 but I can share the functions that existing twice on 0.1.57 when the package is generated

This is the file path: generated > extensions > firebase > firestore-bigquery-export > 0.1.57 > index.ts

This functions existing twice in the index.ts file when I install 0.1.57, even when i delete the generated folder.

/**
   * Occurs when a trigger has been called within the Extension, and will include data such as the context of the trigger request.
   */
  onStart<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions) {
    this.events.push("firebase.extensions.firestore-counter.v1.onStart");
    return onCustomEventPublished({
        ...options,
        "eventType": "firebase.extensions.firestore-counter.v1.onStart",
        "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`,
        "region": `${this.params._EVENT_ARC_REGION}`
    },
    callback);
  }

  /**
   * Occurs when image resizing completes successfully. The event will contain further details about specific formats and sizes.
   */
  onSuccess<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions) {
    this.events.push("firebase.extensions.firestore-counter.v1.onSuccess");
    return onCustomEventPublished({
        ...options,
        "eventType": "firebase.extensions.firestore-counter.v1.onSuccess",
        "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`,
        "region": `${this.params._EVENT_ARC_REGION}`
    },
    callback);
  }

  /**
   * Occurs when an issue has been experienced in the Extension. This will include any error data that has been included within the Error Exception.
   */
  onError<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions) {
    this.events.push("firebase.extensions.firestore-counter.v1.onError");
    return onCustomEventPublished({
        ...options,
        "eventType": "firebase.extensions.firestore-counter.v1.onError",
        "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`,
        "region": `${this.params._EVENT_ARC_REGION}`
    },
    callback);
  }

  /**
   * Occurs when the function is settled. Provides no customized data other than the context.
   */
  onCompletion<T = unknown>(callback: EventCallback<T>, options?: SimpleEventarcTriggerOptions) {
    this.events.push("firebase.extensions.firestore-counter.v1.onCompletion");
    return onCustomEventPublished({
        ...options,
        "eventType": "firebase.extensions.firestore-counter.v1.onCompletion",
        "channel": `projects/locations/${this.params._EVENT_ARC_REGION}/channels/firebase`,
        "region": `${this.params._EVENT_ARC_REGION}`
    },
    callback);
  }

I hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants