-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2024-09-16] [$250] Account Settings- App freezes after sending a log file #47509
Comments
Triggered auto assignment to @strepanier03 ( |
We think that this bug might be related to #wave-collect RELEASE 1 |
@strepanier03 FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2023-10-02T10:00:00Z. ProposalPlease re-state the problem that we are trying to solve in this issue.Step to reproduce the issue (aside from OP's step)
What is the root cause of that problem?We are trying to add log to Onyx in here, but the The problem is that at first, the We can explain the non-stop error message log by following: Since the request is thrown in a promise chain without a proper catch, it will bubble up to the
OnyxKeys.Log field contains File -type data in the cache, and Onyx is trying to set the merged data (including the File data in the indexedDB storage -> causing it the serializable issue as described in the screenshot above)., and the error will bubble back to the ErrorBoundary -> infinite circle.
Extra note: Theoretically, we also encounter this issue while persisting What changes do you think we should make in order to solve the problem?We should try to // in @libs/Middleware/Logging.ts
function serializeValue(value: any): string {
const seen = new WeakSet();
function serialize(item: any): any {
// Handle primitive types
if (item === undefined || item === null) return item
if (typeof item === "number" || typeof item === "boolean") return item
if (typeof item === "string") return item
// Handle special objects
if (item instanceof Date) return item;
if (item instanceof RegExp) return item;
// Handle arrays
if (Array.isArray(item)) {
if (seen.has(item)) return "\"[Circular]\"";
seen.add(item);
const serializedArray = item.map(serialize);
seen.delete(item);
return serializedArray;
}
// Handle objects
if (typeof item === "object") {
if (seen.has(item)) return "\"[Circular]\"";
seen.add(item);
const entries = Object.fromEntries(Object.entries(item).map(([key, val]) => [key, serialize(val)]));
seen.delete(item);
return entries;
}
// Handle functions and other non-serializable types
const type = item.constructor.name || Object.prototype.toString.call(item).slice(8, -1);
return `"[Not serializable: ${type}]"`;
}
return serialize(value);
}
function logRequestDetails(message: string, request: Request, response?: Response | void) {
....
const extraData: Record<string, unknown> = {};
/**
* We don't want to log the request and response data for AuthenticatePusher
* requests because they contain sensitive information.
*/
if (request.command !== 'AuthenticatePusher') {
extraData.request = {
...request,
data: request.data,
}
extraData.response = response;
}
Log.info(message, false, logParams, false, extraData);
} What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~016f26106fe45b6825 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox ( |
@dominictb proposal LGTM. After enabling client-side logging, every request/response will be stored. However, since IndexedDB on the browser use Therefore, we can proceed with this proposal. Note: The 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @suneox 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Not sure why this was put in #wave-collect, moving it to #newdot-quality as it's related to a troubleshooting feature. |
This issue has not been updated in over 15 days. @puneetlath, @strepanier03, @suneox, @dominictb eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@strepanier03 PR hit production on Sep 9 #48664 (comment). Should be ready for payment now. |
Bugzero Checklist
|
@strepanier03 The checklist is completed, and we can proceed with the payment. |
@puneetlath Since this is awaiting payment. Can you remove the |
Done that for you, @dominictb. |
@puneetlath, @strepanier03, @suneox, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@strepanier03 looks like this is awaiting payment from you. |
Both contracts paid and closed with feedback left. I was OoO for a bit and this came due during that time, then the Hold status had it hidden from me and I missed it. Thank you for the bumps. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.20-6
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/4859439
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The user should be moved to the report and logs should be sent as an attachment.
The app is stable and functional to return to the previous screen or access the user's profile.
Actual Result:
The user is moved to the report and logs are sent as an attachment.
The back button and the user's profile function become unresponsive. The app sometimes crashes after a few minutes.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Log_1508.txt
Bug6573040_1723736646284.Sending_log_file.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: