If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Creating separate ticket for #3867 (comment)
NetworkRequestQueue.saveRetryableRequests is only called in the if(isOffline) block
|
if (isOffline) { |
|
if (!networkRequestQueue.length) { |
|
return; |
|
} |
|
const retryableRequests = []; |
|
|
|
// If we have a request then we need to check if it can be persisted in case we close the tab while offline. |
|
// We filter persisted requests from the normal Queue to remove duplicates |
|
networkRequestQueue = _.reject(networkRequestQueue, (request) => { |
|
const shouldRetry = lodashGet(request, 'data.shouldRetry'); |
|
if (shouldRetry && request.data.persist) { |
|
// exclude functions as they cannot be persisted |
|
const requestToPersist = _.omit(request, val => _.isFunction(val)); |
|
retryableRequests.push(requestToPersist); |
|
return true; |
|
} |
|
}); |
|
if (retryableRequests.length) { |
|
NetworkRequestQueue.saveRetryableRequests(retryableRequests); |
|
} |
|
return; |
|
} |
Recent changes alleviate this to some extent - when a request is persisted to storage it will only be removed after it's successfully performed - it'll be retried until eventually succeeding
But it would only get to be persisted if you were offline to begin with
Action Performed:
- Try to send a large PDF file (Makes it easier to test)
- After sending, close the app
- Re-open the app and see that it was not uploaded
Expected Result:
Attachment would try to re-upload after the app was reopened
Actual Result:
Attachment stopped sending
Workaround:
Stay online while uploading, or start offline for the request to be persisted
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number:
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @kidroca
Slack conversation:
View all open jobs on GitHub
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Creating separate ticket for #3867 (comment)
NetworkRequestQueue.saveRetryableRequestsis only called in theif(isOffline)blockApp/src/libs/Network.js
Lines 185 to 206 in 425e718
Recent changes alleviate this to some extent - when a request is persisted to storage it will only be removed after it's successfully performed - it'll be retried until eventually succeeding
But it would only get to be persisted if you were offline to begin with
Action Performed:
Expected Result:
Attachment would try to re-upload after the app was reopened
Actual Result:
Attachment stopped sending
Workaround:
Stay online while uploading, or start offline for the request to be persisted
Platform:
Where is this issue occurring?
Version Number:
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @kidroca
Slack conversation:
View all open jobs on GitHub