testosaurusdocs
Browse docs
On this page

Offline queue

Testo tangled in wires

Testers work in elevators, on trains, and behind corporate proxies. When the connection is gone or the request does not finish, the report is saved in the browser and sent later. The tester sees one calm line: Saved. It will send when you're back online. when the browser is offline, or Saved. We'll send it again shortly. when the browser is online but the request failed.

How it works

  • Offline reports skip the bot check: when the browser reports it is offline, the report is saved at once without asking Turnstile for a token. A fresh token is requested for each saved report when it is sent.
  • Text only: the message and the browser context are saved. Screenshot and replay uploads need a connection, so an offline report has no attachments, and when screenshot capture was allowed the report records that the screenshot could not be uploaded.
  • Storage: pending reports live in localStorage['testosaurus:pending']. If the browser blocks storage, nothing can be saved: the tester sees "Couldn't send this report right now. Your text is still here." and can try again.
  • Capacity: the queue holds at most 5 reports; the oldest is dropped when a 6th arrives. Bugs from this morning outrank a screenshot from last week.
  • Flush: the queue is sent when the browser comes back online, right after another report is delivered, and on the next page load, so a tester who returns the next day delivers everything on page load. When the browser is online and a flush leaves reports behind, or a live send was saved after a server error, the widget tries again about 45 seconds later, at most twice. Only one flush runs at a time, and a flush pauses while a tester is sending a report.
  • Timeouts: a report request that gets no answer within 30 seconds is saved for later instead of leaving the widget on "Sending…". The bot check asks once more after 20 seconds without an answer and gives up after the second try, or after two minutes once a challenge is showing to the tester. Screenshot uploads stop after 60 seconds and replay uploads after 120 seconds; the report then goes out without the attachment.
  • Retries keep their identity: each report gets a random clientSubmissionId when it is created and keeps it in the queue, so the server can recognize a retry of a report it already received.

What happens to a saved report

Server answerSaved reportWhat the tester sees when sending live
Browser offlineSaved without a token, sent when the connection returns"Saved. It will send when you're back online."
Network error, timeout, 408, 5xx while onlineKept and retried"Saved. We'll send it again shortly."
429 rate_limitedKept and retried"Too many reports - try again in a minute."
429 quota_exceeded, balance_exhausted, daily_limitDropped"Thanks — the report couldn’t be delivered right now."
403 verification_required or verification_failedKept for at most 3 attempts, then dropped"We couldn't verify this browser. Please try again."
400, 401, 404, 413, 422, 403 domain_mismatchDropped"Couldn't send this report right now. Your text is still here." (a bare link gets "Add a few words about what went wrong.")

Testers never see a raw server message. Developers do: every rejection is logged to the browser console as [testosaurus] report rejected with the status, the code and a hint, and every report dropped from the queue is logged as [testosaurus] queued report dropped. The widget's own messages are left out of reports.

A disallowed origin (403 domain_mismatch) is the most common rejection. Register every host a widget lives on under settings → install & domains → Allowed addresses.
Something unclear?Let us know