App
                                
                                
                                
                                    App copied to clipboard
                            
                            
                            
                        [$1000] IOS - App freezes when user uploaded messages and image while offline
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Open the App
 - Log in with any account
 - Disable the internet connection in the device
 - Navigate to a chat write something in the compose box
 - Add attachment to a chat while there is text content in the composer
 - Enable the internet connection
 
Expected Result:
After uploading a photo and writing a message, the conversation should scroll when user back online
Actual Result:
App freezes when user uploaded messages and image while offline
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android / native
 - [ ] Android / Chrome
 - [x] iOS / native
 - [ ] iOS / Safari
 - [ ] MacOS / Chrome / Safari
 - [ ] MacOS / Desktop
 
Version Number: 1.2.90.4
Reproducible in staging?: Yes
Reproducible in production?: yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/228068017-d479bb58-212b-43af-8553-979b9235d77a.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01907c5dc79c397c99
 - Upwork Job ID: 1640583066029977600
 - Last Price Increase: 2023-03-28
 
Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Bug0 Triage Checklist (Main S/O)
- [x] This "bug" occurs on a supported platform (ensure 
Platformsin OP are β ) - [x] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
 
 - [x] This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
 - If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
 
 - [x] This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
 
 - [x] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
 
Reproduced this on iPhone 13.
Job added to Upwork: https://www.upwork.com/jobs/~01907c5dc79c397c99
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)
Triggered auto assignment to @danieldoglas (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
I can take it :)
π£ @koko57 You have been assigned to this job by @mountiny! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
Not overdue!
is this bounty available?
@danieldoglas, @eVoloshchak, @koko57, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick!
I cannot recreate this issue on v1.2.92-2
@kbecciv can you please retest?
I was able to reproduce this on v1.2.94-3 from the AppStore
@eVoloshchak yeah I updated the app and tested once again - it is reproducible indeed. I will investigate the issue. What's more it happens also when you don't turn off the internet connection.
Investigating the issue
Still investigating - I cannot reproduce it locally on a device but I've noticed that in the app from the AppStore the keyboard is dismissed and I guess that this may be causing the issue.
@danieldoglas @eVoloshchak @koko57 @kadiealexander this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@danieldoglas @eVoloshchak @koko57 @kadiealexander this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@koko57, I was able to reproduce this even without turning on the internet back again. It's also not reproducible when there is no text in the composer, so you might be right about the keyboard causing this.
https://user-images.githubusercontent.com/9059945/230888274-2ba8c1c1-6282-4913-8e72-ad488a99d2bb.MP4
Thanks @eVoloshchak π I need to add some changes to my PR for other issue, I'll be investigating the keyboard behaviour right after
Still investigating. Strangely this.updateComment('') in prepareCommentAndResetComposer() in ReportActionCompose fixes the issue - keyboard is not dismissed, the screen is responsive and scrollable, the input is focused but the text sent with the attachment is not cleared.
@danieldoglas @eVoloshchak @koko57 @kadiealexander this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
@koko57 how are we in this issue?
@danieldoglas Still working on the proposal. I've found a workaround that fixes the issue - wrapping this.updateComment('') (in prepareCommentAndResetComposer() in ReportActionCompose) in InteractionManager.runAfterInteractions. I've also found out that it happens only when the Composer is multiline - when this prop is removed the issue doesn't occur.
I'd thought that it's a keyboard/KeyboardAvoidingView issue but I've finally found out the real culprit - RCTModalHostViewController is not unmounting and overlaps the screen making it unresponsive (but the attachments are loading correctly) - there are several issues related to the RN modal bug, several from the Expensify/App repo https://github.com/Expensify/App/issues/14848, https://github.com/Expensify/App/issues/7768, https://github.com/Expensify/App/issues/2719, the others from RN https://github.com/facebook/react-native/issues/32329, https://github.com/react-native-modal/react-native-modal/issues/484, https://github.com/react-native-modal/react-native-modal/issues/534. Although some of them are closed the issue with modal dismisal seems to still be waiting for a better solution
@koko57 do you think we can work on an upstream fix for this?
@danieldoglas Would be ideal, but it seems to be a tough one. I'm still investigating what can be done here. Regarding the issue - for now the only working workaround solution (not ideal though) is InteractionManager.runAfterInteractions / setTimeout like in the previous issues.
@danieldoglas As I dug deeper into this persisting RCTModalHostViewController issue I've found a hint that may finally lead me to finding the real cause of this issue. It probably won't require any change in RN. I need to test it thoroughly and hopefully tomorrow I'll be able to tell if it's working.