Components: Incompatible with [email protected]? (this._appRef.registerChangeDetector is not a function)

Created on 8 Dec 2016  路  21Comments  路  Source: angular/components

Application throws error after update to latest angular release ([email protected]). Rollback to 2.2.4 and all is well. Are others seeing this too?

Error: Uncaught (in promise): Error: Error in :0:0 caused by: this._appRef.registerChangeDetector is not a function
TypeError: this._appRef.registerChangeDetector is not a function
    at DomPortalHost.attachComponentPortal (dom-portal-host.js:47)
    at DomPortalHost.BasePortalHost.attach (portal.js:130)
    at OverlayRef.attach (overlay-ref.js:21)
    at MdDialog._attachDialogContainer (dialog.js:74)
    at MdDialog.open (dialog.js:53)
    at RouteSignin.signin (component.ts:66)
    at SafeSubscriber._next (component.ts:49)
    at SafeSubscriber.__tryOrSetError (Subscriber.js:232)
    at SafeSubscriber.next (Subscriber.js:174)
    at Subscriber._next (Subscriber.js:125)
    at Subscriber.next (Subscriber.js:89)
    at BehaviorSubject._subscribe (BehaviorSubject.js:28)
    at BehaviorSubject.Observable.subscribe (Observable.js:45)
    at RouteSignin.ngOnInit (component.ts:44)
    at Wrapper_RouteSignin.ngDoCheck (wrapper.ngfactory.js:24)
    at resolvePromise (zone.js:475) [angular]
    at resolvePromise (zone.js:460) [angular]
    at :8080/js/polies-bundle.js:15894:17 [angular]
    at Object.onInvokeTask (ng_zone.js:262) [angular]
    at ZoneDelegate.invokeTask (zone.js:261) [angular]
    at Zone.runTask (zone.js:151) [<root> => angular]
    at drainMicroTaskQueue (zone.js:405) [<root>]

Most helpful comment

Working on cutting an alpha.11 right now

All 21 comments

Quick update, building from master (and replacing version from npm) resolves the issue, related to this commit? https://github.com/angular/material2/commit/70efee5b0fb09deca579cee43289e323cd253ef8

Would it be possible to draft a release ?

There is supposed to be a beta by the end of the year, so I'm not sure they'll be releasing alpha.11 before that..

Even an experimental release on NPM with this fix would helpful.

yeah well you'd have to ping @jelbourn and @DevVersion about that.. seeing that this was made https://github.com/angular/material2-builds couple of days ago, they might be working on it.. but who knows if it will be done before beta

@fxck No worries. We are working on that actively.

Working on cutting an alpha.11 right now

@jelbourn A dream comes true. Christmas is coming early this year. :tada: 馃巺

Some hiccups due to angular-cli not working with Angular 2.3.0... slowed done my validation. Writing the changelog...

alpha.11 is released, changelog is here: https://github.com/jelbourn/material2/blob/2f57ba2376c2bf7fe7550ae232a9b12d229f884c/CHANGELOG.md

This issue should be fixed in alpha.11

@jelbourn I'm getting

It's not clear which file to import for '@import \"overlay/overlay\"'.\nCandidates:\n  overlay/overlay.scss\n  overlay/overlay.css\nPlease delete or rename all but one of these files.\n

in alpha.11.. thought this was fixed.. it certainly didn't do this in alpha.10

@fxck there's no overlay.css in the package- is something in your build creating it?

hm yeah, that could be the reason, let me check, I wonder why did it ignore the file before though..

@jelbourn and snackbar requires viewContainerRef again? that'd be little disappointing

ugh, meant snackbar

Not supposed to, what are you seeing?

@jelbourn well
image

config is required here and

image

so is viewContainerRef here

@fxck this is the .d.ts file that is in the alpha.11 package:

import { ViewContainerRef } from '@angular/core';
import { AriaLivePoliteness } from '../core';
/**
 * Configuration used when opening a snack-bar.
 */
export declare class MdSnackBarConfig {
    /** The politeness level for the MdAriaLiveAnnouncer announcement. */
    politeness?: AriaLivePoliteness;
    /** Message to be announced by the MdAriaLiveAnnouncer */
    announcementMessage?: string;
    /** The view container to place the overlay for the snack bar into. */
    viewContainerRef?: ViewContainerRef;
    /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
    duration?: number;
}

well I removed node_modules and did cache clear.. maybe yarn is loading some older config

@fxck yarn has caused me nothing but problems and has been consistently wrong

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._

Was this page helpful?
0 / 5 - 0 ratings