Skip to content

this.scheduler.notify is not a function #60074

Closed as duplicate
Closed as duplicate

Description

@LanderBeeuwsaert

Which @angular/* package(s) are the source of the bug?

compiler

Is this a regression?

Yes

Description

angular/angularfire#3618
angular/angularfire#3592
#59213

I've been able to make a minimal reproduction:
https://github.com/LanderBeeuwsaert/notify-scheduler-issue2
run with "npm run t"

Please provide a link to a minimal reproduction of the bug

https://github.com/LanderBeeuwsaert/notify-scheduler-issue2
run with "npm run t"

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)


Anything else?

No response

Activity

  1. changed the title [-]this.scheduler.notify is not a function[/-] [+][BUG] this.scheduler.notify is not a function[/+] on Feb 24, 2025
  2. changed the title [-][BUG] this.scheduler.notify is not a function[/-] [+]this.scheduler.notify is not a function[/+] on Feb 24, 2025
  3. JeanMeche commented on Feb 24, 2025

    @JeanMeche
    Member

    This is weird injector issue. Injection returns an empty object.

    Also noticed that the bug can also be triggered without optimization enabled but by enabling the prod mode with enableProdMode().

    Edit: It looks like a circular Injection that doesn't throw properly.
    Edit2: The Circular DI error neither throw properly in devmode (it's silenced).

    Here is a minimal repro : https://github.com/JeanMeche/notify-scheduler-issue2

    Root cause for the error being caught/hidden:

    https://github.com/angular/angularfire/blob/35e0a9859299010488852b1826e4083abe56528f/src/zones.ts#L133-L140

  4. added theissue type on Feb 24, 2025
  5. added
    area: core
    on Feb 24, 2025
  6. added this to the needsTriage milestone on Feb 24, 2025
  7. JeanMeche commented on Feb 24, 2025

    @JeanMeche
    Member

    @LanderBeeuwsaert The main issue in your case seems to be that you're pulling services in the ErrorHandler that trigger the circular dependency.

    Currently the ErrorHandler is instantiated eargerly with the App but this is likely to change in the future with #58984.

  8. removed theissue type on Feb 24, 2025
  9. LanderBeeuwsaert commented on Feb 25, 2025

    @LanderBeeuwsaert
    Author

    @JeanMeche ahhhhh ok thank you! Indeed I got it working by moving more services out of the constructor

  10. JeanMeche commented on Feb 27, 2025

    @JeanMeche
    Member

    We'll throw an error in prod mode with #60118, the rest is a duplicate of #58970.

  11. added 2 commits that reference this issue on Mar 4, 2025
    4aeec9f
    2bffacb
  12. angular-automatic-lock-bot commented on Mar 30, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  13. locked and limited conversation to collaborators on Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: corebugcore: di

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions