Hello, we have been having this issue for a while where we have android users who experience upload failures.
This happens on random devices using android 8 to 11. It doesn't occur in iOS.
We track these events (e.g. upload failures) on MixPanel and in this case, we hooked it up on the catch block of the upload.
The problem is we are getting undefined error.data on this particular case, which doesn't really gives us any useful info for debugging. We also can't reproduce this issue as well.
// this will send off all photos that are not yet uploaded to react-native-background-upload in parallel, then await
// all of them
const promises = Object.entries(photos)
.reduce((acc, [room, roomPhotos]) => ([...acc, ...roomPhotos.map((photo) => ({
room,
photo
}))]), [])
.filter(({
photo
}) => !uploaded[photo.uri])
.map(({
room,
photo
}) => dispatch(uploadPhoto(saved[room], photo, total, picProgress, count)));
try {
await Promise.all(promises);
} catch (e) {
// one of the uploads failed, do not complete
trackEventsViaSegment('Upload Failed', 'Upload', config.APP_VERSION, {
Reason: `${JSON.stringify(e)}; data: ${String(e.data).substring(0, 200)}`,
Type: workflowType,
Category: category
});
return;
}
Hello, we have been having this issue for a while where we have android users who experience upload failures. This happens on random devices using android 8 to 11. It doesn't occur in iOS.
We track these events (e.g. upload failures) on MixPanel and in this case, we hooked it up on the catch block of the upload. The problem is we are getting undefined error.data on this particular case, which doesn't really gives us any useful info for debugging. We also can't reproduce this issue as well.
Dependencies:
Can somebody please point me to the right direction? Thank you!