Open timvandermeij opened 3 months ago
Note to self, the following is useful for reproducing scripting-related intermittents locally:
1)
diff --git a/web/pdf_scripting_manager.js b/web/pdf_scripting_manager.js
index 63d08c604..68d1b8a21 100644
--- a/web/pdf_scripting_manager.js
+++ b/web/pdf_scripting_manager.js
@@ -177,6 +177,7 @@ class PDFScriptingManager {
return; // The document was closed while the properties resolved.
}
+ await new Promise(r => setTimeout(r, 2000));
await this.#scripting.createSandbox({
objects,
calculationOrder,
2)
diff --git a/src/pdf.sandbox.external.js b/src/pdf.sandbox.external.js
index 365d94a60..af646c29f 100644
--- a/src/pdf.sandbox.external.js
+++ b/src/pdf.sandbox.external.js
@@ -67,7 +67,7 @@ export class SandboxSupportBase {
}
try {
args = this.exportValueToSandbox(args);
- this.commFun(name, args);
+ this.win.setTimeout(this.commFun.bind(this, name, args), 1000);
} catch (e) {
this.win.console.error(e);
3) Run the tests in a random order.
For the FreeText Editor Update a freetext and scroll must check that a freetext is still there after having updated it and scroll the doc
failure we collected interesting findings in #18415. Note in particular https://github.com/mozilla/pdf.js/pull/18415#issuecomment-2218231011 and the failed run at http://54.193.163.58:8877/0507814a8df56c1/output.txt where the base64-encoded PNGs are correct. If we comment out https://github.com/mozilla/pdf.js/blob/master/test/integration/freetext_editor_spec.mjs#L3647 we can reproduce the empty PNG issue locally.
Despite having fixed the most occurring intermittent failures in the integration tests (see the closed issues with the
intermittent
label) we unfortunately still have a few of them left that trigger from time to time. We should list and fix them. This issue is a meta issue for this effort.The following intermittents have been found on the bots as of July 4th, 2024, which is after landing all previously identified improvements: