[MGNLUI-1018] Opening and closing an App and reloading the page will cause the app launcher to go blank Created: 02/Apr/13  Updated: 14/May/13  Resolved: 10/Apr/13

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Bug Priority: Critical
Reporter: Samuli Penttilä Assignee: Tobias Mattsson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-4919 Create UI tests for admincentral Closed
relates to MAGNOLIA-4979 AdminCentralUITest#assureAppLauncherD... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Reloading page after App has been closed will break App Launcher. Steps to reproduce:
1. Open any app
2. Close the app
3. Reload browser while at App Launcher or re-enter the url
4. Open any App
5. Close it
Now app launcher screen is empty of apps and any further reload/open/close cycle of any App will cause NPE:

Caused by: java.lang.NullPointerException
at info.magnolia.ui.framework.app.AppControllerImpl.doStop(AppControllerImpl.java:256)
at info.magnolia.ui.framework.app.AppControllerImpl.stopCurrentApp(AppControllerImpl.java:191)
at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)



 Comments   
Comment by Samuli Penttilä [ 02/Apr/13 ]

Add to step 3: reloading must be done to admincentral root without url app:subapp fragment

Comment by Daniel Lipp [ 08/Apr/13 ]

When reloading in AppLauncher, the not properly closed app and its view are still around and hence ShellImpl#stopCurrentApp will not navigate to "shell:applauncher".

Comment by Daniel Lipp [ 08/Apr/13 ]

According to my latest tests, the issue should be gone once MGNLUI-901 is fixed.

Comment by Tobias Mattsson [ 09/Apr/13 ]

The reason seems to be that the state of the viewport is not in sync with the component graph. The value of ViewportState.activeFragment is not removed when DeckLayout.pop() is called. This call comes from ShellImpl#stopCurrentApp.

Because ViewportState.activeFragment is not cleared its component will be reinstated on a refresh by ShellViewport#beforeClientResponse.

This will not resolve itself by fixing MGNLUI-901. We need to review these classes to make sure that the state is always correct.

Also, later in the code flow AppControllerImpl#doStop will call ShellViewport.setView(null) if there are no more apps running. This has no effect because the implementation does nothing if the view given is null. My understanding has been that this would remove the current view. ShellAppController also works like this and its calls have no effect either.

Generated at Mon Feb 12 08:42:33 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.