-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PreserveOnRefresh - enabled, PushMode=Automatic, PushTransport=LongPolling - Application fails when page is reloaded #10103
Comments
Thanks for submitting the issue with the details and steps to reproduce. It may seems a little odd but I can see the issue on Chrome even without disabling the websockets (I'm using the 88.0.4324.150 on Mac). On the other hand, I could not reproduce it anyhow on Firefox even by disabling the websockets. So, I was curious to know whether you can see it on Firefox in your environment. |
Hi @taefi Thank you very much for looking into this.
Linux (transport set to LONG_POLLING):
So, it seems indeed that on Firefox is working. Sorry about this, but I mentioned it as one of my colleagues saw this error also on Firefox, but I think this was some time ago. Then the question is, do you really think this is only a browser (Chrome / Safari) related issue? |
Hi @taefi, MacOS (PushMode=Automatic, Transport=WEBSOCKET_XHR)
Linux (PushMode=Automatic, Transport=WEBSOCKET_XHR)
So, it is indeed odd that on your Chrome version on Mac you could reproduce this even with WebSockets enabled. |
Hi @silvan-lincan, Great Info, thanks for the update. I only followed your steps:
So, I'm going to investigate more. First, I'll update my Chrome to see what happens. |
Hi @taefi , |
Hello, |
Everything works correctly without Push. Node with id=4 is a confirmation dialog. |
The problem is apparently caused by the fact that The workaround is extremely simple: don't rely on auto attach the dialog to the
|
Hi Denis, thank you very much for your answer. Do you think that there is still a chance for an official fix? |
I'm just writing my thoughts and results here during the investigation. |
Cool, thank you very much. |
This is apparently a Push only issue. The changes are collected two times after reload . I see the second command in the Network tab but there is no the first command. I assume it happens because of Push. In fact sometimes I see a random failure even when I try load the page without any reload/refresh. And there is a Push failure in the JS console :
This is very similar to #7600 |
On the other hand Push error has happened on close event and may be is unrelated to the issue. |
Without Push there is only one response which contains all the changes including attach for the dialog. |
OK, this is pure Push issue related to the fact that Push connection has not been closed properly most likely. If I comment out closing Push connection in the The problem appeared with https://www.chromestatus.com/feature/4664843055398912: it disallows calling There is a Chrome flag So it proves that the issue is caused by the push connection behavior.
I don't have any knowledge of Push. Help from someone who has this knowledge is needed. @Artur- , could you please take a look ? |
I've updated the JS push from here: https://github.com/Atmosphere/atmosphere-javascript/blob/master/modules/javascript/src/main/webapp/javascript/atmosphere.js We are using The latest And the latest version doesn't throw the error related to call http://localhost:8080/?v-r=push&v-uiId=4&v-pushId=7ba48cb6-a736-4d8e-af3b-e8e0291f48f7&X-Atmosphere-Transport=close&X-Atmosphere-tracking-id=85f35659-3b70-43a4-b863-a1a28676763d&_=1617005027288 |
fix: Upgrade to Atmosphere 2.7.2 and Atmosphere JS 3.1.2 fixes #10103
Upgrade reverted because of Atmosphere/atmosphere#2444 |
This ticket/PR has been released with platform 22.0.0.alpha5 and is also targeting the upcoming stable 22.0.0 version. |
fix: Upgrade to Atmosphere 2.7.2 and Atmosphere JS 3.1.2 fixes #10103
These are the steps how to reproduce
|
This ticket/PR has been released with platform 23.0.0.alpha3 and is also targeting the upcoming stable 23.0.0 version. |
Description of the bug / feature
Due to certain environment conditions / restrictions, for one of our clients, WebSockets cannot be enabled, therefore, the application falls back to LONG_POLLING.
PreserveOnRefresh=enabled
PushMode=AUTOMATIC
PushTransport=LONG_POLLING
Everything works nice, with the following exception:
if there is an Overlay opened (e.g. a ConfirmationDialog) and the user makes a page-reload (F5 or click from the browser), the application fails with the following exception and the result is an empty screen:
The following error is displayed on the server-side:
Minimal reproducible example
Code below and also as archive (it can be easily reproduced from a starter app).
Steps to reproduce:
skeleton-starter-flow-14.zip
Expected behavior
No matter if WebSockets are enabled or disabled, the main layout should be rendered along with the Overlay, without exceptions.
Actual behavior
If WebSockets are enabled, and there is an Overlay opened, the issue cannot be reproduced, everything works as expected (main layout is rendered and the overlay is also rendered back).
If WebSockets are enabled, and there is no Overlay opened, again, everything works as expected: main layout is rendered without issues.
If WebSockets are disabled, and there is an Overlay opened, then a blank page is shown along with an exception:
If WebSockets are disabled, and there is no Overlay opened, then everything works as expected: main layout is rendered without issues.
The issue can also be reproduced, with any other component which is attached directly to the root.
Versions:
Would be really appreciated if you can make some light here.
Thank you.
The text was updated successfully, but these errors were encountered: