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

[🐛 BUG] De-synchronized front-ends and back-end #2344

Open
1 of 7 tasks
jrobinAV opened this issue Dec 17, 2024 · 0 comments
Open
1 of 7 tasks

[🐛 BUG] De-synchronized front-ends and back-end #2344

jrobinAV opened this issue Dec 17, 2024 · 0 comments
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon

Comments

@jrobinAV
Copy link
Member

jrobinAV commented Dec 17, 2024

What went wrong? 🤔

Front-ends get de-synchronized when re-running an application.

This is more important than it looks like, as it happens frequently and gives users the wrong impression that their application has a bug.

For example, it happens frequently during an application's development phase, especially with the default behavior of Gui().run(), which opens a new tab without closing the previous tabs.

It also happens when re-deploying a live application, causing the wrong error messages at a very bad time.

Reproduce the situation

The problem arises when:

  • We run an application.
  • We access the application on a browser tab.
  • We shut down the application without closing the tab.
  • We re-run the application (or another application on the same port).
  • We use the same old tab that does not correspond to the new back-end application. This may create errors, warnings, or inconsistencies.

Expected Behavior

De-synchronized front-ends should be aware that the back-end version they are connected to is incorrect. The front-end application should automatically display a message to let the user know he/she should refresh the browser.

Solution Proposed

What about generating a unique identifier each time we run the server? It could represent a run_identifier. Each of the clients (the tabs) could know this unique run_identifier.
The clients could pass the run_identifier to the back end every time it communicates with it. On the server side, the client request is properly rejected if the run_identifier received from the client does not match its own internal run_identifier. The front end should be able to display a message asking the user to refresh the tab.

Version of Taipy

  • 3.X,
  • 4.Y,
  • develop

Linked issues

Acceptance Criteria

  • A unit test reproducing the bug is added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@jrobinAV jrobinAV added 💥Malfunction Addresses an identified problem. 🖰 GUI Related to GUI 🟧 Priority: High Must be addressed as soon labels Dec 17, 2024
@jrobinAV jrobinAV changed the title [🐛 BUG] [🐛 BUG] De-synchronized front-ends and back-end Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon
Projects
None yet
Development

No branches or pull requests

1 participant