-
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
Remove setTimeout
usage in AttachmentPicker/index.native.js
#2719
Comments
@kidroca sorry for the delay here. (we've recently improved our process so new issues will get reviewed very quickly now) |
@mallenexpensify |
Thanks for the context @kidroca. I'm not an engineer so will loop one in here to review. |
Triggered auto assignment to @bondydaa ( |
Cool yep I agree we should not rely on a I think this could probably be worthwhile for an external contributor, I'm guessing @kidroca might have an idea of how to do this even? I'm not sure it needs to be a daily, weekly is probably good for now since the sooner we get it cleaned up the less likely we will need to put more |
I don't exactly have the time right now to manage external contributors so I'm not going to apply the external label but @mallenexpensify if you want to so we can get the job up on upwork go for it, i'll ask in engineering-chat as well. |
Hey, guys I just want to clarify, the |
External Job posted in Upwork - https://www.upwork.com/jobs/~012fc94068d907e4dd Invited @kidroca to the Upwork project to work on it as needed |
Sorry but there's some big misunderstanding here. There's nothing that can be done for this ticket ATM. And there's no bug that needs fixing - I was asked to open this task as a reminder to remove the
Currently it's not possible it will lead to a bug preventing image picking I don't see any way to address this right now. @Christinadobrzyn I can't accept the Upwork invite as I don't see a way to complete this task ATM |
Yeah, let's put this on HOLD until that library is updated. Good call. |
Ah sorry for the confusion! Thanks for clarifying! Removed the Upwork posting and added a HOLD label to this issue. |
setTimeout
usage in AttachmentPicker/index.native.jssetTimeout
usage in AttachmentPicker/index.native.js
@tgolen I've spent quite some time searching for a fix and trying different things and the only possible fix was Linking the original issue that dealt with |
I can try to dig deeper and trace this to the core, but it could take me days and I might still not be able to solve it |
Please refer to this post for updated information on the |
This issue has not been updated in over 15 days. @kidroca 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! |
This ticket is related as we also had to use The common things are:
Another interesting thing is it's somehow related to the Sidebar/Drawer. <Modal isVisible={true}>{/* some sample content */}</Modal> Adding code like this to the Sidebar would not render the modal (only setting |
Checked to see if any updates since last time we tried fixed the issue but they don't Starting a separate project to isolate a reproducible behavior and find out exactly what's causing this |
Before starting a separate project I've also tried upgrading the following libs and retesting, but the issue was still present: diff --git a/package.json b/package.json
@@ -51,10 +51,10 @@
"@react-native-firebase/perf": "^12.3.0",
"@react-native-masked-view/masked-view": "^0.2.4",
"@react-native-picker/picker": "^1.9.11",
- "@react-navigation/compat": "^5.3.15",
- "@react-navigation/drawer": "6.1.4",
- "@react-navigation/native": "6.0.2",
- "@react-navigation/stack": "6.0.7",
+ "@react-navigation/compat": "^5.3.20",
+ "@react-navigation/drawer": "^6.1.8",
+ "@react-navigation/native": "^6.0.6",
+ "@react-navigation/stack": "^6.0.11",
"babel-plugin-transform-remove-console": "^6.9.4",
"dotenv": "^8.2.0",
"electron-context-menu": "^2.3.0",
@@ -75,27 +75,27 @@
"react": "^17.0.2",
"react-collapse": "^5.1.0",
"react-dom": "^17.0.2",
- "react-native": "0.64.1",
+ "react-native": "0.66.1",
"react-native-bootsplash": "^3.2.0",
"react-native-collapsible": "^1.6.0",
"react-native-config": "^1.4.0",
- "react-native-document-picker": "^5.1.0",
- "react-native-gesture-handler": "1.9.0",
+ "react-native-document-picker": "^7.1.1",
+ "react-native-gesture-handler": "^1.10.3",
"react-native-google-places-autocomplete": "^2.4.1",
"react-native-image-pan-zoom": "^2.1.12",
- "react-native-image-picker": "^4.0.3",
+ "react-native-image-picker": "^4.1.2",
"react-native-keyboard-spacer": "^0.4.1",
- "react-native-modal": "^11.10.0",
+ "react-native-modal": "^13.0.0",
"react-native-onyx": "git+https://github.com/Expensify/react-native-onyx.git#6eadd7f73fca87e6551e43607ec78f645e17ef50",
"react-native-pdf": "^6.2.2",
"react-native-performance": "^2.0.0",
"react-native-permissions": "^3.0.1",
"react-native-picker-select": "8.0.4",
"react-native-plaid-link-sdk": "^7.1.0",
- "react-native-reanimated": "^2.3.0-alpha.1",
+ "react-native-reanimated": "^2.2.3",
"react-native-render-html": "6.0.0-beta.8",
- "react-native-safe-area-context": "^3.1.4",
- "react-native-screens": "^3.0.0",
+ "react-native-safe-area-context": "^3.3.2",
+ "react-native-screens": "^3.8.0",
"react-native-svg": "^12.1.0",
"react-native-unimodules": "^0.13.3",
"react-native-web": "0.15.7",
|
This is the issue reported on react-native-image-picker: react-native-image-picker/react-native-image-picker#1456 The important partsreact-native-image-picker/react-native-image-picker#1456 (comment)
react-native-image-picker/react-native-image-picker#1456 (comment)
react-native-image-picker/react-native-image-picker#1456 (comment)
The error we're getting in xCode when we select "Choose from gallery" or "Choose documents" is xCode logs when we press "Choose from gallery" button. (iOS 15.0.2 iPhone 11 Pro Physical Device)
xCode logs when we press "Choose document" button. (iOS 15.0.2 iPhone 11 Pro Physical Device)
From the error message it seems the View that the gallery/documents picker attaches to is the one of the Modal we've just closed. So far only 2 things have fixed the issue:
I'm working on recreating the issue in a minimal reproduction repository and link it to issues on:
|
Removing the [Hold] as it was decided to continue working on this here: https://expensify.slack.com/archives/C01GTK53T8Q/p1633990542157900 |
setTimeout
usage in AttachmentPicker/index.native.jssetTimeout
usage in AttachmentPicker/index.native.js
I've created a standalone repository where I've partially recreated the issue
standalone app showing the problemScreen.Recording.2021-10-27.at.15.42.24.movIt looks like There's a now closed ticket about |
Here's what works so far:
What didn't work
|
Thanks for your continued work on this. I am following along! 🍿 |
This issue has not been updated in over 15 days. @kidroca 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! |
There has been no development on the external tickets I've shared and I don't have definitive evidence that this is a problem with RN Modal and the I need to debug this through xCode in order to pause the debugger when |
@kidroca, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
1 similar comment
@kidroca, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
@kidroca, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
No updates on the library issues I've commented on and tracking |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Expected Result:
The Attachment Picker modal should work correctly without the need of
setTimeout
Actual Result:
setTimeout
is needed because on iOS the Gallery/Camera is immediately dismissed when the Attachment bottom docked modal closesDetails
This is a follow up on #2656 (comment)
It can potentially be resolved by updating the attachment related libraries handled in this ticket: #2531
Action Performed:
Workaround:
Added a brief timeout so that the Camera/Gallery is only opened a 1-2 frames after the Attachment Picker modal closes
Platform:
Where is this issue occurring?
Version Number: 1.0.38-1
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: