Skip to content

[fix] uncaught null when jet view destroyed mid-render#53

Open
kullias wants to merge 1 commit into
2.2from
fix/WS-3499
Open

[fix] uncaught null when jet view destroyed mid-render#53
kullias wants to merge 1 commit into
2.2from
fix/WS-3499

Conversation

@kullias

@kullias kullias commented Jul 17, 2026

Copy link
Copy Markdown
Member

the issue: at runtime, query and other jet-based widgets throw unhandled promise rejected(null) errors with no stack trace. not fatal, but unnecessarily litter the error log

the cause - promise rejection with null in render when during render the app was destroyed
this may happen during navigation and destruction of views, but it's hard to reproduce when you want it just by interacting with the UI

the minimalist reproduction of the issue: https://snippet.webix.com/kaxhdkk7

  • rejection was replaced with resolving
  • the code that is dependent on resolving but must not run if the app was destroyed has checks for (this._container)
  • additional and debatable (not related to this issue, but added as potentially useful) - .catch() guards for ready and render() in ui()

the PR is into 2.2 since this seems to be the branch that is used to publish betas for the Jet widgets

- _render_final resolves quietly instead of Promise.reject(null) when
  the view/app or its slot widget is gone: a render that finishes after
  the view was destroyed (e.g. a jetapp widget destroyed during its
  initial fire-and-forget render, as with Webix Query) is now a no-op
- guard the this.ready chain and the top-level/refresh continuations so
  a benign NavigationBlocked neither leaks as an unhandled rejection nor
  permanently wedges the public ready chain, while real errors still throw
- swallow the benign rejection from the fire-and-forget this.ui() render
- add browser tests covering the refresh and widget.destructor() cases
@kullias
kullias requested a review from lVeliarl July 17, 2026 15:49
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.

1 participant