Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/apps-engine/src/server/AppManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ interface IPurgeAppConfigOpts {
}

export class AppManager {

public static Instance: AppManager;

// apps contains all of the Apps
Expand Down Expand Up @@ -633,7 +634,17 @@ export class AppManager {
// If an error occurs during this, oh well.
});

await this.installApp(app, user);
const installed = await this.installApp(app, user);

if (!installed) {
console.error(`App installation failed for ${app.getID()}. Skipping initialization.`);
const storageItem = app.getStorageItem();
storageItem.status = AppStatus.ERROR_DISABLED;
await this.appMetadataStorage.updateStatus(storageItem._id, AppStatus.ERROR_DISABLED);
aff.setStorageError('App installation failed and was disabled.');
return aff;
}


// Should enable === true, then we go through the entire start up process
// Otherwise, we only initialize it.
Expand Down