fix: a file the phone can no longer read says so in Portuguese and is picked again (DTF-WEB-2A)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m51s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 58s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m51s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 58s
Android Chrome threw NotReadableError reading a picked file (from Drive or Photos, after switching apps); the customer saw the browser's English text and "Tentar de novo", which reads the same dead file. The upload now says "não conseguimos ler este arquivo no aparelho. Escolha o arquivo de novo", the product page's button becomes "Escolher de novo" (the file leaves the list and the picker opens), and the cart summary shows no retry for it. upload_retry_test covers it and fails without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -177,4 +177,22 @@ const run = async (completeSteps, {abortAfter} = {}) => {
|
||||
assert.equal(requested[0].options.method, 'DELETE');
|
||||
}
|
||||
|
||||
// A file the phone can no longer read (Android NotReadableError, DTF-WEB-2A):
|
||||
// the customer is told in Portuguese to pick it again, and nothing is sent.
|
||||
{
|
||||
const RealBlob = globalThis.Blob;
|
||||
globalThis.Blob = class extends RealBlob {
|
||||
arrayBuffer() { return Promise.reject(new DOMException('The requested file could not be read', 'NotReadableError')); }
|
||||
};
|
||||
try {
|
||||
const {result, error, calls} = await run([{}]);
|
||||
assert.equal(result, undefined);
|
||||
assert.equal(error?.unreadable, true);
|
||||
assert.match(error.message, /Escolha o arquivo de novo/);
|
||||
assert.equal(calls.length, 0, 'nothing reaches the server');
|
||||
} finally {
|
||||
globalThis.Blob = RealBlob;
|
||||
}
|
||||
}
|
||||
|
||||
console.log('upload retry checks passed');
|
||||
|
||||
Reference in New Issue
Block a user