RPC calls fail because connector could not be found

Hi,

I have a UI class and it’s init method:

void init(VaadinRequest request) {
setPollInterval(10000);

        new Thread(new Runnable() {
            @Override
            public void run () {
                while (true) {
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        // ok
                    }
                    update();
                }
            }
        }).start();

}

void update () {
// updates the ui
}

Every time the update gets called and I’m using internet explorer 8 the following warn message gets written:

WARNING: RPC call to v.v received for connector XX but no such connector could be found. Resynchronizing client.

What’s the cause for this?

I’m using Vaadin 7.1.7.

You don’t show us what happens in the update method, but I’d assume you have a race condition due to missing synchronization when accessing the UI from another thread. The update method should probably look like this:

void update() {
    access(new Runnable() {
        public void run() {
            // do the actual update
        }
    }
}

Thank you very much for your reply. Unfortunately I am executing the ui modificiations within an access wrapper. But what’s interesting is, that if I only output to system.out and do no ui changes I don’t get the error messages. So the error message is related to the ui update even though I encapsulated it within the access-wrapper.

Ah, all right.

Actually, I remember now - this is a Vaadin bug-ish. You get the warning if the server asynchronously removes a component from the tree, and concurrently, before the client is notified about the removal, the still-existing client-side component sends an event to its server counterpart. This is a harmless issue in most cases, although it causes the whole UI to be repainted, so may slow things down a bit. It is hard to say what should be done in Vaadin about it. In principle we could just ignore RPCs to components that we know are removed on the server side but not yet on the client side, but on the other hand that could hide real UI/UX problems in applications - losing user-originated events might lead to weird situations.

Thank you for the clarification. There is no real impact of those messages, they are just ugly. The messages let the developer assume it’s his fault which it isn’t in this case I guess.