← All changelog entries

Failed File Uploads No Longer Retry Forever

Fix Improvement

We fixed an issue where a file upload from the desktop recording client or the legacy mobile recorder could end up retrying every 1.5 seconds for as long as the page stayed open, without ever succeeding. It happened when an upload had to be retried after its file input had been reset or the recorder had been removed from the page: the retry was sent without the file, our upload servers answered it with a 404 status, and the recording client tried again.

The recording client now:

  • keeps the file you picked and reuses it for every retry;
  • stops and shows the error message when our servers reject an upload (any 4xx response other than 408 and 429), instead of retrying it. In the legacy mobile recorder you can then pick another file without reloading the page;
  • waits longer between retries after each failed attempt, from 1.5 seconds up to 30 seconds. This applies to uploads that fail with a network error, a 408 response, or a 5xx response other than 500. A rate limited upload (429) is not affected: it still waits for the time given in the Retry-After header;
  • retries an upload that makes no progress for 60 seconds while the file is being sent. Previously, a frozen connection left the upload stuck;
  • retries an upload that was answered by something other than our upload servers, such as a captive portal or a proxy page, instead of getting stuck;
  • cancels an upload, including a retry that is waiting to be sent, when its recorder is removed with remove();
  • retries an upload with its own recorder’s handlers on pages with several recorders. Previously, a retry could update the UI of a different recorder.
  • also handles non-JSON responses correctly.

Our upload servers now also answer an upload that has no file with 400 instead of 404, which makes older versions of the recording client stop retrying as well.

Build slug: bf915b66e

NPM version: 2.0.12