Skip to content

fix(core): Better handling for nested frames #10713

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Mar 1, 2025

PR Checklist

What is the current behavior?

Right now, core has inconsistencies with nested Frames when they get destroyed and reused.
This results in errors like the No view found for id exception users have been getting lately.
The problem is more apparent in flavors like Vue where the entire view tree is being reused after application exit and resume.

What is the new behavior?

This PR ensures Frame fragments are created and attached in the correct order to prevent errors.
The most important part is to process frame entry during loaded but before children (included nested frames) were loaded.

Partially Fixes/Implements/Closes #8126.

Copy link

nx-cloud bot commented May 11, 2025

View your CI Pipeline Execution ↗ for commit e1c2bb9.

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 35s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-20 19:26:57 UTC

@CatchABus CatchABus force-pushed the fix/android-no-view-for-id branch from a9d0902 to 67ce09a Compare May 11, 2025 19:22
@CatchABus CatchABus marked this pull request as ready for review May 17, 2025 19:58
@CatchABus
Copy link
Contributor Author

CatchABus commented May 17, 2025

@NathanWalker This should be good to go. Let me say that theoritically, this PR doesn't completely solve the problem because we have some setCurrent calls wrapped inside setTimeout and that can also mess the order of execution for frames.
Regardless, it should fix the suspend/resume problem mentioned in the issue.

UPDATED: This has actually got more room for improvements.

@CatchABus CatchABus marked this pull request as draft May 17, 2025 23:57
@CatchABus
Copy link
Contributor Author

It seems the problem goes a bit deeper so I'll keep this one as draft for just a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] App crash with "No view found for id"
1 participant