-
Notifications
You must be signed in to change notification settings - Fork 429
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
Scrapped or attached views may not be recycled. isScrap:false isAttached:true #173
Comments
I assume, this issue does not exist on 3.3.0, so as workaround you can use this version. I found some solutions here: https://code.briarproject.org/briar/briar/issues/1363 |
Hi @troZee :) I'm not sure if it's related but I was able to reproduce it with |
Hey, could you provide a reproducible code ? React navigation uses react native screen under the hood, so probably it is somehow related :D |
seeing this in our app as well on v4. will try and gather more information soon. cc @SRandazzo |
I have same problem in react-navigation v5 (native-stack) |
If you can manage navigation yourself then you can unmount the view pager before navigating. Unfortunately, it's not possible to do it like this always. Do you still need repro for that? |
Yes, please |
I think this bug is quite urgent. It happens when we have |
I also have this problem with |
same problem Android when user viewpager and creatweNativeStackNavigator |
I also have this issue with a new app on Android as well. I see it when I render a different set of screens inside a Anyone have a workaround? Edit: As others have said downgrading to 3.x does work, but was hoping someone figured it out on 4.x. 😄 |
Fix has been applied #271 |
Seems that the issue is still there when using v6.0.0-rc.0 with lazy page loading 😕 App crashes after navigating back or going forward from a screen with a
|
This issue also occurs using 5.4.0 with react navigation native stack 6.1.0, react native screens 3.5.0 and RN 0.64.2. Hope it helps find out. Tks |
Also happens to me (gorhom/react-native-bottom-sheet#427 (comment)) |
Is there some news about this ? I've temporary fix this by doing bad things : // setFixAndroidUnmount(true) instead of direct doing navigation.goBack()
const [fixAndroidUnmount, setFixAndroidUnmount] = useState(false);
useEffect(() => {
if (fixAndroidUnmount) {
setTimeout(() => navigation.goBack(), 100);
}
}, [fixAndroidUnmount, navigation]);
// ....
{!fixAndroidUnmount && <LazyPagerView />} |
androidx.recyclerview.widget.RecyclerView$Recycler.recycleViewHolderInternal
Most affected device : Redmi 9 Prime, Galaxy S7 Edge, Galaxy A50 |
same, needs fixing, right now as comment above mentioned, hackish workaround:
and
|
It happens for me on 6.0.0-rc but on 5.4.x. (not on lazy loading, regular). |
Still happening on RN 67, React navigation 6 when used in a view that then unmounts |
These methods do work, so anyone still having the issue try one of these. |
@ArturoTorresMartinez These methods do not work in our app, so it's not a universal solution :( |
Do you know when the error happens exactly? Seems to be when unmounting and the pagerview is on the active screen on your navigation stack. The real test is for you to remove the react-native-pager-view completely from the screens you're having issues at and if that solves the issue, the conditional rendering should do the same, just make sure you first update some state to not render the pager view and then, only then do your navigation/unmounting etc. |
@ArturoTorresMartinez Perhaps when users go back to the previous screen. I don't know why, but unmounting the pageview (by replacing it with null) does not work. |
This error happens when I use PagerView and on the same screen I allow the user to click on a button with "navigation.replace". If I use "navigation.navigate", it doesn't happen. This is urgent, I'm on version: ^6.0.0-rc.0 |
If removing the pager entirely from the screen doesn't resolve the issue perhaps the pager isn't the library causing it? If removing it entirely does fix the issue, then the condition for replacing it with a null object isn't triggering at the expected time. |
Does the conditional render workaround help in your scenario? |
maybe we need remove |
This still occurs on most recent next version? In the thruth, "removeAllViews" should fix it. See #516 |
Wow! Thank you for your work. I am not migrating to |
@yepMad Hi. I have tried
|
@troZee is it possible to add the fix also to next branch, we are using |
Second this. 6.0.0 has great performance when having a large amount of pages, but falls behind the main branch too much to be usable on Android :( |
* Update ReactNativePageView.m * chore: add docs for attaching onPageScroll handler with reanimated (callstack#491) * add docs for attaching handler with reanimated * feat: add reanimated onpagescroll example * feat: add reanimated onpagescroll example * chore(docs): fix typos (callstack#497) * fix(ios): Crash when rapidly switching pages callstack#510 * Release 5.4.10 * chore(deps): bump nanoid from 3.1.22 to 3.2.0 in /example (callstack#506) Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.22 to 3.2.0. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.1.22...3.2.0) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (callstack#513) Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3. - [Release notes](https://github.com/stevemao/trim-off-newlines/releases) - [Commits](stevemao/trim-off-newlines@v1.0.1...v1.0.3) --- updated-dependencies: - dependency-name: trim-off-newlines dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump tmpl from 1.0.4 to 1.0.5 in /example (callstack#452) Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5. - [Release notes](https://github.com/daaku/nodejs-tmpl/releases) - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5) --- updated-dependencies: - dependency-name: tmpl dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump tmpl from 1.0.4 to 1.0.5 (callstack#451) Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5. - [Release notes](https://github.com/daaku/nodejs-tmpl/releases) - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5) --- updated-dependencies: - dependency-name: tmpl dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump semver-regex from 3.1.2 to 3.1.3 (callstack#449) Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/sindresorhus/semver-regex/releases) - [Commits](https://github.com/sindresorhus/semver-regex/commits) --- updated-dependencies: - dependency-name: semver-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ios): wrong variable usage that causes crash related to callstack#458 (callstack#502) Introduced in callstack#455 this should have been `i` instead of `index` all along. * bump example * Release 5.4.11 * chore(deps): bump plist from 3.0.1 to 3.0.4 (callstack#525) Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.1 to 3.0.4. - [Release notes](https://github.com/TooTallNate/node-plist/releases) - [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md) - [Commits](https://github.com/TooTallNate/node-plist/commits) --- updated-dependencies: - dependency-name: plist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump plist from 3.0.2 to 3.0.4 in /example (callstack#526) Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.2 to 3.0.4. - [Release notes](https://github.com/TooTallNate/node-plist/releases) - [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md) - [Commits](https://github.com/TooTallNate/node-plist/commits) --- updated-dependencies: - dependency-name: plist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ios): rapid taps on the navigation tabs (callstack#529) * bump example * Release 5.4.12 * fix(android): initialPage for dynamic content * Release 5.4.13 * Revert "fix(ios): rapid taps on the navigation tabs (callstack#529)" This reverts commit 27e8003. * fix(ios): switching between the pages for rapid tabs * Release 5.4.14 * fix(ios): crash with `NSInternalInconsistencyException` on iOS (callstack#530) * Release 5.4.15 * chore(docs): fix PagerView import (callstack#533) * chore: fix android example * chore: add native stack navigator * fix lint * chore: update pods * fix(ios): set delaysContentTouches to YES (callstack#563) * Release 5.4.16 * fix(ios): NSInternalInconsistencyException crash (callstack#564) Added additional checks to scroll without animation if already an animation is in progress to fix `NSInternalInconsistencyException` crash in iOS * Release 5.4.17 * fix(android): scrapped or attached views may not be recycled callstack#173 (callstack#552) * Release 5.4.18 * fix(ios): disable pager scroll gesture on swipe to go back (callstack#500) * fix: disable pager scroll gesture on swipe to go back * fix: navigation controller nil * Release 5.4.19 * fix(ios): pager sometimes does not fill full height (callstack#565) Fixes callstack#523 Fixes callstack#543 See callstack#518 (comment) for more info. * Release 5.4.21 * fix(android): only remove child if it exists (callstack#560) * Release 5.4.22 * fix(ios): keyboard auto dismisses (callstack#567) Fixes callstack#566 * Release 5.4.23 * fix(ios): restore animated param check (callstack#569) * chore: bump example * Release 5.4.24 * fix(ios): incorrect pager height (callstack#580) Co-authored-by: Andrei Alecu <[email protected]> * Release 5.4.25 * fix(android): assign an id to host view (callstack#585) (callstack#587) Co-authored-by: Nishan <[email protected]> Co-authored-by: Vojtech Novak <[email protected]> Co-authored-by: doug-lessen <[email protected]> Co-authored-by: Piotr Trocki <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Danilo Bürger <[email protected]> Co-authored-by: Jan-Rixt Van Hoye <[email protected]> Co-authored-by: Rishat Shamsutdinov <[email protected]> Co-authored-by: Numan <[email protected]> Co-authored-by: Hirbod <[email protected]> Co-authored-by: Rupesh Chaudhari <[email protected]> Co-authored-by: lxp <[email protected]> Co-authored-by: Andrei Alecu <[email protected]> Co-authored-by: Levi W <[email protected]> Co-authored-by: mateusz-ramski <[email protected]> Co-authored-by: Andrei Alecu <[email protected]> Co-authored-by: Luis Fernandez <[email protected]>
This issue is closed and yet the crash still persists in the latest We mainly see it happening on older Android phones running Android 10 and 11. It's really hard to implement a workaround in our codebase so it would be great if we could get an official fix from the maintainers. |
Bug report
Summary
Environment info
react-native info
output:Library version: x.x.x
Steps to reproduce
2.Going back from OrganizationsList -> Home
The text was updated successfully, but these errors were encountered: