20

导入ngrx devtools以启用chrome工具的调试器会导致以下错误

错误类型错误: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 [作为累加器] (store-devtools.js:649) 在 ScanSubscriber._tryNext (scan.js:61) 在 ScanSubscriber._next (scan.js:54) 在 ScanSubscriber.Subscriber.next (Subscriber.js:54) 在 WithLatestFromSubscriber._next (withLatestFrom.js:66) 在 WithLatestFromSubscriber.Subscriber.next (Subscriber.js:54) 在 Notification.observe (Notification.js:15)

这是我下面的ngrx版本:

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

和我的角度离子

 "@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",

每当我尝试在app.module上导入以下代码时,总是会显示我在顶部显示的错误。

 StoreDevtoolsModule.instrument({
      maxAge: 15
    }),

上面的错误指的是我控制台210行的这行代码

this.extensionConnection.send(sanitizedAction, sanitizedState);

感谢有人可以提供帮助。提前致谢。

4

3 回答 3

15

面临同样的问题,它在 Firefox 中运行良好,从 chrome 卸载了 redux 开发工具,然后开始工作(一种解决方法)

看起来像 chrome redux 开发工具扩展的问题。

参考(https://stackoverflow.com/a/53513518/3742158

于 2018-11-28T06:41:19.637 回答
5

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

于 2018-11-28T12:17:32.083 回答
5

只是让您知道:昨天我的 redux devtools 运行良好。我的项目依赖项与您的 99% 相同。今天我面临完全相同的问题。问题可能与扩展有关。尝试安装另一个版本。

github页面上有一些关于2.16版本的问题。 https://github.com/zalmoxisus/redux-devtools-extension/issues/589

于 2018-11-28T07:23:46.200 回答