Skip to content

Error on upgrade to 5.0 in store-devtools #741

@karptonite

Description

@karptonite

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

After upgrading to the new version of ngrx, I get the following error in my browser console:

core.js:1440 ERROR TypeError: Cannot read property 'state' of undefined
    at MapSubscriber.unliftState [as project] (store-devtools.es5.js:163)
    at MapSubscriber._next (map.js:79)
    at MapSubscriber.Subscriber.next (Subscriber.js:92)
    at ReplaySubject._subscribe (ReplaySubject.js:61)
    at ReplaySubject.Observable._trySubscribe (Observable.js:172)
    at ReplaySubject.Subject._trySubscribe (Subject.js:98)
    at ReplaySubject.Observable.subscribe (Observable.js:160)
    at Observable._subscribe (Observable.js:231)
    at Observable.subscribe (Observable.js:160)
    at MapOperator.call (map.js:57)

that line in store-devtools corresponds to the second line of this function:

/**
 * Provides an app's view into the state of the lifted store.
 * @param {?} liftedState
 * @return {?}
 */
function unliftState(liftedState) {
    var computedStates = liftedState.computedStates, currentStateIndex = liftedState.currentStateIndex;
    var state = computedStates[currentStateIndex].state;
    return state;
}

Expected behavior:

no Error.

Minimal reproduction of the problem with instructions:

I don't have a minimal repro yet. I assume it won't be trivial to reproduce, since it hasn't been seen before the release. I can say that our application makes extensive use of lazy loaded modules, including using StoreModule.forFeature in multiple modules.

Without StoreDevtools, there are no problems upgrading, as far as I can tell.

Version of affected browser(s),operating system(s), npm, node and ngrx:

Chrome Version 63.0.3239.132
ngrx 5
node 9.3.0

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