Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.9k forks source link

[HybridApp] iOS InternalShadowView crash #49841

Closed Julesssss closed 1 month ago

Julesssss commented 1 month ago

Problem

We are rolling out HybridApp and iOS is currently at 1%, jumping to 5/10% over the weekend. A new crash is occurring, seemingly in OldDot experience. This could be problematic, even if for now reports are mostly older devices.

- Multiple OSs: iOS 16/17
- Many devices: iPhone 15 Pro/iPhone SE 2nd gen/iPhone 11 

StackTrace

Crashed: com.apple.main-thread
0  Expensify                      0x152d34 UIShadowView.InternalShadowView.draw(_:) + 54 (UIShadowView.swift:54)
1  Expensify                      0x152d80 @objc UIShadowView.InternalShadowView.draw(_:) + 4302171520 (<compiler-generated>:4302171520)
2  UIKitCore                      0xc2270 <redacted> + 508
3  FullStory                      0xdeaac bcmap_addDelta(std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, long long) + 59332
4  FullStory                      0xd0fa4 bcmap_addDelta(std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, long long) + 3260
5  FullStory                      0xde88c bcmap_addDelta(std::__1::vector<unsigned short, std::__1::allocator<unsigned short>>&, long long) + 58788
6  FullStory                      0xe33f4 PopulateInclusiveFramesForLayer(id<FSShared>, CALayer*) + 17676
7  libdispatch.dylib              0x3dd4 <redacted> + 20
8  libdispatch.dylib              0x1339c <redacted> + 92
9  libdispatch.dylib              0x3dd4 <redacted> + 20
10 libdispatch.dylib              0x125a4 <redacted> + 988
11 libdispatch.dylib              0x121b8 _dispatch_main_queue_callback_4CF + 44
12 CoreFoundation                 0x56710 <redacted> + 16
13 CoreFoundation                 0x53914 <redacted> + 1996
14 CoreFoundation                 0x52cd8 CFRunLoopRunSpecific + 608
15 GraphicsServices               0x11a8 GSEventRunModal + 164
16 UIKitCore                      0x40aae8 <redacted> + 888
17 UIKitCore                      0x4bed98 UIApplicationMain + 340
18 Expensify                      0x416cc main + 16 (main.swift:16)
19 ???                            0x1adb9b154 (Missing)    

Logs com.expensify.expensifylite_issue_754e3902437176e57ff794418fe4f3fb_crash_session_a44bd6907de04c90b2c4279be7235af0_DNE_0_v2.log

Solution

Investigate 🕵️

Julesssss commented 1 month ago

Looking at the logs and code,my first guess is that it occurs when assigning a newly taken receipt to a report. Next step is to attempt to reproduce on iOS. I'm currently unable to reproduce though.

Screenshot_20240927-110840

melvin-bot[bot] commented 1 month ago

@Julesssss Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Julesssss commented 1 month ago

Sharing an initial slack comment from @staszekscp who was also unable to reproduce

Julesssss commented 1 month ago

I'm not seeing a rise in reports as we rollout. Looking good.

Julesssss commented 1 month ago

This is still occuring but only about ~5 crashes per day. Ignoring for now.

Julesssss commented 1 month ago

Looked into this and Firebase reports have increased. Though it's a small number relative to the number of users... I suggest we leave this open as a first pick and wait until contributors have access to the Mobile repo.

Julesssss commented 1 month ago

Lets close. This is linked to in firebase, so we can re-open later when this is a high priority crash.