Skip to content

ERROR FirebaseError: Expected type 'Query', but it was: a custom wh object #3442

Open
@fmauff1978

Description

@fmauff1978

Version info
Angular: 16

Firebase: 7

AngularFire: latest

Other (e.g. Ionic/Cordova, Node, browser, operating system): Node

export class CategoryComponent {

private fs: Firestore = inject(Firestore);
categories$: Observable<Category[]>;

constructor() {
// get a reference to the user-profile collection
const categoryCollection = collection(this.fs, 'categories');

// get documents (data) from the collection using collectionData
this.categories$ = collectionData(categoryCollection) as Observable<Category[]>;

console.log(categoryCollection);
}

}

The Chrome console returns> ERROR FirebaseError: Expected type 'Query', but it was: a custom wh object

What is happening?

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