-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StoreDevtools error #30
Comments
Running into the same issue, you ever find a solution? |
@llwt unfortunately not yet. I have reverted back to the 2.x branch because I don't have the time to debug alpha versions. |
Hmm, so I think I tracked it down to the It looks the eager provider calling // ...
export function createStateObservable(shouldInstrument: boolean, devTools: StoreDevtools, state: State<any>) {
return shouldInstrument ? devTools.state : state;
}
// ...
export class StoreDevtoolsModule {
static instrument(options: StoreDevtoolsOptions = {}): ModuleWithProviders {
return {
ngModule: StoreDevtoolsModule,
providers: [
// ...
{
provide: StateObservable,
deps: [ SHOULD_INSTRUMENT, StoreDevtools, State],
useFactory: createStateObservable
},
// ... Although, If I'm understanding everything correctly though that leads to the I'm not sure what the correct solution to get this working would be. I have a feeling this issue is already understood by the project maintainers. Probably related to: Angular #15501 |
So that actually doesn't work as expected. The dev tools work but all actions end up being fired twice... |
My WAG is that I'll try to test this hypothesis, but I'm new to the toolchain.. |
n/m; there are a bunch of unused imports in the devtools code, so it's tough to determine intent or if things are half-implemented. I'm also an Angular 2+ noob, so can't be of much help here |
@msandeeprao38 I went back on 2.x for now. It doesn't seem a hight priority to get 4.x on the road soon :) Maybe @MikeRyanDev or @brandonroberts could guestimate on this? |
I also went back to 2.x; works well enough |
Rolled back to 2.x here as well. An update on the status of this from @MikeRyanDev or @brandonroberts would be really helpful, the original ETA was "sometime in May"? |
You can always move that ETA up by contributing back to the project yourself. |
@boneskull I'm trying :P see my earlier comments. |
:-) This seems to be fixed as of today's "nightly" build (store-devtools-builds#c242ff2). Thanks team! |
@drew-moore yes? I just pulled the latest via
|
@axtho try pulling the latest store build too |
@drew-moore I am upgrading all my deps each day :) So that's not it ... what is your setup (npm, angular, TS, etc)? I think it is what @MikeRyanDev has already mentioned in the new example app:
But I am still curious why it seems to work for some and for others not. Does it have to do with how many eager providers are already setup before dev tools kick in? Just to confirm the previous inspection:
BTW: |
I also have an error with latest nightly builds:
|
@bbaia I am certain that has to do with the above mentioned open ticket on angular (angular/angular#15501). We seem to get errors on different points, which makes sense when you think about eager loading to be the issue: it depends on your specific setup, how many modules are being loaded by the time the devtools kick in. |
I'm using lazy features modules |
any update? I ran into this issue too, it is painful without dev tools around |
app.module.ts works
core.module.ts which is imported by app.module.ts fires the error descriped above. app.module.ts
core.module.ts
Everything works fine, if i do not import StoreDevtoolsModule. |
@robwormald @MikeRyanDev is there another solution to this beside waiting for the issue at angular to be resolved? It is quite painful without the dev tools. |
@axtho meanwhile u can log the actions: action$.subscribe(a => console.log(a)) |
@axtho have you tried the method above of putting the devtools and store in the AppModule |
@brandonroberts if you look at the appModule snippet at the start of the issue you see that it is what I am doing. Currently I am not lazy loading any store stuff or putting it into a common module. https://github.com/digitaldeacon/memberhive2/blob/master/web/src/app/app.module.ts#L49 Looking at the error it says that actions are undefined. Is that because the actions have not loaded by the time the devtools connect? |
@brandonroberts @axtho Also seeing this error when importing StoreDevtoolsModule only in the App module. |
Latest build works like a charm! Thanks! |
@brandonroberts thanks for doing this despite the holiday ;) it works now. |
But it really slow down the app, normal ? |
yes, i also noticed that ... maybe that has to do with the subscription not being closed properly? |
Leaving the devtools will slow down your app as it's retaining all the actions and states by default. You can use the StoreDevtoolsModule.instrument({
maxAge: 25
}) |
I'm actually getting this error even with the latest build. Same structure: DevTools imported in app.module. Note: the store is a separate module imported in |
Error still present, what's the main workaround ? Should I go down to some version?
|
@siordache94 if you can provide a reproduction, open a new issue so we can take a look. This has been resolved for some time. |
I'm also facing the similar issue
Followed the steps present here https://github.com/ngrx/platform/blob/master/docs/store/README.md |
@mayurgaud open a new issue with a reproduction of the error. |
still have this issue... |
Setup same as #29 ... I followed the docs more closely now. I get:
The import section from the app.module.ts looks like this:
The reducer import like so (partial):
The text was updated successfully, but these errors were encountered: