Open izarutskaya opened 1 week ago
Triggered auto assignment to @VictoriaExpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think this issue might be related to the #vip-vsb
I haven't had a chance to look at this, will come back to it on Monday
Error message reappears after sending another message
There is an error when uploading attachment:
This happens because we directly assigning the file
object (which contains non-clonable properties) to attachmentInfo
which we use on optimisticData
This cause an error because we cannot store non-cloneable properties on IndexedDB
This make the reportActions_ onyx data not stored on IndexedDB
https://github.com/Expensify/App/blob/4ae133db275f32b59592e40a54ef6727c8f4891e/src/libs/ReportUtils.ts#L3702
Change this code to const attachmentInfo = file ? {...file} : {};
by this changes we create a shallow copy of the file object. This shallow copy contains only the properties of the file object, excluding any non-clonable properties
RESULT
https://github.com/user-attachments/assets/b1a47159-fd25-4039-a8c4-1b7415f0f614
@VictoriaExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
Job added to Upwork: https://www.upwork.com/jobs/~0167c1b57ade6a9fb4
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External
)
I agree this is an issue and it should be fixed. Also agree that this is best suited to VSB
Thank you for your proposal @nyomanjyotisa . Can you expand on your RCA, why exactly having action data in failure data is causing this, I mean failure data is applied when request fails which is happening instantly when error is shown, then we are removing report action with error in https://github.com/expensify/app/blob/1f7c785753747a84b84c859cbdf4503447fc7bac/src/libs/actions/ReportActions.ts#L80
Moreover this piece of code was there for a long time and why now it is causing this?
Error messages re-appear
queuedOnyxUpdates
is not cleared if an error is thrown, this makes it stay in cache and apply again once we try to send a new message.
https://github.com/Expensify/App/blob/fef8ef8c30e69b1807c9ec958e744dbc37816597/src/libs/actions/QueuedOnyxUpdates.ts#L16-L20
We add a catch clause like
.catch(err => {
console.error(err);
queuedOnyxUpdates = [];
});
or
we check if the error is failed to execute 'put' on 'IDBObjectStore', then suppress the error, and splice only that, else throw again (a moderator with experience in the project can answer)
Result after changes: @alitoshmatov @VictoriaExpensify https://github.com/user-attachments/assets/975d864e-778a-42c9-be0d-80f03e7c7140
📣 @amunim! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: abdulmunim2005@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~016f42c0501a199670
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal updated @alitoshmatov
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@VictoriaExpensify, @alitoshmatov Eep! 4 days overdue now. Issues have feelings too...
@alitoshmatov - what are your thoughts on @nyomanjyotisa updated proposal?
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.4-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4693768 Email or phone of affected tester (no customers): vdargentotest+web070324@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The error message should not reappear.
Actual Result:
The error message reappears after sending another message.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/e2c8ced5-859b-43af-93d5-fb7991919527
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @alitoshmatov