-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
iOS - Profile - The App crashes when saving the user's avatar #37963
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
We think that this bug might be related to #vip-vsb |
Triggered auto assignment to @madmax330 ( |
@kbecciv Can you share the crash logs here? |
@shubham1206agra Please attached |
not able to reproduce on dev |
this appears to be related to this crash, which was first caught on 1.4.47-10. So I'm not sure if it's a blocker (but it was my mistake not noticing this earlier this week, I had been looking only at Android crashes by mistake) |
was able to reproduce on staging. I wonder if it has to be an HEIC? |
need to test on a physical device... |
I reproduced in iOS Simulator. |
I wonder if this can be fixed by removing deprecated |
cool, was able to reproduce on a release build. Going to try nixing |
I am very stuck on trying to fix this, mostly because it's very difficult to debug or even get logs in a release build, which seems to be the only place where this is reproducible. |
#36019 is already on production. Have we verified that this is not reproducible on prod? |
Requested retest: https://expensify.slack.com/archives/C9YU7BX5M/p1709996985170449 |
Noodling about in #38018, but I'm not confident that I'm any closer to a fix |
Ok, this was reproduced in prod, so not a deploy blocker. But it's very bad, maybe a fire |
Bug is reproduced in production too. avatar.update.mp4 |
I confirmed that commenting out this line prevents the crash. This doesn't really tell us much, other than that the crash doesn't appear to be happening inside |
ok, so I confirmed that the crash happens after this point. I tried just removing the Onyx data from |
ok, commented out So next up I need to figure out where the actual image upload code is and try to narrow down what's going wrong. |
I found a random article which does this to upload a file:
note the |
Hey @roryabraham hope this can help, I can see the JS log. You need to run the scheme "New Expensify" form xcode. |
|
I'm not sure. I think it's the file upload that's failing? |
I tried adding a line here like |
I can confirm revert |
Going to proceed with a revert due to the severity of the bug. I'd like to CP the revert to staging so we can fix prod ASAP |
reopening to verify the fix in 1.4.49-4 |
ok so as I said here, app still crashes on launch for the users who already triggered crash on avatar upload in previous build. |
yeah, that's unfortunate but I don't think there's anything we can do about it really |
well, maybe if we found a "restorative" fix to the crash rather than a "preventative" fix, but idk if we'll be able to do that since it seems to be a low-level crash in the native network request code, presumably caused by some bad url or something? |
verified this is fixed after you uninstall and reinstall |
Hey, I've investigated this issue today. The reason behind it was that we were passing the App/src/libs/actions/PersonalDetails.ts Line 385 in 95a774e
The Why did we pass the Commenting out this line fixes the problem. So I come up with two solutions (without touching the library):
const {base64, ...fileWithoutBase64} = file;
const parameters: UpdateUserAvatarParams = {file: fileWithoutBase64}; I will also contact with the internal expo maintainers at SWM, as they might want to fix it in the library. I will prepare a PR with the fix tomorrow. Thanks @roryabraham for the initial investigation, as it helped a lot! |
sounds good @kosmydel and thanks for figuring that out. Glad my initial investigation was helpful! If we're not using the base64 encoding I imagine it's likely better not to generate it unnecessarily. So let's go with the 2nd solution to remove the Alternatively, maybe we can update expo-image-manipulator to remove |
I've contacted an Expo maintainer, so I will keep you updated. For now, I think to unblock the issue, I can prepare a PR with the 2nd solution. |
Quick update: After contacting Expo maintainers they told me, that this is expected, and consistent across other parameters. They will improve the types, so the For now, I've created a PR with 2nd solution. |
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: 1.4.49-0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4410248
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Photo was successfully saved as the user's avatar.
Actual Result:
App crashes after user taps on "Save" button
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6406847_1709896582377.iOS-crash-Avatar.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: