简体   繁体   中英

Cannot read property 'whitelist' of undefined when importing ngrx dev tools

Importing ngrx devtools to enable a debugger for chrome tools results to an error below:

ERROR TypeError: Cannot read property 'whitelist' of undefined at isFiltered (:1:5016) at Object.x [as send] (:1:74196) at DevtoolsExtension.notify (store-devtools.js:210) at ScanSubscriber.StoreDevtools.liftedAction$.pipe.Object.state [as accumulator] (store-devtools.js:649) at ScanSubscriber._tryNext (scan.js:61) at ScanSubscriber._next (scan.js:54) at ScanSubscriber.Subscriber.next (Subscriber.js:54) at WithLatestFromSubscriber._next (withLatestFrom.js:66) at WithLatestFromSubscriber.Subscriber.next (Subscriber.js:54) at Notification.observe (Notification.js:15)

This are my versions below of ngrx:

 "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^6.1.2",
    "@ngrx/store": "^6.1.2",
    "@ngrx/store-devtools": "^6.1.2",

and my angular and ionic

 "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "~4.17.0",
    "@ionic-native/splash-screen": "~4.17.0",
    "@ionic-native/status-bar": "~4.17.0",

Whenever I try to import this code below on app.module is always shows the error that I displayed on top.

 StoreDevtoolsModule.instrument({
      maxAge: 15
    }),

The error on top refers to this line of code in my console on line 210

this.extensionConnection.send(sanitizedAction, sanitizedState);

Appreciate if someone could help. Thanks in advance.

Faced the same issue , it works fine in firefox , uninstalled redux dev tools from chrome and then started working (kind of workaround )

Looks like issue with chrome redux dev tools extension .

ref ( https://stackoverflow.com/a/53513518/3742158 )

Just to let you know: I had my redux devtools working fine yesterday. My project dependencies are 99% same as yours. Today I face exactly the same issue. The problem is probably with extension. Try to install another version.

There are some issues on github page about 2.16 version. https://github.com/zalmoxisus/redux-devtools-extension/issues/589

将您的chrome扩展更新为2.16.2 =>再次工作:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM