Skip to content

Update fails silently #7

@krit0n

Description

@krit0n

I inherited a project, that is utilizing the Modularmind Updatemanager.

This projects build generates

  • a zip file containing the deliverable product (as of now called the client)
  • and a p2 repository containing all dependencies of the client.

Here is a sketch of the clients dependency tree:

client
├───klv-feature.feature.group  Version: 1.0.1.2
│   ├───klv-shared             Version: 1.0.1.2
│   ├───klv-ui                 Version: 1.0.1.2
│   └───...
├───...
└───com.modumind.updatemanager.feature.feature.group
                               Version: 1.0.0.202112082110

The Modularmind Updatemanager is invoked every time the client starts:

@Inject UpdateManager updateManager;
// ..

@PostContextCreate
void postContextCreate() {
  log.info("------------------------------");
  log.info("       Starting KLV 4.0       ");
  log.info("------------------------------");
  logSystemInformation();
  log.info("check for updates...");
  boolean updateDone = updateManager.performAutoUpdate();
  // ..
  // restart application if `updateDone` is true
}

As long as the contents of the p2 repository match the dependencies of the client no updates are made. As is expected.

Then I upgrade the contents of the p2 repository to a newer version (1.0.2.3):

repository
├───features
│   ├───klv-feature_1.0.2.3.jar
│   ├───com.modumind.updatemanager.feature_1.0.0.202112082110.jar
│   └───...
├───plugins
│   ├───com.evolit.klv.shared_1.0.2.3.jar
│   ├───klv-ui_1.0.2.3.jar
│   └───...
└───...

When I start the client at this point I expect the Modularmind Updatemanager to discover that some bundles can be updated, fetch these bundles from the repository and signal my application that it should restart (thus updateManager.performAutoUpdate should return true).

But no updates are fetched and the application starts without the updates.

Here is the relevant log:

14:23:10.254 [0cd862bd67] [DEBUG] c.e.k.s.extension.KlvApiObjectMapper   - Initialize new ObjectMapper.
14:23:10.349 [0cd862bd67] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Initialize new KLVUpdateManagerLogger
14:23:11.140 [      main] [INFO ] c.e.k.ui.state.ApplicationState        - ApplicationState init
14:23:11.376 [      main] [INFO ] c.e.k.ui.state.ApplicationState        - ClientId set to 88A4C24E7EA5
14:23:11.392 [      main] [INFO ] c.e.k.ui.login.LoginController         - LoginController init
14:23:11.392 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - LifeCycleManager init
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - ------------------------------
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              -        Starting KLV 4.0       
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - ------------------------------
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - java.version: 11.0.15
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - java.class.version: 55.0
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - java.home: C:\Users\cweber\test\klv-client-win32.x86_64-1.0.1.2\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_11.0.15.v20220515-1236\jre
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - java.class.path: C:\Users\cweber\test\klv-client-win32.x86_64-1.0.1.2\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - user.dir: C:\Users\cweber\test\klv-client-win32.x86_64-1.0.1.2
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - user.home: C:\Users\cweber
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - isTest: false
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - repository URL: file:///Users/cweber/test/repository
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - version: 1.0.1.2
14:23:11.394 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - check for updates...
14:23:11.394 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:11.394 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Initializing P2 auto-update process
14:23:11.394 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:11.395 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Provisioning agent created
14:23:11.402 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Provisioning session created
14:23:11.402 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:11.402 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Processing updates
14:23:11.402 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:11.695 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Metadata repository loaded: file:///Users/cweber/test/repository
14:23:14.027 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Artifact repository loaded: file:///Users/cweber/test/repository
14:23:14.512 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Update operation resolved successfully
14:23:14.512 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Updates found:
14:23:14.513 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   -  - Update klv-feature.feature.group 1.0.1.2 ==> klv-feature.feature.group 1.0.2.3
14:23:14.513 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:14.513 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Process installs
14:23:14.513 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:14.516 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - IUs to install (possibly 283):
14:23:14.517 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Nothing found to install
14:23:14.520 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:14.521 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - Auto-update processing complete. Return restart flag: false
14:23:14.521 [      main] [INFO ] c.e.k.service.KLVUpdateManagerLogger   - ----------------------------------------------------------------
14:23:14.812 [      main] [INFO ] c.e.k.ui.LifeCycleManager              - no update necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions