-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: bump react-native-pager-view to 6.8.0 to resolve crash on android #66742
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
fix: bump react-native-pager-view to 6.8.0 to resolve crash on android #66742
Conversation
|
@parasharrajat Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
|
|
@rohit9625 Can you please clarify what was the error or issue that were you facing earlier? |
|
It wasn't consistent but when I first installed the app and tried to repro the issue, the app crashed even after upgrading to latest version. |
|
Can you please merge main @rohit9625 ? |
1 similar comment
|
Can you please merge main @rohit9625 ? |
|
Sure! |
|
I think some issue from the main. |
Screenshots🔲 iOS / native🔲 iOS / Safari🔲 MacOS / Desktop🔲 MacOS / Chrome23.07.2025_19.09.03_REC.mp4🔲 Android / Chrome🔲 Android / native23.07.2025_19.06.23_REC.mp4 |
|
@rohit9625 This ts error seems to be coming from this PR. Can you please fix that? Also add a summary of what changed between the versions to the PR description. |
Okay, I'll try to fix that by tomorrow :) |
|
Any update @rohit9625 |
|
Hi @parasharrajat, I'm sorry for replying late as I was sick yesterday. I looked at the changelogs and found that the support for
|
|
We need to solve this issue. Now what is best here to solve the main issue and not cause more. |
|
Well, I think downgrading the version can solve the crash as someone using version 6.3.0 with no crash. I tried but getting some build errors which will require library patch and it's also not quite a good approach. So, at best I think we should just debounce the back navigation until scrolling is finished. |
|
I think we are juggling between different things to try and run. Can you instead migrate the code for useNext? |
|
@rohit9625 Any update? We have already spent a considerable amount waiting on this. Do we have an action plan for this that works without doing hit and trial? Can you please share the results of the approaches you are suggesting before implementing? |
|
I'm sorry @parasharrajat but I couldn't find out a more viable solution than upgrading version. However, that too seems pretty unstable initially, maybe something wrong on my device. If upgrading version solves crash for you, then I will work on migrating |
|
No app didn't crashed on my app, it exited as it is supposed to do on back arrow press on Android when you are at the home screen. I think we should pursure migrating |
|
So this issue is still happening on main. Can you please provide an update on when you can complete this? If you are having a problem, please let us know so that we can reassign someone else. |
So, both of us can reproduce this issue on main, and you confirmed that PR fixes the crash on your end. I think something could be wrong with my PC, as on a fresh install after upgrading, I got a crash for one time only, and not after that. Anyways, I'm looking for the reason why we added One more thing, why did you test attachment carousel swiping, as in your screencasts? Did you notice any issues there after upgrading? |
|
I just tested on Android after removing Screencast.from.2025-08-03.20-08-23.webm |
|
Can you explain how the app is still working the same even after removing that? |
|
I don't know how and I didn't found the issue which added |
|
This is the issue. #45289 (comment) Can you please check it? |
|
Also, can you please share the supporting document from the migration notes on how useNext is migrated or why it was removed? PR, issue etc. Everything that can explain it. Please do share the links that I can follow. |
Thanks for the reference @parasharrajat. I saw the related commit, which solved the truncated image issue for iOS. However, that doesn't explain why we have Before that commit, we had |
Here's the PR that removed the scroll-view-based pager view implementation: This is the related issue that someone was able to solve using the |
|
Also, I couldn't find any migration-related notes as |
|
Thanks for all this. I will go through it. |
|
@rohit9625 Please merge main. I am looking into this now. |
|
Done 👍 @parasharrajat |
|
Ok. Let's remove the useNext prop and all related code used for it. @rohit9625 |
|
Let me know when this PR is ready. |
|
But I noticed that this PR does not completely solve the double-tap app-closing issue. It does not cause a crash anymore, but still, the app gets closed on double-tap on the create expense page, while if we do the same thing, it does not. So I consider this solution partial. |
|
That's exactly what I was saying that the app crashing and so the app closes when tapping back twice. If it wasn't crashing, then the app shouldn't closed on tapping twice. However, it happens for the first time on my case and works after that. |
|
So what do you suggest here? |
|
Currently, tab view is working like this:
The crash happens when the app unmounts create expense screen on second rapid back press, while the switching tab animation is going on. |
|
OK, I think this is something that needs to be discused on slack. Do you have access to Slack? |
|
Yes, I have access to Slack's external contributor's group. |
|
Can you please raise a slack thread about this? Explaining the problem, then solution you adopted and the blocker. Please tag me. |
Sure! I will create a descriptive thread today and tag you :) |
|
I created a thread here: https://expensify.slack.com/archives/C01GTK53T8Q/p1754498061089509 |
|
@rohit9625 We are not ready to change the tab behaviour. It is designed this way. Do you have any other solution? |
|
Okay, so what if we detect a quick double-back navigation press on Android and directly close the Create Expense screen? This way, older functionality will remain intact as the crash happens when the back press is too quick, and not if we press normally. So, we can implement this solution as a workaround until the upstream issue is fixed. |
|
Thanks for the suggestion, but I am not happy to move ahead with this workaround. At this point, I think we can reopen the issue for more proposals. |
|
Yep, I think you're right, we should reopen the issue for proposals, and can also increase the bounty, as this is not a simple issue. |
|
@rohit9625 let's close this PR. Thanks. |
|
Okay, done 👍 |


Explanation of Change
This PR updates the
react-native-pager-viewlibrary to version 6.8.0 to resolve crash on rapid back navigation on Android devices. It's was an upstream issue.Fixed Issues
$ #61581
PROPOSAL: #61581 (comment)
Tests
Offline tests
Same as test
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android_App.mp4
Android: mWeb Chrome
mWeb_Android.mp4
iOS: Native
iOS_App.mov
iOS: mWeb Safari
iOS_mWeb_Safari.mov
MacOS: Chrome / Safari
Mac_Safari.mov
MacOS: Desktop
Mac_Desktop.mov