diff --git a/functions/src/__tests__/get-condition-emulator.test.js b/functions/src/__tests__/get-condition-emulator.test.js index 0e49529..d23172c 100644 --- a/functions/src/__tests__/get-condition-emulator.test.js +++ b/functions/src/__tests__/get-condition-emulator.test.js @@ -74,6 +74,8 @@ describe("getCondition", () => { it("should increment the error log for an experiment when errors are caught", async () => { const db = getFirestore(); + // Wait for any pending logError writes from previous tests to land before deleting + await waitForLog(db, "testexp", "logError", 1); await db.collection("logs").doc("testexp").delete(); await getCondition({ experimentID: "testexp" }); diff --git a/pages/faq.js b/pages/faq.js index 5d97698..cfb5ea1 100644 --- a/pages/faq.js +++ b/pages/faq.js @@ -182,6 +182,50 @@ export default function FAQ() { active only while you are collecting data. + + + Yes. DataPipe has a 32 MB limit on the size of a + single request. This limit is enforced by the server infrastructure + and cannot be increased. Most experiment data is well under this + limit — a typical jsPsych dataset is 50 KB to 5 MB. + + + If you are using version 0.6.0 or later of the{" "} + + @jspsych-contrib/plugin-pipe + {" "} + plugin, request bodies are automatically compressed with gzip before + sending. Text data (JSON, CSV) typically compresses by 2–10x, which + effectively raises the upload limit to roughly 60–300 MB for most + experiment data. Compression is enabled by default and requires no + configuration. + + + Compression is less effective for binary data sent via the base64 + endpoint (e.g., video or audio recordings), because binary data does + not compress as well as text. If you need to send individual files + larger than about 25 MB through the base64 endpoint, they may still + exceed the limit even after compression. + + + If you are sending data without the plugin (e.g., using fetch + directly), you can compress the request body yourself using the + browser's{" "} + + CompressionStream API + {" "} + and setting the Content-Encoding: gzip header. The + server will decompress the body automatically. + + When enabled, DataPipe assigns condition numbers sequentially.