-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Android RN 0.75.3, app crashes when returning to the previous screen #2341
Comments
I have the same issue. |
same issue here |
@tamacroft @hosseinmd @DinhHoangNgoc
|
@DorianMazur It works well, thank you for the help. |
FYI: For some reason, in my project this patch is not always working 🤷
|
@DorianMazur I also put it and it worked but with a bottomtabnavigation, when switching between tabs it gives the error No view found for id 0x6fe for fragment ScreentStackFragment |
@mrenann If you add I already opened an issue for this error with the BottomTab. |
@DorianMazur your solution work but doesn't work in all situation, in my app some page still crashing when going back. |
Does anyone have a complete solution? |
It worked for me
|
I don't think this is a good solution because this problem can be encountered in many scenarios. For example, when using dynamic content in the Drawer of react-native-drawer-layout. |
its still happening |
i commented entire of
|
What architecture is that? Are you all using Fabric or is that Paper? |
Fabric and disable bridgeless. |
I believe it's a duplicate of #2282 and should be resolved by #2307 As a workaround for now you can try setting the removeClippedSubviews option in the FlatList to false or applying the patch pasted by @DorianMazur. If the problem persists please attach a minimal reproduction. |
Is it possible to have an option to disable transition? |
#2307 this is not fixed for all situations. I had to remove transition. |
@hosseinmd Could you attach a minimal reproduction? |
Sorry, it is not happening in a regular app. I don't know what is the exact problem, but when I remove transition, it work. |
Ok let's reopen it. Some reproduction snack would be necessary to find out what's broken though. 🙏 |
I reproduced the issue with latest version 4.0.0-beta.3 |
…#2383) ## Description This PR intents to fix crash happening on Android (fabric) when navigating back from a screen with nested list. ### Before The crash happens whenever the nested list is visible on the screen, as shown below: | ✅ | ❌ | ❌ | ❌ | ✅ | |----------|----------|----------|----------|----------| | <img width="247" alt="Screenshot 2024-10-03 at 16 12 16" src="https://github.com/user-attachments/assets/55f36653-9451-48a1-b4fc-9d419622fe2b"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 25" src="https://github.com/user-attachments/assets/5cc1af46-4418-40de-9391-6dc5168e08af"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 34" src="https://github.com/user-attachments/assets/d2ec614a-fbeb-4717-8aeb-328e3a890cd6"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 40" src="https://github.com/user-attachments/assets/5d634fbd-45c9-4612-9dcf-25cf8b9295a0"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 47" src="https://github.com/user-attachments/assets/0881dd80-ff98-4ba2-992e-933d549eed19"> | ### After https://github.com/user-attachments/assets/fb36d030-ef53-493d-a8cc-38be670ee504 Nested lists are rendered as ViewGroups, thus the check for ReactScrollView fails. This PR fixes the issue by checking wether the view is an indirect child of a ScrollView with [removeClippedSubviews](https://reactnative.dev/docs/optimizing-flatlist-configuration#removeclippedsubviews) enabled. Fixes: software-mansion#2341 ## Changes - added `isInsideScrollViewWithRemoveClippedSubviews` check to `startTransitionRecursive` - modified `Test2282.tsx` repro <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce - use `Test2282.tsx` repro ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
@alduzy still not fixed. |
Happens not only when navigating back for me, but also TO screens. I'm on 4.0.0-beta.9. |
@spyshower @WKampel Under what circumstances does it fail, can you attach a reproduction? |
@alduzy 2 lists in the same screen, one of them being horizontal, it crashes.
|
@alduzy Will the fix be back ported to v3 also, or is upgrade to v4 required? |
@spyshower Thanks for the repro, as you pointed out, the horizontal lists aren't handled properly. #2383 fixes it. |
@alduzy not really, I am on |
@joarkosberg We're going to backport it to v3 after we release a stable v4. |
@spyshower You're right, the current change only considers nested horizontal lists. Thanks for noticing it! |
@alduzy Thank you kind sir! |
@alduzy I know this is closed but I have noticed an issue with animating a nested list using |
@spyshower It's hard for me to tell given the information provided. Please open a new issue with some in-depth description and a reproduction code. |
Latest beta works fine w. RN 0.75.5 |
This PR intents to fix crash happening on Android (fabric) when navigating back from a screen with nested list. The crash happens whenever the nested list is visible on the screen, as shown below: | ✅ | ❌ | ❌ | ❌ | ✅ | |----------|----------|----------|----------|----------| | <img width="247" alt="Screenshot 2024-10-03 at 16 12 16" src="https://github.com/user-attachments/assets/55f36653-9451-48a1-b4fc-9d419622fe2b"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 25" src="https://github.com/user-attachments/assets/5cc1af46-4418-40de-9391-6dc5168e08af"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 34" src="https://github.com/user-attachments/assets/d2ec614a-fbeb-4717-8aeb-328e3a890cd6"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 40" src="https://github.com/user-attachments/assets/5d634fbd-45c9-4612-9dcf-25cf8b9295a0"> | <img width="247" alt="Screenshot 2024-10-03 at 16 12 47" src="https://github.com/user-attachments/assets/0881dd80-ff98-4ba2-992e-933d549eed19"> | https://github.com/user-attachments/assets/fb36d030-ef53-493d-a8cc-38be670ee504 Nested lists are rendered as ViewGroups, thus the check for ReactScrollView fails. This PR fixes the issue by checking wether the view is an indirect child of a ScrollView with [removeClippedSubviews](https://reactnative.dev/docs/optimizing-flatlist-configuration#removeclippedsubviews) enabled. Fixes: #2341 - added `isInsideScrollViewWithRemoveClippedSubviews` check to `startTransitionRecursive` - modified `Test2282.tsx` repro <!-- Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. --> - use `Test2282.tsx` repro - [x] Included code example that can be used to test this change - [x] Ensured that CI passes (cherry picked from commit b67af86)
## Description This PR handles yet another case for going back on fabric. In the previous one (#2383) I omitted a case where a horizontal list is simply rendered w/o being nested in any other list! Fixes #2341 ## Changes - updated `Test2292.tsx` repro - handle `parentView is ReactHorizontalScrollView` <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce - use `Test2282.tsx` repro ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes (cherry picked from commit d40e108)
I'm using react native 0.76 with fabric. Here is my observation
|
This error still exists when using |
I just found this PR which has been solved. |
Description
When I return to the previous screen, the app crashes. I am using version RN 0.75.3. I have tested with other RN versions, and this issue occurs from version RN 0.75 onwards.
7006066363014550704.mp4
Steps to reproduce
app crashes when returning to the previous screen
Snack or a link to a repository
https://github.com/Ngoca1k15PT/AppNew
Screens version
3.34.0
React Native version
0.75.3
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
None
Build type
Debug mode
Device
Real device
Device model
Xiaomi
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: