When I refresh one of my page, the flowing exception is show randomly.
When this exception is throw, the view can not be open, if this exception is not show, the page can be opened.
I am sorry I can not provide a reproduce link.
vue version: 2.1.6
dev mode
TypeError: Cannot create property 'function mergeHook(
parentVal,
childVal
) {
return childVal
? parentVal
? parentVal.concat(childVal)
: Array.isArray(childVal)
? childVal
: [childVal]
: parentVal
}' on string 'beforeCreate'
at mergeField (eval at <anonymous> (app.js:606), <anonymous>:1169:18)
at mergeOptions (eval at <anonymous> (app.js:606), <anonymous>:1160:5)
at resolveConstructorOptions (eval at <anonymous> (app.js:606), <anonymous>:3329:32)
at createComponent (eval at <anonymous> (app.js:606), <anonymous>:2391:3)
at _createElement (eval at <anonymous> (app.js:606), <anonymous>:2864:15)
at Proxy.render (eval at <anonymous> (app.js:3090), <anonymous>:91:7)
at VueComponent.Vue._render (eval at <anonymous> (app.js:606), <anonymous>:2954:22)
at VueComponent.eval (eval at <anonymous> (app.js:606), <anonymous>:2191:21)
at Watcher.get (eval at <anonymous> (app.js:606), <anonymous>:1656:27)
at new Watcher (eval at <anonymous> (app.js:606), <anonymous>:1648:12)
I haven't used hook beforeCreate in any component.
We can't do much without a repro, so please try to reproduce it. If you really can't, feel free to close the issue yourself
Hi, it seems an issue in vue core. Can you have a discuss on this? Any possible? Not every issue is easy to repro
It's not because it's not easy that you shouldn't do it...
I've got the same issue on Vue 2.1.6 (but also on 2.0.1)
And i'm still not able to reproduce this error.
It looks pretty random to me, because when I remove a component it works.
If I put the component back, it doesn't work.. And then again I remove the component but it still doesn't work..
Also, I only get this in Chrome (latest version, Mac OS X Yosemite), not in Safari
@jessereitsma open this issue, hope the admin can take a look. @yyx990803
I will close this issue again, because we cannot "take a look" at something we cannot reproduce.
@jessereitsma It looks like you got a few clues. You should strip down that component and reproduce the bug on a jsfiddle (or repo if really necessary). This will hopefully give you more information on when the error happens. Once you find it, open a new issue with the repro and more information so we can help 馃檪
A FYI; We're running into this again. This time not store related as in #4556. The main problem with this issue is we can only reproduce this problem on a single (freaking) computer. My computer doesn't reproduce the exception, nor others. Seems related to simultanously loading components?
It seems we run into this problem when a child component have destroyed, mounted, data, and methods props and the parent component have them too. When we remove the destroyed prop from the lowest-child, it works without problems. But it just seems too sketchy of a fix.
We're still on this. Just wanted to update so some brains may get triggered on the debug.
We found out that computer doesn't have the problem on production (npm run build) version of the same code. So we're currently only experiencing it on npm run dev (webpack bundle, installed using cli)
This kinda simulates the problem we had, but as it is builded version it seems not to run into that problem. So prob something to do with the hot-loading part more.
For what it's worth, I just got this same error but I realized it was because I turned on Experimental Javascript in my Chrome Flags settings. Turning it off solved the issue
@sircharleswatson Dude, thank you so much.
I looked at my flags page and I had this feature enabled.
Turned it off, restarted Chrome and it's solved.
I'm so happy with this, thank you very much :-)
cc @njleonzhang @posva
@posva @LinusBorg I hope this will help you guys debug it, and hopefully come with a fix for this.
Maybe the issue can be reopened now, since there is actually a way to reproduce it.
@jessereitsma Experimental features are not stable them so I think we should wait until the error appears on a stable environment since the error seems to disappear on the production build.
Other than that, a new issue with a repo for the repro and proper steps to reproduce the issue would be great
Thanks you very much. It works, thanks.
Most helpful comment
A FYI; We're running into this again. This time not store related as in #4556. The main problem with this issue is we can only reproduce this problem on a single (freaking) computer. My computer doesn't reproduce the exception, nor others. Seems related to simultanously loading components?
It seems we run into this problem when a child component have destroyed, mounted, data, and methods props and the parent component have them too. When we remove the destroyed prop from the lowest-child, it works without problems. But it just seems too sketchy of a fix.
We're still on this. Just wanted to update so some brains may get triggered on the debug.
We found out that computer doesn't have the problem on production (npm run build) version of the same code. So we're currently only experiencing it on
npm run dev(webpack bundle, installed using cli)This kinda simulates the problem we had, but as it is builded version it seems not to run into that problem. So prob something to do with the hot-loading part more.
https://jsfiddle.net/vr0657oL/3/