Skip to content
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(flow-react): avoid Flow-React portal outlet removal conflicts #20770

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

Conversation

platosha
Copy link
Contributor

Some routing cases in hybrid Flow layout + React view applications could produce DOM tree conflicts from Flow server-side changes and React client-side portal removal happening simultaneously. This could throw DOM NotFoundError in the browser. This change introduces a dedicated DOM element for React portal outlet, which allows to avoid the error.

Fixes vaadin/hilla#3002

Some routing cases in hybrid Flow layout + React view applications could produce DOM tree conflicts from Flow server-side changes and React client-side portal removal happening simultaneously. This could throw DOM `NotFoundError` in the browser. This change introduces a dedicated DOM element for React portal outlet, which allows to avoid the error.

Fixes vaadin/hilla#3002
Copy link

github-actions bot commented Dec 20, 2024

Test Results

  890 files   - 269    890 suites   - 269   1h 4m 34s ⏱️ - 29m 52s
7 275 tests  - 304  6 800 ✅  -   723  48 💤  -  8  43 ❌ +43  384 🔥 +384 
7 291 runs   - 642  6 826 ✅  - 1 042  31 💤  - 34  43 ❌ +43  391 🔥 +391 

For more details on these failures and errors, see this check.

Results for commit 6ee4e01. ± Comparison against base commit 09439d3.

This pull request removes 304 tests.
com.vaadin.flow.custom.CustomRouteIT ‑ CustomRegistry_hasExpectedErrorHandlers[any_Chrome_]
com.vaadin.flow.custom.CustomRouteIT ‑ testCustomErrorView[any_Chrome_]
com.vaadin.flow.misc.ui.CompressedResourceIT ‑ compressedResourcesAreServedCompressed[any_Firefox_]
com.vaadin.flow.misc.ui.ExceptionLoggingIT ‑ productionModeExceptionViaExternalJsShouldLogException[any_Chrome_]
com.vaadin.flow.misc.ui.ExceptionLoggingIT ‑ productionModeExceptionViaServerJsShouldLogException[any_Chrome_]
com.vaadin.flow.misc.ui.JavascriptServedAsUtf8IT ‑ loadJavascriptWithUtf8[any_Chrome_]
com.vaadin.flow.misc.ui.MiscelaneousIT ‑ handlesIncorrectIconProperly[any_Chrome_]
com.vaadin.flow.misc.ui.MiscelaneousIT ‑ should_loadThemedComponent_fromLocal[any_Chrome_]
com.vaadin.flow.misc.ui.NpmThemedComponentIT ‑ importedClientSideComponentIsThemed[any_Chrome_]
com.vaadin.flow.misc.ui.PreserveOnRefreshCloseUIsIT ‑ preserveOnRefreshUiClosed_weakReferenceCleanedAfterGC[any_Chrome_]
…

♻️ This comment has been updated with latest results.

@platosha platosha marked this pull request as ready for review December 20, 2024 15:46
Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still doesn't happen when manually running, but if I have the server open and run the hillaViewInFlowLayout test from vaadin-platform-react-hybrid-test it always fails with

Unexpected Application Error!
Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at removeChildFromContainer (http://localhost:8080/VAADIN/@fs/C:/Users/.../platform/vaadin-platform-react-hybrid-test/node_modules/.vite/deps/chunk-UJKGNB4G.js?v=3c974d7f:8509:23)
    ```

@vaadin-bot vaadin-bot added +1.0.0 and removed +0.0.1 labels Dec 23, 2024
@Lodin Lodin requested a review from caalador December 23, 2024 12:14
@vaadin-bot vaadin-bot added +0.0.1 and removed +1.0.0 labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigating between Views cause application Error
4 participants