@@ -621,7 +621,7 @@ async function executeRun(id: string) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
logger.log('info', `Error while running a recording with id: ${id} - ${error.message}`);
|
logger.log('info', `Error while running a robot with id: ${id} - ${error.message}`);
|
||||||
const run = await Run.findOne({ where: { runId: id } });
|
const run = await Run.findOne({ where: { runId: id } });
|
||||||
if (run) {
|
if (run) {
|
||||||
await run.update({
|
await run.update({
|
||||||
@@ -660,7 +660,7 @@ export async function handleRunRecording(id: string, userId: string) {
|
|||||||
|
|
||||||
socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId));
|
socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId));
|
||||||
|
|
||||||
logger.log('info', `Running recording: ${id}`);
|
logger.log('info', `Running Robot: ${id}`);
|
||||||
|
|
||||||
socket.on('disconnect', () => {
|
socket.on('disconnect', () => {
|
||||||
cleanupSocketListeners(socket, browserId, newRunId);
|
cleanupSocketListeners(socket, browserId, newRunId);
|
||||||
@@ -670,7 +670,7 @@ export async function handleRunRecording(id: string, userId: string) {
|
|||||||
return newRunId;
|
return newRunId;
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
logger.error('Error running recording:', error);
|
logger.error('Error running robot:', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,8 +243,8 @@ export class RemoteBrowser {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await this.client.send('Page.screencastFrameAck', { sessionId: sessionId });
|
await this.client.send('Page.screencastFrameAck', { sessionId: sessionId });
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
logger.log('error', e);
|
logger.log('error', `Screencast error: ${e}`);
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
@@ -278,7 +278,7 @@ export class RemoteBrowser {
|
|||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const { message } = e as Error;
|
const { message } = e as Error;
|
||||||
logger.log('error', message);
|
logger.log('error', `Screenshot error: ${message}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ router.get('/recordings', requireSignIn, async (req, res) => {
|
|||||||
const data = await Robot.findAll();
|
const data = await Robot.findAll();
|
||||||
return res.send(data);
|
return res.send(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.log('info', 'Error while reading recordings');
|
logger.log('info', 'Error while reading robots');
|
||||||
return res.send(null);
|
return res.send(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -55,7 +55,7 @@ router.get('/recordings/:id', requireSignIn, async (req, res) => {
|
|||||||
);
|
);
|
||||||
return res.send(data);
|
return res.send(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.log('info', 'Error while reading recordings');
|
logger.log('info', 'Error while reading robots');
|
||||||
return res.send(null);
|
return res.send(null);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -400,7 +400,7 @@ router.put('/runs/:id', requireSignIn, async (req: AuthenticatedRequest, res) =>
|
|||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const { message } = e as Error;
|
const { message } = e as Error;
|
||||||
logger.log('info', `Error while creating a run with recording id: ${req.params.id} - ${message}`);
|
logger.log('info', `Error while creating a run with robot id: ${req.params.id} - ${message}`);
|
||||||
return res.send('');
|
return res.send('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -518,7 +518,7 @@ router.post('/runs/run/:id', requireSignIn, async (req: AuthenticatedRequest, re
|
|||||||
finishedAt: new Date().toLocaleString(),
|
finishedAt: new Date().toLocaleString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
logger.log('info', `Error while running a recording with id: ${req.params.id} - ${message}`);
|
logger.log('info', `Error while running a robot with id: ${req.params.id} - ${message}`);
|
||||||
capture(
|
capture(
|
||||||
'maxun-oss-run-created-manual',
|
'maxun-oss-run-created-manual',
|
||||||
{
|
{
|
||||||
@@ -757,7 +757,7 @@ router.post('/runs/abort/:id', requireSignIn, async (req, res) => {
|
|||||||
return res.send(true);
|
return res.send(true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const { message } = e as Error;
|
const { message } = e as Error;
|
||||||
logger.log('info', `Error while running a recording with name: ${req.params.fileName}_${req.params.runId}.json`);
|
logger.log('info', `Error while running a robot with name: ${req.params.fileName}_${req.params.runId}.json`);
|
||||||
return res.send(false);
|
return res.send(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -171,7 +171,7 @@ async function executeRun(id: string) {
|
|||||||
processGoogleSheetUpdates();
|
processGoogleSheetUpdates();
|
||||||
return true;
|
return true;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
logger.log('info', `Error while running a recording with id: ${id} - ${error.message}`);
|
logger.log('info', `Error while running a robot with id: ${id} - ${error.message}`);
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
const run = await Run.findOne({ where: { runId: id } });
|
const run = await Run.findOne({ where: { runId: id } });
|
||||||
if (run) {
|
if (run) {
|
||||||
@@ -232,7 +232,7 @@ export async function handleRunRecording(id: string, userId: string) {
|
|||||||
|
|
||||||
socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId));
|
socket.on('ready-for-run', () => readyForRunHandler(browserId, newRunId));
|
||||||
|
|
||||||
logger.log('info', `Running recording: ${id}`);
|
logger.log('info', `Running robot: ${id}`);
|
||||||
|
|
||||||
socket.on('disconnect', () => {
|
socket.on('disconnect', () => {
|
||||||
cleanupSocketListeners(socket, browserId, newRunId);
|
cleanupSocketListeners(socket, browserId, newRunId);
|
||||||
|
|||||||
Reference in New Issue
Block a user