Logging out when there are multiple AngularJS staff client tabs open can cause problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned | ||
3.11 |
Fix Released
|
High
|
Unassigned | ||
3.12 |
Fix Released
|
High
|
Unassigned |
Bug Description
Because of the way that the AngularJS staff client handles BroadcastChannel messages on the eg.auth channel that are sent when another tab (either Angular or AngularJS) gets a request to log out, it is possible for multiple browser tabs that have the AngularJS staff client open to fall into a broadcast storm of logout messages on the eg.auth channel. Any Angular staff tabs that are also present will attempt to handle each and every message by running a running an open-ils.
Empirically, opening four or five open AngularJS tabs, then logging out of one, is sufficient to reproduce the problem.
Note that it is STRONGLY recommended to test this only on personal and isolated Evergreen systems.
Evergreen 3.8+
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | none → 3.next |
milestone: | 3.next → none |
Changed in evergreen: | |
assignee: | nobody → Jeff Davis (jdavis-sitka) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
A patch is available in the branch working/ user/gmcharlt/ lp2034617_ improve_ logout_ handling / https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ gmcharlt/ lp2034617_ improve_ logout_ handling
I think this patch is a candidate for a quick fix, but additional work would be useful to:
- have the Angular app stop listening to eg.auth messages after it receives the first 'logout' message (then resume once the user has logged in again)
- tighten up the logic around when the AngularJS expired auth handler sends the broadcast message