Skip to content

Environment variable mismatch: MATCHING_COLLECTION_FOR_SUBSCRIBER versus PUSHFIRE_MATCHING_COLLECTION #1

@HassanBahati

Description

@HassanBahati

Description

In extension.yaml, a parameter is defined as PUSHFIRE_MATCHING_COLLECTION.

However, in functions/src/index.ts line 42, the code references process.env.MATCHING_COLLECTION_FOR_SUBSCRIBER.

Firebase Extensions automatically map parameters to environment variables using the parameter name. Since the parameter is PUSHFIRE_MATCHING_COLLECTION, the environment variable will be PUSHFIRE_MATCHING_COLLECTION, not MATCHING_COLLECTION_FOR_SUBSCRIBER.

This could potentially cause the extension to fail because process.env.MATCHING_COLLECTION_FOR_SUBSCRIBER will be undefined, resulting in an invalid path.

Steps to Fix

  1. In functions/src/index.ts line 42, change process.env.MATCHING_COLLECTION_FOR_SUBSCRIBER to process.env.PUSHFIRE_MATCHING_COLLECTION

  2. In functions/src/index.ts line 35, update the comment to reference PUSHFIRE_MATCHING_COLLECTION instead of MATCHING_COLLECTION_FOR_SUBSCRIBER

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions