Redux-devtools-extension: Always "No store found"

Created on 12 Feb 2017  路  5Comments  路  Source: zalmoxisus/redux-devtools-extension

The extension doesn't start.

I have an app with server side rendering. Following the instruction, I set up the plugin like this.

On server routes.js

const composeWithDevTools = require('redux-devtools-extension').composeWithDevTools;

let store = createStore(reducer, state, composeWithDevTools(applyMiddleware(thunkMiddleware, loggerMiddleware)));
let html = ReactDOMServer.renderToString(getApp(store, renderProps));

In browser's part:

let store = createStore(
    reducers,
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() && window.__state__,
    applyMiddleware(thunkMiddleware, loggerMiddleware)
);

let Application = (
    <Provider store={store}>
        { routes }
    </Provider>
)

But I always get No store found. What do I miss? How to make it work?

chrome reduxdevtools no store found - google chrome 2017-02-12 09 08 25

question

Most helpful comment

@zalmoxisus I updated createStore to use above example, still have No store found half of the time.

All 5 comments

See the usage. So, you're applying the extension spreloadedStatetocreateStore`. It should be:

+ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
let store = createStore(
    reducers,
    window.__state__,
    composeEnhancers(applyMiddleware(thunkMiddleware, loggerMiddleware))
);

As per server side, click Remote button from the bottom.

@zalmoxisus I updated createStore to use above example, still have No store found half of the time.

same error for me via chrome extension:

  const middleware = applyMiddleware(
    routerMiddleware(),
    thunk,
    apolloClient.middleware(),
  )

  const enhancers = [
    middleware,
  ]

  const composeEnhancers =
    typeof window !== 'undefined' &&
      window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
      window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : compose

  const store = createStore(
    combineReducers({
      apollo: apolloClient.reducer(),
      criteria,
      searchInput,
      listGallery,
      router,
    }),
    initialState,
    composeEnhancers(...enhancers)
  )

happens intermittently but works 25% of the time

Is your issue related to #547?

I'm facing the same problem.
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ is always undefined
Version: 2.17.0 on Ubuntu Chrome

Tried these but doesn't help:

  1. Turned on "Allow access to file URLs"
    image

  2. Click "Reload frame"
    image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zalmoxisus picture zalmoxisus  路  4Comments

MrSkinny picture MrSkinny  路  4Comments

pooltoymae picture pooltoymae  路  3Comments

Koleok picture Koleok  路  4Comments

ismayilmalik picture ismayilmalik  路  4Comments