镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

provideFunction sample code missing app initializer #3301

Closed as duplicate

Description

@brooksdra

Version info

Version 7.5.0 "Current at the time of opening the issue"

How to reproduce these conditions

I'm unsure how to report a bug in the sample code; if this is not the way, please let me know.

Review sample code at samples/modular/src/app/app.module.ts

Expected behavior

My research shows the latest way to configure the provideFunctions is:

  provideFunctions(() => {
     const functions = getFunctions(getApp());   // <-- See getApp()
     if (environment.useEmulators) {
         connectFunctionsEmulator(functions, 'localhost', 5001);
     }
     return functions;
   }),

This seems to work best for me!

Actual behavior

See sample code around line:92 at samples/modular/src/app/app.module.ts

The sample code looks like this:

  provideFunctions(() => {
     const functions = getFunctions();
     if (environment.useEmulators) {
         connectFunctionsEmulator(functions, 'localhost', 5001);
     }
     return functions;
   }),

This results in the following cloud function log output:

["verifications": { "app": "missing", "auth": "missing" }, emulators]

and fails the if (!context.auth) query.

Activity

  1. added
    type: bugDefect: expected behavior doesn't happen.
    obsoleteConfirmed no longer relevant (removed/deprecated surface or superseded); closed as not planned.
    on Jul 22, 2026
  2. armando-navarro commented on Jul 22, 2026

    @armando-navarro
    Collaborator

    The sample this refers to (samples/modular/src/app/app.module.ts) has since been removed and the sample app was restructured; it now lives under sample/ and no longer contains that provideFunctions snippet.

    Refreshing the sample app is tracked in #3669. Closing as obsolete. If you find a 1 example in the current sample that is missing an app initializer, please open a new issue pointing at the current file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp: docsDocumentation.obsoleteConfirmed no longer relevant (removed/deprecated surface or superseded); closed as not planned.type: bugDefect: expected behavior doesn't happen.version: legacy (v7-v16)Targets the older modular API (roughly v7-v16).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions