Skip to content

Commit

Permalink
SUKU Resize observer error supressed, firmware required version updat…
Browse files Browse the repository at this point in the history
…ed, protocol version updated
  • Loading branch information
SukuWc committed Apr 24, 2024
1 parent 2443f7f commit 4f4a064
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
4 changes: 2 additions & 2 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"USB_PID_2": "0x8123",
"FIRMWARE_GRID_D51_REQUIRED_MAJOR": 1,
"FIRMWARE_GRID_D51_REQUIRED_MINOR": 2,
"FIRMWARE_GRID_D51_REQUIRED_PATCH": 31,
"FIRMWARE_GRID_D51_REQUIRED_PATCH": 36,
"FIRMWARE_GRID_ESP32_REQUIRED_MAJOR": 1,
"FIRMWARE_GRID_ESP32_REQUIRED_MINOR": 2,
"FIRMWARE_GRID_ESP32_REQUIRED_PATCH": 32,
"FIRMWARE_GRID_ESP32_REQUIRED_PATCH": 36,
"FIRMWARE_GRID_URL_BEGINING": "https://github.com/intechstudio/grid-fw/releases/latest/download/",
"FIRMWARE_GRID_URL_END": "/grid_release.zip",
"FIRMWARE_KNOT_URL_BEGINING": "https://github.com/intechstudio/knot/releases/latest/download/",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"firebase": "^9.18.0",
"fs-extra": "^10.0.0",
"googleapis": "^100.0.0",
"grid-protocol": "^1.2.35",
"grid-protocol": "^1.2.36",
"is-online": "^10.0.0",
"lua-format": "1.4.1",
"luaparse": "^0.3.0",
Expand Down
46 changes: 37 additions & 9 deletions src/renderer/main/ErrorConsole.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@
});
}
logtext = [
...logtext,
{
reason: generateErrorDisplayText(errorMessage, url, line),
solution: solution,
},
];
Analytics.track({
event: "ErrorConsole",
payload: {
message: generateErrorDisplayText(errorMessage, url, line),
},
mandatory: true,
});
}
function generateErrorDisplayText(errorMessage, url, line) {
let displaytext = "";
if (url !== undefined && line !== undefined) {
Expand All @@ -62,27 +80,37 @@
displaytext = errorMessage + " ";
}
logtext = [...logtext, { reason: displaytext, solution: solution }];
Analytics.track({
event: "ErrorConsole",
payload: {
message: displaytext,
},
mandatory: true,
});
return displaytext;
}
onMount(async () => {
// check for errors
window.onerror = function myErrorHandler(errorMsg, url, lineNumber) {
// Supress unhandled but not harmful errors
if (errorMsg.startsWith("ResizeObserver loop completed")) {
console.warn("Supressed notification: ", errorMsg);
Analytics.track({
event: "ErrorConsole",
payload: {
message: generateErrorDisplayText(
"Supressed: " + errorMsg,
url,
lineNumber
),
},
mandatory: true,
});
return;
}
displayError(errorMsg, url, lineNumber);
return false;
};
window.onunhandledrejection = (e) => {
console.log("we got exception, but the app has crashed 2", e);
displayError(e.reason);
};
Expand Down

0 comments on commit 4f4a064

Please sign in to comment.