Skip to content

Property or method "toJSON" is not defined #460

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

Closed
codermarcos opened this issue Nov 22, 2017 · 21 comments
Closed

Property or method "toJSON" is not defined #460

codermarcos opened this issue Nov 22, 2017 · 21 comments

Comments

@codermarcos
Copy link

This error happens when i pass the component by param to action in vuex.

To reproduce the error

  //  Call an action in component passing the component as param to vuex
  this.$store.dispatch('metadataAddBox', { component: this });

screenshot

[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.

@roger-russel
Copy link

Yeah, it happens with me too.

@rDr4g0n
Copy link

rDr4g0n commented Nov 30, 2017

I found that elementui triggers this pretty frequently and commented on a thread on their issues page, but I suspect the fix may lie within vue devtools, rather than elementui.

@rDr4g0n
Copy link

rDr4g0n commented Nov 30, 2017

This is probably related to #464

@posva
Copy link
Member

posva commented Nov 30, 2017

Thanks for the extra information about recursive data @rDr4g0n

@Akryum
Copy link
Member

Akryum commented Dec 24, 2017

Maybe we could treat components like a special type (kinda like RegExp).

@posva
Copy link
Member

posva commented Dec 24, 2017

Yeah, it cannot be displayed like the other content because of cyclic references, so it needs special treatment

@Akryum
Copy link
Member

Akryum commented Dec 24, 2017

Cyclic references are already taken care of, it must be something else.

@posva
Copy link
Member

posva commented Dec 24, 2017

oh right, there was a package for that

@sangdth
Copy link

sangdth commented Feb 27, 2018

Today I encountered this error again.

vue: 2.5.13
vuex: 3.0.1
vue-devtools: 4.1.3
element-ui: 2.0.7

screen shot 2018-02-27 at 10 10 54

@jamelt
Copy link

jamelt commented May 24, 2018

I'm having this issue too, with element-ui.

@erwer8363
Copy link

how to fix this ? help help help

@onergang
Copy link

onergang commented Oct 20, 2018

In my project, I opened the console, by this

window.vConsole = new VConsole();

but when I commented it. It works, the Vue warn was disappeared.

@oscar-gardiazabal
Copy link

Sentry seems to cause this error

@MarvinXu
Copy link

MarvinXu commented Dec 4, 2018

In my case, I used VConsole and print vue instance by console.log(this), then caused this error. Hope this can help.

@qiuyudong
Copy link

Sentry seems to cause this error

yep. I close Sentry and fix this error

@guan6
Copy link

guan6 commented Dec 7, 2018

Sentry seems to cause this error

yep. I close Sentry and fix this error

me too

@towry
Copy link

towry commented May 28, 2019

vConsole

@martin-haryanto
Copy link

any workaround for problem coming from Sentry? this is very frustrating for me since i makes the application hangs and make the CPU spike to 100%

I was using raven-js to capture error and processed it for sentry, so i cannot just remove it. But an error in action level, will trigger a log from all over the component in that Page.

@rmarmitt
Copy link

Any updates about this with Sentry?

@jarrodwhitley

This comment was marked as spam.

1 similar comment
@loehx

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests