Skip to content

subscribe's onComplete not working #9348

@marcusx2

Description

@marcusx2

Operating System

all

Environment (if applicable)

all

Firebase SDK Version

12.4.0

Firebase SDK Product(s)

DataConnect

Project Tooling

all

Detailed Problem Description

The api.browser.ts file has the subscribe overloads. This is the only place with an example on how to use it.

The api suggests that I can also use OnError and OnComplete. However, I could not get them to trigger. This is either a bug or I don't know how to trigger them. I expected at least the OnComplete to trigger. Only the OnNext triggers.

Steps and code to reproduce issue

subscribe(ref, ({ data }) => {
      console.log("SUBSCRIBE ONNEXT");
      console.log(data);
      throw("ERROR");
    }, (err) => {
      console.error("SUBSCRIBE ERROR");
    }, () => {
      console.log("SUBSCRIBE ONCOMPLETE")
    });

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions