Skip to content

firebase.config() exists in functions but empty when called from webapp #2466

@anandrishabh1

Description

@anandrishabh1

[REQUIRED] Environment info

firebase-tools:
8.4.3

Platform:
macOS

[REQUIRED] Test case

  1. Set a function config on the local machine:
    firebase functions:config:set app.environment="prd"

  2. Deploy functions and check if the config is set by logging functions.config()
    image

  3. console.log(functions.config()) before firebase.initializeApp in webapp:
    image
    Output is an empty dictionary

[REQUIRED] Steps to reproduce

Same as above

[REQUIRED] Expected behavior

Functions.config() should return the set config in order to change the firebase config based on project that webapp is deployed in order to achieve staging/prod/testing environment differentiation.

[REQUIRED] Actual behavior

functions.config() is an empty dictionary which leads to a loss of access to app.environment resulting in no control over differentiation between firebase environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions