[MGNLCT-84] Git clone operation may register app definition before ct definition and thus break the app Created: 20/Dec/18  Updated: 08/Jan/19  Resolved: 08/Jan/19

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Martin Drápela Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File gitClone_appDefbeforeCTDef.png     PNG File image-2018-12-20-11-03-08-430.png    
Issue Links:
Relates
relates to DOCU-1707 Rewrite "My first translation" tutorial Closed
duplicate
duplicates MGNLUI-4932 CT based app fails to start with NPE ... 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   

Environment:

  • Magnolia CLI: 3.0.4 (node.js: v8.14.0)
  • git version 2.17.1
  • Ubuntu 18.04 bionic
  • Kernel: x86_64 Linux 4.15.0-42-generic
  • Magnolia 6.0 CE demo

Tested with for example: 

https://git.magnolia-cms.com/users/mdrapela/repos/test1-app/browse

 

When git-cloning a light module (which creates a CT-based content app) from a repository to a magnolia.resources.dir, the order in which the git clone operation fetches the resources may impede the correct registration of an app defined in the light module.

From the log:

Both yaml resources are registered (and seen correctly in the Definitions app), but the app doesn't know about the CT definition.

 

After adding the test1-app an applauncher group, refreshing the view, the tile will show up in the app group, but with a wrong icon and - more importantly - after clicking the app to open it, an error will be thrown:

2018-12-20 10:28:15,664 INFO info.magnolia.module.ModuleManagerImpl : Stopping module ui-admincentral
2018-12-20 10:28:15,684 INFO info.magnolia.module.ModuleManagerImpl : Starting module ui-admincentral 
2018-12-20 10:28:22,732 WARN info.magnolia.ui.framework.app.AppControllerImpl : No default location could be found for the 'test1-app' app, please check subapp configuration. 
2018-12-20 10:28:22,734 ERROR agnolia.ui.framework.app.AppInstanceControllerImpl: App test1-app failed to start: type java.lang.NullPointerException: type

A temporary fix

Touch the app's definition file (test1-app.yaml) after cloning the light module, so that it gets re-registered. Then the app starts working:

 

 

 

 

 

 

 

 



 Comments   
Comment by Mikaël Geljić [ 08/Jan/19 ]

Closing as duplicate, other ticket is already selected (and most likely in the right project); thanks for all the details on this one mdrapela, appreciated.

Generated at Mon Feb 12 00:37:00 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.