zalmoxisus / redux-devtools-extension

Redux DevTools extension.
MIT License
13.5k stars 1.01k forks source link

Remote dev tools crashing on state change #400

Open feargswalsh92 opened 7 years ago

feargswalsh92 commented 7 years ago

When I do anything in my app that triggers a state change it crashes the redux devtools immediately. Here is my store: import {createStore, applyMiddleware} from 'redux'; import thunkMiddleware from 'redux-thunk'; import rootReducer from '../reducers'; import { composeWithDevTools } from 'remote-redux-devtools';

//Used to create the initial store. export default (AppNavigator) => {

return (initialState: Object = {}) =>  {

    const composeEnhancers = composeWithDevTools({ realtime: true, port: 8000 });
    const store = createStore(
        rootReducer(AppNavigator),
        initialState,
        composeWithDevTools(
            applyMiddleware(thunkMiddleware)
        ),
    );
    return store
};

if (module.hot) {
    // Enable hot module replacement for reducers
    module.hot.accept(() => {
      const nextRootReducer = require('../reducers/index').default;
      store.replaceReducer(nextRootReducer);
    });
  }

};

// , devToolsEnhancer({realtime: true})

Eventually it prompts me to reload the devtools and the state is updatedThe only workaround I have found is to force reload, there has to be a better way than this. Here's a gif of the process.

out

jhen0409 commented 7 years ago

I'm not sure if you have sent a lot of action / state to devtools, it does make app / devtools slow or just crash, you will need to use serializer. Or could you provide a minimal example project?

feargswalsh92 commented 7 years ago

@jhen0409 Do you mean "if it does make app / devtools slow or just crash, you will need to use serializer." if so that did not work, I cannot the software I'm writing is proprietary.

gramidt commented 7 years ago

I'm also having this issue, and it even hangs with just an event or two being added to the store.

feargswalsh92 commented 7 years ago

I fixed this by going to the settings in my Chrome devtools and setting your Devtools file location to a local rather than web based location like so and it worked like a charm! image

jwyuen commented 6 years ago

I've been having this issue too, although my app gets extremely slow before eventually crashing devtools. My app isn't sending a ton of events either. It also seems to happen only on a certain event, most other events are fine....

I'm running react 16 as well, not sure if that makes a difference.....

geoguide commented 6 years ago

I'm also having this issue. The extensions loads enough to the point where I can see it would be awesome but pretty much any action makes it freeze and eventually crash. I'm not sure if it's something wrong with MY code, but I'm doing the most simple stuff so I should be fine?

hellraisercenobit commented 6 years ago

+1

astandrik commented 6 years ago

+1

hellraisercenobit commented 6 years ago

@feargswalsh92 You should follow this tips and adapt them for redux native: https://blog.angular-university.io/angular-ngrx-devtools/

It was coming from a wrong reducer implementation with state mutation. It works for me now but maybe your crash is due to another specific behavior.

==> https://www.npmjs.com/package/redux-freeze-state

gaurak commented 6 years ago

I fixed this by going to the settings in my Chrome devtools and setting your Devtools file location to a local rather than web based location like so and it worked like a charm! image

Please tell your answer in detail? I m not finding any workspace??