1

I want to use Anchor element with Button as child, but in this case i got exception:

java.lang.UnsupportedOperationException: Confirmed duplicate message from the client. Expected sync id: 2, got 1. Message start: {"csrfToken":"992caf41-4b1c-4b1e-97da-04c83c55301a","rpc":[{"type":"event","node":10,"event":"click","data":{"event.shiftKey":false,"event.metaKey":false,"event.detail":1,"event.ctrlKey":false,"event.clientX":693,"event.clientY":166,"event.altKey":false,"event.button":0,"event.screenY":262,"event.screenX":693}}],"syncId":1,"clientId":1}

Here is source code for my elements:

Button button = new Button("Rules");
Anchor anchor = new Anchor("/rules", button);

My classes sources: https://pastebin.com/G8zU0csP

I am using Vaadin 14.0.5 Can anyone help me with this issue?

user3911971
  • 131
  • 1
  • 9

1 Answers1

0

Did you add both button and anchor to the UI? if this is the case, then you should add only anchordirectly. This seems to work for me without any problems

Button button = new Button("Title");
Anchor anchor = new Anchor("https://stackoverflow.com/questions/58684723/vaadin-flow-unsupportedoperationexception-confirmed-duplicate-message-from-the", button); add(anchor);

Could you add more details to your example? What is the URL in your Anchor?

anasmi
  • 2,562
  • 1
  • 13
  • 25
  • ``` Button button = new Button(title); Anchor anchor = new Anchor("/rules", button); ``` – user3911971 Nov 04 '19 at 07:27
  • The problem is encountered in case of use anchor with links to navigate inside of application – user3911971 Nov 04 '19 at 07:31
  • sure, i add only Anchor to the UI – user3911971 Nov 04 '19 at 07:37
  • I still can't reproduce an error, if I simply navigate to another Route. Do you have a minimum reproducible example? Like only those two views with an error? – anasmi Nov 04 '19 at 08:22
  • 1
    What is an `anchor` element in your `BaseView`? How your `configurePage` looks like? If I simply rename `anchor` to use `logogAnchor` and leave `configurePage` without implementation, then everything works. Which makes me thing that problem is not with the snippet code you are asking about, but the `anchor` you haven't shared. There is not much we could help with, if we can't reproduce a problem. Sorry about that – anasmi Nov 04 '19 at 13:24
  • after long time of investigation i found that this error occurred only on my laptop in firefox 70.0.1(latest at this time), in google chrome all works correctly, and on another firefox same version installed on another one laptop everything works perfect too. – user3911971 Nov 05 '19 at 21:11