Skip to content
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

vuex state load breaks working functionality when using with modules #923

Closed
Gedminas opened this issue Mar 26, 2019 · 3 comments
Closed

Comments

@Gedminas
Copy link

Gedminas commented Mar 26, 2019

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

@anoop-ananthan
Copy link

I think this still dev tools in Mozilla is muggy

@gterras
Copy link

gterras commented Mar 27, 2019

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.

@MohammedBashiru
Copy link

Have you been able to fix duplicate getter key issue ?

simsim0709 pushed a commit to simsim0709/vue-devtools that referenced this issue May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants