Skip to content

TypeError: this.firebaseApp.functions is not a function when upgrading to firebase 9; angularFire 7 #2942

@LanderBeeuwsaert

Description

@LanderBeeuwsaert

Hey all, while trying to get the upgrade working, seems that the way I'm calling a function doesn't work anymore.
As I still get autocomplete typings for this (this.firebaseApp.functions()) I would still expect this to work? (see below)

Version info

Angular:
12.2.0

Firebase:
9.0.1

AngularFire:
7.0.4

Other (e.g. Ionic/Cordova, Node, browser, operating system):
windows 10, chrome, node 16, npm 7

How to reproduce these conditions

The code I have (I've shortened it a bit, but the important things are there):

import { FirebaseApp } from '@angular/fire/compat';

@Injectable()
export class SomeService {
constructor(
private firebaseApp: FirebaseApp,
) {
await this.firebaseApp.functions().httpsCallable('addOrganisation')(addOrganisationParams);

This gives the error:
TypeError: this.firebaseApp.functions is not a function

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