Vue-devtools: vuex state load breaks working functionality when using with modules

Created on 26 Mar 2019  路  3Comments  路  Source: vuejs/vue-devtools

Version

5.0.2

Browser and OS info

Latest Chrome, Latest Firefox / archLinux

Steps to reproduce

clone this https://github.com/nuxt-community/auth-module
yarn install
yarn dev

try default functionality of logging in
then open vueX tab and try to load state.

What is expected?

to get the current state of the application

What is actually happening?

commons.app.js:12300 [Vue warn]: Cannot set reactive property on undefined, null, or primitive value: undefined
warn @ commons.app.js:12300
set @ commons.app.js:12750
SET @ app.js:1475
wrappedMutationHandler @ commons.app.js:20848
mutation.handlers.forEach.handler @ backend.js:12092
loop @ backend.js:12092
replayMutations @ backend.js:12109
bridge.on @ backend.js:11968
emit @ backend.js:3205
_emit @ backend.js:3028
messages.forEach.message @ backend.js:2953
Bridge.wall.listen.messages @ backend.js:2953
listener @ backend.js:2675
postMessage (async)
o @ proxy.js:1
EventImpl.dispatchToListener @ VM21532 extensions::event_bindings:403
publicClassPrototype.(anonymous function) @ VM21538 extensions::utils:138
EventImpl.dispatch_ @ VM21532 extensions::event_bindings:387
EventImpl.dispatch @ VM21532 extensions::event_bindings:409
publicClassPrototype.(anonymous function) @ VM21538 extensions::utils:138
dispatchOnMessage @ VM21539 extensions::messaging:392
commons.app.js:12757 Uncaught TypeError: Cannot use 'in' operator to search for 'strategy' in undefined
    at Function.set (commons.app.js:12757)
    at Store.SET (app.js:1475)
    at wrappedMutationHandler (commons.app.js:20848)
    at mutation.handlers.forEach.handler (backend.js:12092)
    at Array.forEach (<anonymous>)
    at loop (backend.js:12092)
    at replayMutations (backend.js:12109)
    at Bridge.bridge.on (backend.js:11968)
    at Bridge.emit (backend.js:3205)
    at Bridge._emit (backend.js:3028)

when debugging with devTool breakpoints the state provided to

          mutations: {
            SET: function SET(state, payload) {
              vue__WEBPACK_IMPORTED_MODULE_2__["default"].set(state, payload.key, payload.value);
            }
          }

is undefined

Additional note, did not have issues with previous version of devTools

bug high

All 3 comments

I think this still dev tools in Mozilla is muggy

Starting to get better, thanks a lot !! The initial state is now working for me.

I now get a lot of duplicate getter key errors after playing mutations, I think it may be related to dynamic module registering like so :

created() {
    for (const id of myArray){
        this.$store.registerModule(id+'/myPath', myModule )
    }
}
// [vuex] duplicate getter key: id/myPath

Note that prior to 5.0.3 it was unable to even register these kind of events, so there's that. I will try to setup a repro repo.

Have you been able to fix duplicate getter key issue ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewsunrise picture matthewsunrise  路  3Comments

mitramejia picture mitramejia  路  3Comments

pxwee5 picture pxwee5  路  3Comments

sithuaung picture sithuaung  路  4Comments

stiltet picture stiltet  路  3Comments