I’ve been getting a very annoying Out-of-sync error for a while now and I can’t seem to find a useful solution. I have tried a lot of solutions found on the internet but neither of them helped me out. The error occurs after I open a FileResource with either _top or _self, the error doesn’t occur on _blank. After I opened, saved or cancelled the file in the download prompt I can’t seem to be able to click anything within my application without getting the error.
So, is there anyway I can provide a generated file to download without getting out of sync? Should I be generating the file on the first button click and let the user press to actually download it or is there a way to do this in one step?
Is there anyone who knows how to open a FileResource without using “_blank” parameter and not getting the out-of-sync error? I can’t seem to find a working solution…
I want to show a window (like the example below) where a user can choose whether he wants to open or save the generated file. But the problem is that when I use getMainWindow().open(FileResource) the client gets out-of-sync after the window is being shown. The only way I can fix it is by adding the _blank parameter but the browser will block the download window in that case which I don’t want to.