Skip to content

Commit

Permalink
Merge pull request #8685 from weseek/fix/unable-to-login-using-cypress
Browse files Browse the repository at this point in the history
fix: Automatic installation failure
  • Loading branch information
miya committed Apr 5, 2024
2 parents 8d0bd84 + c801a5d commit 0c49cfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/app/src/server/crowi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ Crowi.prototype.init = async function() {
this.setupExternalUserGroupSyncService(),
]);

await this.autoInstall();

await normalizeData();
};

Expand Down Expand Up @@ -414,7 +412,7 @@ Crowi.prototype.setupMailer = async function() {
}
};

Crowi.prototype.autoInstall = function() {
Crowi.prototype.autoInstall = async function() {
const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
const username = this.configManager.getConfig('crowi', 'autoInstall:adminUsername');

Expand All @@ -438,7 +436,7 @@ Crowi.prototype.autoInstall = function() {
const installerService = new InstallerService(this);

try {
installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
await installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
allowGuestMode,
serverDate,
});
Expand Down Expand Up @@ -485,6 +483,8 @@ Crowi.prototype.start = async function() {
instantiateYjsConnectionManager(this.socketIoService.io);
this.socketIoService.setupYjsConnection();

await this.autoInstall();

// listen
const serverListening = httpServer.listen(this.port, () => {
logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);
Expand Down

0 comments on commit 0c49cfb

Please sign in to comment.