WIP: stable version

This commit is contained in:
Andrii Dokhniak 2025-09-29 17:18:59 +02:00
parent ccd9ccecbd
commit 7a2af14a33
3 changed files with 6 additions and 16 deletions

View File

@ -83,15 +83,11 @@ io.on("connection", (socket) => {
screenshots_in_flight++;
let screen;
try {
screen = await fetch(
"http://localhost:9987/v2/uiDevice/screenshot"
);
let body = await screen.bytes();
screen = (await get_screenshot()).buffer;
socket.emit("screenshot_data", body);
screen = await get_screenshot();
socket.emit("screenshot_data", screen);
} catch (err) {
console.error(
"Failed to get the screenshot from culebra, the emulator probably died",
"Failed to get the screenshot. The emulator probably died",
err
);
return;

View File

@ -1010,7 +1010,7 @@
"node_modules/har-analyzer": {
"name": "module-starter",
"version": "0.0.1",
"resolved": "git+ssh://git@hub.sealcode.org/diffusion/171/har-parser.git#a5b43f08ac2209ac959cfef9538449167fae4e8d",
"resolved": "git+ssh://git@hub.sealcode.org/diffusion/171/har-parser.git#ac4ead15060f0554407ac921f62a7bacd08cfb97",
"license": "ISC",
"dependencies": {
"@smithy/util-hex-encoding": "^4.0.0",

View File

@ -5,14 +5,8 @@ async function sleep(time) {
}
async function checkCertExistance() {
try {
return await Promise.all([
fs.access("./certificates/mitmproxy-ca-cert.pem"),
fs.access("./certificates/mitmproxy-ca.pem", fs.constants.R_OK),
]);
} catch (_) {
return false;
}
await fs.access("./certificates/mitmproxy-ca-cert.pem");
await fs.access("./certificates/mitmproxy-ca.pem", fs.constants.R_OK);
}
async function generateCert() {