Skip to content
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

fix: reconnect web components after session expiration (#20407) (CP: 24.5) #20439

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

vaadin-bot
Copy link
Collaborator

No description provided.

* fix: reconnect web components after session expiration

After session expiration, Flow client in webcomponent mode send a GET request
to the server to re-initialize itself with a valid session cookie.
However, the XHR call is done with the withCredentials flag set to false,
making the browser ignore the Set-Cookie header in the response.
This change forces the withCredential flag to true for resync request
so that the new cookie can be handled by the browser and reused in the
subsequent request that re-intitializes the embedded component.
If PUSH is enabled, it also restores the connection after resynchornization
request to make sure pending invocation queue, and especially the
webcomponent connected events, can be flushed correctly and sent to the
server.
Also temporarily suspends hearbeat during resynchronization request to prevent
issue with concurrent requests, potentially causing duplicated session
expiration handling on the client.

Fixes #19620

* add tests
Copy link

github-actions bot commented Nov 11, 2024

Test Results

1 145 files  +3  1 145 suites  +3   1h 24m 25s ⏱️ - 4m 18s
7 471 tests ±0  7 421 ✅ ±0  50 💤 ±0  0 ❌ ±0 
7 829 runs   - 2  7 769 ✅  - 3  60 💤 +1  0 ❌ ±0 

Results for commit 52f0a0c. ± Comparison against base commit b489b21.

♻️ This comment has been updated with latest results.

@vaadin-bot
Copy link
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR[Message is sent from bot]

@vaadin-bot vaadin-bot enabled auto-merge (squash) November 12, 2024 08:03
Copy link

sonarcloud bot commented Nov 12, 2024

@vaadin-bot vaadin-bot merged commit 7fadbd2 into 24.5 Nov 12, 2024
25 of 26 checks passed
@vaadin-bot vaadin-bot deleted the cherry-pick-20407-to-24.5-1731328963270 branch November 12, 2024 08:14
@vaadin-bot
Copy link
Collaborator Author

This ticket/PR has been released with Vaadin 24.5.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants