René's URL Explorer Experiment


Title: fix(android): don't crash in Fragment.onCreateView on stale-fragment race by NathanWalker · Pull Request #11264 · NativeScript/NativeScript · GitHub

Open Graph Title: fix(android): don't crash in Fragment.onCreateView on stale-fragment race by NathanWalker · Pull Request #11264 · NativeScript/NativeScript

X Title: fix(android): don't crash in Fragment.onCreateView on stale-fragment race by NathanWalker · Pull Request #11264 · NativeScript/NativeScript

Description: onCreateView already returns null when its entry, resolvedPage, or frame is missing, but it first called Trace.error, which rethrows through the registered error handler across the JNI boundary and turns the recoverable case into a fatal "Calling js method onCreateView failed" crash. These nulls happen when the FragmentManager drives a stale fragment to CREATE_VIEW after NativeScript has already torn down the corresponding backstack entry (process death / activity recreation after rotation or theme change, clearHistory, or rapid navigate+goBack). The fragment should just be discarded, not crash the app. Replace those three Trace.error calls with Trace.write using Trace.messageType.error, and remove the Trace.isEnabled guards around those writes so the logs are always emitted while the existing return-null recovery path is still reached (consistent with existing onDestroy handling of the same race). Fixes production crashlytics reports: Fatal Exception: com.tns.NativeScriptException: Calling js method onCreateView failed Error: fragment0[0].onCreateView: entry has no resolvedPage at com.tns.Runtime.callJSMethodNative(Runtime.java) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1441) at com.tns.Runtime.callJSMethodImpl(Runtime.java:1327) at com.tns.Runtime.callJSMethod(Runtime.java:1314) at com.tns.Runtime.callJSMethod(Runtime.java:1291) at com.tns.Runtime.callJSMethod(Runtime.java:1287) at com.tns.FragmentClass.onCreateView(FragmentClass.java:55) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3119) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:577) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:286) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2214) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2109) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2052) at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:703) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7631) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

Open Graph Description: onCreateView already returns null when its entry, resolvedPage, or frame is missing, but it first called Trace.error, which rethrows through the registered error handler across the JNI boundary and...

X Description: onCreateView already returns null when its entry, resolvedPage, or frame is missing, but it first called Trace.error, which rethrows through the registered error handler across the JNI boundary and...

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

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:9299e17a-d8fd-0066-bc1d-800643f918e9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBB20:311640:17013C0:1D3F454:6B013A9C
html-safe-nonce9edc7dacc7ea9214d3309aa370e2f1591bd197fa0ded8ce6585dab1dbd75e60f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjIwOjMxMTY0MDoxNzAxM0MwOjFEM0Y0NTQ6NkIwMTNBOUMiLCJ2aXNpdG9yX2lkIjoiNzkxNDMzOTQ3MjI0NDgxNjU0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3bd2d92368ca546ff9b6862a1010af570de78b6720b51fd1361bad7a0aa36b8a
hovercard-subject-tagpull_request:3834955986
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/11264/files
twitter:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
og:image:altonCreateView already returns null when its entry, resolvedPage, or frame is missing, but it first called Trace.error, which rethrows through the registered error handler across the JNI boundary and...
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
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/11264/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11264%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%2F11264%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/11264/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11264/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11264/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
NathanWalkerhttps://github.com/NathanWalker
mainhttps://github.com/NativeScript/NativeScript/tree/main
fix/android-fragment-race-throwhttps://github.com/NativeScript/NativeScript/tree/fix/android-fragment-race-throw
Conversation 5 https://github.com/NativeScript/NativeScript/pull/11264
Commits 3 https://github.com/NativeScript/NativeScript/pull/11264/commits
Checks 3 https://github.com/NativeScript/NativeScript/pull/11264/checks
Files changed https://github.com/NativeScript/NativeScript/pull/11264/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11264/files
fix(android): don't crash in Fragment.onCreateView on stale-fragment race https://github.com/NativeScript/NativeScript/pull/11264/files#top
Show all changes 3 commits https://github.com/NativeScript/NativeScript/pull/11264/files
26d34e1 fix(android): don't crash in Fragment.onCreateView on stale-fragment … NathanWalker Jun 9, 2026 https://github.com/NativeScript/NativeScript/pull/11264/commits/26d34e136d844919f1bcd04ccdea2f5ea3d765ac
2b51674 fix(android): always log onCreateView stale fragment guards as errors Copilot Jun 17, 2026 https://github.com/NativeScript/NativeScript/pull/11264/commits/2b5167404282a899f90bd699b6eeedd58bf756d1
11902bc docs(android): clarify Trace.write error logging remains non-fatal Copilot Jun 17, 2026 https://github.com/NativeScript/NativeScript/pull/11264/commits/11902bc3f702449b5c01e02d9d6875980e900f5f
Clear filters https://github.com/NativeScript/NativeScript/pull/11264/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11264/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11264/files
packages/core/ui/frame/frame-helper-for-android.tshttps://github.com/NativeScript/NativeScript/pull/11264/files#diff-447142c198ba635b4ca3cf97f613384c1dae58462f16843a2decf6f45f759d37
View file https://github.com/NativeScript/NativeScript/blob/11902bc3f702449b5c01e02d9d6875980e900f5f/packages/core/ui/frame/frame-helper-for-android.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11264/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11264/files#diff-447142c198ba635b4ca3cf97f613384c1dae58462f16843a2decf6f45f759d37
https://github.com/NativeScript/NativeScript/pull/11264/files#diff-447142c198ba635b4ca3cf97f613384c1dae58462f16843a2decf6f45f759d37
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.