From fb236e434ca04582a255a851a76be96859d66123 Mon Sep 17 00:00:00 2001 From: NeoPlays <80448387+NeoPlays@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:18:43 +0200 Subject: [PATCH 1/2] FIX: beaconcha button directing to validator page --- .../components/UI/staking-page/components/list/rows/KeyRow.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/components/UI/staking-page/components/list/rows/KeyRow.vue b/launcher/src/components/UI/staking-page/components/list/rows/KeyRow.vue index e3c7dc6a0..0e1b89af2 100644 --- a/launcher/src/components/UI/staking-page/components/list/rows/KeyRow.vue +++ b/launcher/src/components/UI/staking-page/components/list/rows/KeyRow.vue @@ -309,7 +309,7 @@ const navToBeaconcha = (network) => { holesky: "https://holesky.beaconcha.in/", }; - const url = urls[network]; + const url = urls[network] + "validator/" + props.item.key; if (url) { window.open(url, "_blank"); } else { From 9ac9ac38f3d8008beb01ac3ed2fe80e4bf96fe5e Mon Sep 17 00:00:00 2001 From: NeoPlays <80448387+NeoPlays@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:18:55 +0200 Subject: [PATCH 2/2] FIX: Valdiator Exit Process --- launcher/src/backend/Monitoring.js | 6 ++++-- launcher/src/backend/ValidatorAccountManager.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/launcher/src/backend/Monitoring.js b/launcher/src/backend/Monitoring.js index 6537528bc..cf4ecc44d 100755 --- a/launcher/src/backend/Monitoring.js +++ b/launcher/src/backend/Monitoring.js @@ -3166,7 +3166,7 @@ rm -rf diskoutput } try { - const beaconAPIPort = beaconStatus.data[0].beacon.destinationPort; + const beaconAPIPort = beaconStatus.data[0].beacon.servicePort; const serviceId = beaconStatus.data[0].sid; if (!Array.isArray(pubkey)) { pubkey = [pubkey]; @@ -3177,7 +3177,7 @@ rm -rf diskoutput if (!output.includes("{") || !output.includes("}")) { return { pubkey: pubkey, - code: null, + code: /20[0-8] OK/.test(output) ? 200 : null, msg: output, }; } @@ -3223,6 +3223,8 @@ rm -rf diskoutput if (SSHService.checkExecError(runExitCommand) && runExitCommand.stderr) { throw new Error(SSHService.extractExecError(runExitCommand)); } + if (!runExitCommand.stdout) + throw `ReturnCode: ${runExitCommand.rc}\nStderr: ${runExitCommand.stderr}\nStdout: ${runExitCommand.stdout}\nIs Your Consensus Client Running?`; const response = parseRunExitCommandOutput(runExitCommand.stdout, pubkey); diff --git a/launcher/src/backend/ValidatorAccountManager.js b/launcher/src/backend/ValidatorAccountManager.js index a799ff926..9d5dbbf0f 100755 --- a/launcher/src/backend/ValidatorAccountManager.js +++ b/launcher/src/backend/ValidatorAccountManager.js @@ -225,6 +225,9 @@ export class ValidatorAccountManager { //Error handling if (SSHService.checkExecError(result) && result.stderr) throw SSHService.extractExecError(result); + if (!result.stdout) + throw `ReturnCode: ${result.rc}\nStderr: ${result.stderr}\nStdout: ${result.stdout}\nIs Your Consensus Client Running?`; + const data = JSON.parse(result.stdout); if (data.data === undefined) { if (data.code === undefined || data.message === undefined) { @@ -703,7 +706,18 @@ export class ValidatorAccountManager { this.nodeConnection.taskManager.otherTasksHandler(ref, `Get Remote Keys`, true, result.stdout); + //Error handling + if (SSHService.checkExecError(result) && result.stderr) throw SSHService.extractExecError(result); + if (!result.stdout) + throw `ReturnCode: ${result.rc}\nStderr: ${result.stderr}\nStdout: ${result.stdout}\nIs Your Consensus Client Running?`; + const data = JSON.parse(result.stdout); + if (data.data === undefined) { + if (data.code === undefined || data.message === undefined) { + throw "Undexpected Error: " + result; + } + throw data.code + " " + data.message; + } if (!data.data) data.data = []; this.nodeConnection.taskManager.otherTasksHandler(ref);