René's URL Explorer Experiment


Title: fix(android): withdraw a frame's pending navigation when the frame is torn down by edusperoni · Pull Request #11649 · NativeScript/NativeScript · GitHub

Open Graph Title: fix(android): withdraw a frame's pending navigation when the frame is torn down by edusperoni · Pull Request #11649 · NativeScript/NativeScript

X Title: fix(android): withdraw a frame's pending navigation when the frame is torn down by edusperoni · Pull Request #11649 · NativeScript/NativeScript

Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/DevelopmentWorkflow.md#unit-testing. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/tools/notes/WritingUnitTests.md. Draft: needs more testing before review (see "Not covered yet"). What is the current behavior? On Android, when a Frame is removed from the view tree after it has started a navigation (forward or back) but before the fragment manager has run that navigation's transaction, the app crashes on the next fragment manager pass: java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment fragment26[1] at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:567) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2052) For example, a nested frame navigated and removed in the same tick, or a modal holding a frame that is closed as soon as it is shown (common with Angular, where closing the dialog destroys the component and removes the frame). The transaction is committed asynchronously (commitAllowingStateLoss) into a container that is the frame's own native view, and teardown leaves it pending. What is the new behavior? A frame torn down mid-navigation withdraws that navigation instead of leaving it pending: Frame navigation transactions are committed with setReorderingAllowed(true). When the frame's native view is disposed while its executing navigation's transaction is still pending, it commits a reordering-allowed transaction that removes the new fragment and adds the current page's fragment back (the pending replace would otherwise remove it). AndroidX (1.8.5: removeRedundantOperationsAndExecute / executeOpsTogether) runs both records in one batch, so the new fragment is cleaned up as "never attached": it is never created, its container is never looked up, and the current fragment stays where it was. The navigation stays at the head of the frame's queue. Nothing is shown and no navigatedTo fires while the frame is gone; if the frame is added again it replays the navigation with its events and re-enters the frame stack. When the frame's activity is being destroyed, the existing _tearDownPending handling is unchanged. What is tested New FRAME tests (Android), each asserting first that the navigation's transaction is still pending; all four crash on main: test_nested_frame_removed_before_its_first_page_is_shown: the page is never created or loaded and no navigatedTo fires. test_nested_frame_removed_before_its_first_page_is_shown_navigates_when_added_again: re-added, the frame navigates to that page and is Frame.topmost(). test_nested_frame_removed_while_going_back_goes_back_when_added_again: re-added, the frame ends on its first page with an empty queue. test_frame_in_modal_removed_before_its_first_page_is_shown: a modal closed in shownModally with its frame removed. Full automated suite on an Android 15 (API 35) emulator: 1700 OK, 0 failed, including TRANSITIONS and the *_WithTransition navigation tests. Not covered yet Reordering now applies to every frame navigation transaction. Records of different frames that land in the same fragment manager pass are executed together, which AndroidX documents can reorder lifecycle callbacks within that batch. The automated suite runs mostly without animated navigation. Don't Keep Activities, API < 33, reusable frames (native view preserved), re-adding into a different parent, and a forward navigation withdrawn over an existing current page have not been exercised. A non-reordering asynchronous transaction committed by other code on the same manager between the navigation and its withdrawal would split the batch and bring the crash back. Core itself only commits asynchronously from Frame.

Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11649

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:12619688-88b3-79f9-e272-059d37921232
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id86A4:10DACD:159A420:1CA4609:6B013044
html-safe-nonce666dfd82e0f9406f5b20f231ee3c276cefd2807fd80ca2aac86e1488afcea2d5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkE0OjEwREFDRDoxNTlBNDIwOjFDQTQ2MDk6NkIwMTMwNDQiLCJ2aXNpdG9yX2lkIjoiMzIwNDQ1NDIwMTAwNzI2ODUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac271c27ec92d265fbdb5c6616fb42bb33803269b3ad8a65869c00f281b7028dab
hovercard-subject-tagpull_request:5382324019
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/11649/files
twitter:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
og:image:altPR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/pull/11649/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11649%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11649%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/pull/11649/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11649/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11649/files
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
edusperonihttps://github.com/edusperoni
mainhttps://github.com/NativeScript/NativeScript/tree/main
fix/android-frame-teardown-pending-transactionhttps://github.com/NativeScript/NativeScript/tree/fix/android-frame-teardown-pending-transaction
Conversation 2 https://github.com/NativeScript/NativeScript/pull/11649
Commits 2 https://github.com/NativeScript/NativeScript/pull/11649/commits
Checks 9 https://github.com/NativeScript/NativeScript/pull/11649/checks
Files changed 2 https://github.com/NativeScript/NativeScript/pull/11649/files
fix(android): withdraw a frame's pending navigation when the frame is torn down https://github.com/NativeScript/NativeScript/pull/11649/files#top
Show all changes 2 commits https://github.com/NativeScript/NativeScript/pull/11649/files
f63764b fix(android): run a frame's pending fragment transaction before its v… edusperoni Nov 18, 2026 https://github.com/NativeScript/NativeScript/pull/11649/commits/f63764b3389b4ef2f0d3be8f4f5f4957cd1acf6c
87f482a fix(android): withdraw a frame's pending navigation when the frame is… edusperoni Nov 18, 2026 https://github.com/NativeScript/NativeScript/pull/11649/commits/87f482ae84d195c1eeeb041c18f30fe19d0c0da1
Clear filters https://github.com/NativeScript/NativeScript/pull/11649/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11649/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11649/files
frame-tests.android.ts https://github.com/NativeScript/NativeScript/pull/11649/files#diff-61443bc99cd1c5d92d6ddeeb91b393e328e5b0cadf6ee27b24887dde825df2d4
index.android.ts https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
apps/automated/src/ui/frame/frame-tests.android.tshttps://github.com/NativeScript/NativeScript/pull/11649/files#diff-61443bc99cd1c5d92d6ddeeb91b393e328e5b0cadf6ee27b24887dde825df2d4
View file https://github.com/NativeScript/NativeScript/blob/87f482ae84d195c1eeeb041c18f30fe19d0c0da1/apps/automated/src/ui/frame/frame-tests.android.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11649/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-61443bc99cd1c5d92d6ddeeb91b393e328e5b0cadf6ee27b24887dde825df2d4
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-61443bc99cd1c5d92d6ddeeb91b393e328e5b0cadf6ee27b24887dde825df2d4
packages/core/ui/frame/index.android.tshttps://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
View file https://github.com/NativeScript/NativeScript/blob/87f482ae84d195c1eeeb041c18f30fe19d0c0da1/packages/core/ui/frame/index.android.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11649/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
https://github.com/NativeScript/NativeScript/pull/11649/files#diff-aac2c6e11b65a628114bb7df638ed7e629e2cbe6d160c2172f37b2a7a9ef3e69
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11649/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.