# Cannot read property "allnames"

**URL:** <https://forum.servoy.com/t/cannot-read-property-allnames/15087>\
**Category:** Classic Servoy\
**Created:** [November 25, 2011, 1:01pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087 "2011-11-25T13:01:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mihaela](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mihaela](https://forum.servoy.com/u/mihaela)\
**Post date:** [November 25, 2011, 1:01pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/1 "2011-11-25T13:01:48Z")

</div>

Hi,  
We are using Servoy 5.2.4 and we have this issue randomly appearing: [http://screencast.com/t/mnkwfAszWzH](http://screencast.com/t/mnkwfAszWzH)  
It comes from this line:  
vElements = forms[vForm].elements.allnames  
Any idea why it might appear, randomly? The vForm is defined.  
We also had this kind of random error with a specifc element name: [http://screencast.com/t/4KE1TDZo](http://screencast.com/t/4KE1TDZo)  
coming from:  
forms[vFormName].elements.fld\_organisationFilter.visible = true  
Many thanks in advance for the answer.

---

<div class="post-metadata">

**Author:** ![mihaela](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mihaela](https://forum.servoy.com/u/mihaela)\
**Post date:** [November 25, 2011, 1:24pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/2 "2011-11-25T13:24:39Z")

</div>

Also a random error that appears on the form foundset: [http://screencast.com/t/sAzExatXQb](http://screencast.com/t/sAzExatXQb)  
coming from:  
forms[vCurrentForm].foundset.getRecord(forms[vCurrentForm].foundset.getSelectedIndex())  
when the vCurrentForm is defined.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [November 26, 2011, 4:39pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/3 "2011-11-26T16:39:26Z")

</div>

I see those errors as well but it’s not reproducible, the code is correct and works 99% of the times I wasn’t able to figure out the cause so far. It only happens in client, never saw that in developer.

---

<div class="post-metadata">

**Author:** ![lwjwillemsen](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lwjwillemsen/32/4987_2.png) [@lwjwillemsen](https://forum.servoy.com/u/lwjwillemsen)\
**Post date:** [November 26, 2011, 5:04pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/4 "2011-11-26T17:04:05Z")

</div>

I only have those error messages in developer for several years.  
It only happens (and not always) when changing and saving forms which are showing in smart client (started from developer).  
In that case : restart the client and it’s fixed…

Regards,

---

<div class="post-metadata">

**Author:** ![mihaela](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mihaela](https://forum.servoy.com/u/mihaela)\
**Post date:** [November 28, 2011, 9:49am UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/5 "2011-11-28T09:49:05Z")

</div>

Except the getRecord one, the others are also seen in the developer, and a restart of the debug client removes them.  
But all of them are seen in the smart client, randomly.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [November 28, 2011, 10:45am UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/6 "2011-11-28T10:45:39Z")

</div>

please do upgrade to the latest 5.2.x or 6 to see if this is improved/fixed

It is very hard to say what goes wrong, do you have in the java console a bit more stack? So that we can see what the call exactly is?

elements should just always be there for a form.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [November 28, 2011, 2:39pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/7 "2011-11-28T14:39:33Z")

</div>

I have this problem on 5.2.8 and 5.2.10.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [November 28, 2011, 2:59pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/8 "2011-11-28T14:59:09Z")

</div>

I have seen the same thing in Developer. Usually when I restart the client after an error (any error) occurred. Most of the time it tells me that the property ‘elements’ doesn’t exists. As we all know this property is ALWAYS available on a form. So somehow things get in a weird state and requires me to restart Developer altogether to fix this.  
This is all the way up to 5.2.11 (haven’t tried 6.x) on Mac OS X 10.7.2.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [November 28, 2011, 3:06pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/9 "2011-11-28T15:06:53Z")

</div>

In my case it happens on servoy smart client running from servoy server in a production system, the users are quite annoyed by this. A simple logout/login and things get back to working fine.

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [November 28, 2011, 3:17pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/10 "2011-11-28T15:17:27Z")

</div>

> ROCLASI:  
> I have seen the same thing in Developer. Usually when I restart the client after an error (any error) occurred. Most of the time it tells me that the property ‘elements’ doesn’t exists. As we all know this property is ALWAYS available on a form. So somehow things get in a weird state and requires me to restart Developer altogether to fix this.  
> This is all the way up to 5.2.11

+1

Happens in production environment as well.  
Unfortunately it’s hard to get a reproducible situation.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [November 28, 2011, 3:21pm UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/11 "2011-11-28T15:21:41Z")

</div>

developer is quite tricky  
there some thing like this could happen, because of scripts running and stuff updating from the developer site,  
in a developer you now and then could be in a wrong state that you have to restart anyway (like altering default values of form/global variables)

The problem is more how could these things happen in real smart or webclients

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [January 4, 2012, 11:18am UTC](https://forum.servoy.com/t/cannot-read-property-allnames/15087/12 "2012-01-04T11:18:38Z")

</div>

> mihaela:  
> Except the getRecord one, the others are also seen in the developer, and a restart of the debug client removes them.

> ROCLASI:  
> So somehow things get in a weird state and requires me to restart Developer altogether to fix this.

So when it happens in developer, it always happens (reproducible from there on), until you either restart the clients or developer is restarted.  
When in happens in clients running on server, it always happens until you restart the client.

If you see this happening again in developer, please have a look in the log file to see if there is any error message/stack trace containing more info. Maybe a bit sooner then the actual ‘undefined’ error. There’s a case for this btw ([SVY-1226](https://support.servoy.com/browse/SVY-1226)).
