(TypeError) : $0.$connector is undefined

Hi,

I am using vaadin flow version 10.0.1. Sometimes I got a popup with this error: (TypeError) : $0.$connector is undefined. I don’t see any java exception.

How can I solve this? Any help?

Please update to a later platform version, 10.0.9 is the latest LTS and 12.0.3 the latest stable version. There is no reason why not to take newer maintenance releases into use, as those can contain even security fixes.

The error is related to the client side connector for some component (grid/combobox/datepicker) not being available. I’m pretty sure it has been fixed in newer versions.

Same here, different application, with 12.0.3 .

This is in Firefox (latest).

The box has a slightly different text in other browsers.

Chrome: (TypeError) : Cannot read property ‘reset’ of undefined

Safari: (TypeError) : undefined is not an object (evaluating ‘$0.$connector.reset’)

Hope the ‘reset’ part is a valuable hint.

Cheers,
Enver

Happens in comboBox.setItems(Collection)

when called from beforeEnter(BeforeEnterEvent)

in a class with Signature

@UIScope
public class OverviewView extends PolymerTemplate<OverviewView.OverviewViewModel> implements HasComponents, BeforeEnterObserver

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-combo-box-flow</artifactId>
        <version>1.1.0</version>
    </dependency>

This version of vaadin-combo-box-flow does not expose the problem for me.

Of course, it is not advised to simply downgrade this in Maven, but it does the trick for me;
for the time being (no functionality hooked up yet though).

https://github.com/vaadin/vaadin-combo-box-flow/issues/181

Same thing happened for me with two ComboBoxes using Vaadin 12.0.2, the valueChangeListener for ComboBox1 calls setItems for ComboBox2. If ComboBox2 doesn’t have any items (setItems was never called), I’d get the TypeError. Populating ComboBox2 with an empty list made the problem go away.

Did you two @UIScope your view?

Which is not the usual way of doing it as there is an implicit “ViewScope” when not annotating it?

For me the problem went away by removing the @UIScope from my views.

No, this was a super simple view with no @UIScope.

Problem still existing on Vaadin 13.0.0.alpha2 ! Also not using any of annotation !

Marko Mitic:
Problem still existing on Vaadin 13.0.0.alpha2 ! Also not using any of annotation !

I might be join for this conversation, the same issue happened here in Safari and Chrome and just occasionally.

After successful authentication, the browser redirected to the home page. It has a grid and multiple combobox. They all have dataProvider. When the home page loads, multiple error message stacked up in a dialog with background fade away.

JS console shows the following JS error list:

[Error]
 TypeError: undefined is not an object (evaluating 'window.Vaadin.Flow.gridConnector.initLazy')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.setSelectionMode')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.updateSize')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.set')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.confirm')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.updateSize')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.set')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.confirm')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.updateSize')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.set')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.confirm')
[Error]
 TypeError: undefined is not an object (evaluating 'window.Vaadin.Flow.comboBoxConnector.initLazy')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.updateSize')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.set')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.confirm')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.setLocale')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.updateSize')
[Error]
 TypeError: undefined is not an object (evaluating '$0.$connector.confirm')

I hope this was helpful.

Cheers.

Most likely this is due to the fact that you formatted the contents of the folder:
src/main/resources/static/frontend/*
Leave original formatting.

Bob Bobov:
Most likely this is due to the fact that you formatted the contents of the folder:
src/main/resources/static/frontend/*
Leave original formatting.

I am sorry but what does “original formatting” means in your context? Formatting of the path string or formatting what?
Thanks for the clarification.

A

I have many many such error also…
what I found is that when I reset my server the errors disapear and the app works fine!

I suspect this is caused by some kind of resource shortage if server is consumes resources because of leaks

What version are you using? DEBUG mode or not?

An interesting observation, but it may as well have to do with some other kind of server state, does not need to be a resource leak. When I last had this problem, I was experimenting with router layouts (parent layouts and such) used in a wrong way.

I will have another look when back from my holidays in a few weeks.

Guys,

please let’s go the official way.

Can you please verify this

https://github.com/vaadin/vaadin-combo-box-flow/issues/169
or this
https://github.com/vaadin/vaadin-combo-box-flow/issues/181

is the main issue?

Can you please update to 13.0.8 and comment whether the problem still persists?
Please can you also confirm your browser and version?
If you then could narrow down the issue and provide us with code that exhibits the erroneous behaviour, that would be splendid!

Cheers,
Enver

Hello
I am using 14.0.0.beta2
I don’t say that the possible leaks was from Vaadin
there could be mine, or from other apps on the server
but of course could be something else on the server!

Had a “TypeError: Cannot read property ‘0’ of undefined” a minute ago – I wonder if it’s related. In my case (not my code though) it appears when opening (clicking the down arrow) an empty ComboBox.
Vaadin 13.0.6


and updating to 13.0.8 made the problem go away. Wish life was always that easy :smiley:

I had a message:“(TypeError) : Cannot read property ‘doSelection’ of undefined.”
Adding Dialog using the add() method solved my problem, so all components should be add to the editor class.