question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

__isVuelidateAsyncVm' of undefined...

See original GitHub issue

Hi there, I’m stuck to version 0.2.0 ! Version 0.3.0 introduced lots of changes and I have lots of forms tied to vuelidate (thank you for such a great module btw). If I upgrade to >= 0.3.0 I have one of my form that throw:

[Vue warn]: Error in render function: "TypeError: Cannot read property '__isVuelidateAsyncVm' of undefined"
    at VueComponent.$pending (index.js?112c:249)
    at Watcher.get (vue.runtime.esm.js?ff9b:2877)
    at Watcher.evaluate (vue.runtime.esm.js?ff9b:2984)
    at VueComponent.computedGetter [as $pending] (vue.runtime.esm.js?ff9b:3261)
    at eval (index.js?112c:96)
    at Array.some (<anonymous>)
    at VueComponent.$pending (index.js?112c:95)
    at Watcher.get (vue.runtime.esm.js?ff9b:2877)
    at Watcher.evaluate (vue.runtime.esm.js?ff9b:2984)
    at VueComponent.computedGetter [as $pending] (vue.runtime.esm.js?ff9b:3261)

…tough to debug! What is __isVuelidateAsyncVm, what does it mean? If I just add <pre>{{ $v }}</pre> it trigger the error on a untouched form where the error still don’t occur yet. Thanks for help! (sorry very difficult to fiddle this one)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
gplumecommented, Aug 30, 2017

Great! Got it in 5 minutes this time, thanks very much again! A custom validator function wasn’t returning any bool if value == null… classic I guess.

9reactions
Frizicommented, Aug 30, 2017

Could you show your validation config or ideally create a reproduction on the fiddle? The __isVuelidateAsyncVm is an internal property to decide if certain validation is asynchronous. It’s an implementation detail and you should not rely on it in any way in your code. Anyhow, it says it’s accessed on undefined, which happens here https://github.com/monterail/vuelidate/blob/5e5436455972bd0456b8ae5da001ad8d4ba78e41/src/index.js#L222-L235

This whole method is really a computed value, so it’s computed when you access it. Printing $v accesses everything, forcing the whole vuelidate model to recompute instantly.

The run.output is undefined. That means the run computed value returns a bad value. Internally it uses runRule to compute the output based on provided config. https://github.com/monterail/vuelidate/blob/5e5436455972bd0456b8ae5da001ad8d4ba78e41/src/index.js#L167-L184

It’s the output of your validation rule, which returns undefined for some reason.

It is certainly an error of your configuration, though I never specified anywhere that this behaviour (returning undefined) is illegal. I do say that it should be a boolean on a promise though.

I’d like to preserve undefined as illegal, but in development mode an error to the console could be reported and the value treated like being valid. That means there is work to do on both ends 😉 On your side, just make sure that your validators doesn’t return undefined and you are free to upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property '__isVuelidateAsyncVm' of undefined
But for some reason, I'm getting the error Cannot read property '__isVuelidateAsyncVm' of undefined . javascript · vue.js · vuetify.js ...
Read more >
Cannot read property '__isVuelidateAsyncVm' of undefined ...
[Solved]-Cannot read property '__isVuelidateAsyncVm' of undefined-Vue.js. Search. score:4. Accepted answer. First some comments, it's great that you have ...
Read more >
Cannot read property '__isVuelidateAsyncVm' of undefined
Cannot read property '__isVuelidateAsyncVm' of undefined. Answer a question Here is the code I have codesandbox, What I have here is a form ......
Read more >
Cannot read property '$model' of undefined - Vuelidate
Your validations object is missing a level key. I'm not familiar with this library but that could be it?
Read more >
vue.js - vuelidate, how to make a custom check? - CompuTicket
But when using V-if = "! $ v.form.phone.isphone" Error crashes: Error in Render: "TypeRerror: Cannot Read Property '__ISVuelidateAsyncvm' of undefined" . Who ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found