Skip to content

[fix] Handle missing _listenerController.abort when loading workflows #1134

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

Merged
merged 1 commit into from
Jul 19, 2025

Conversation

christian-byrne
Copy link
Contributor

Fixes #1130

Description

When loading workflows with promoted widgets, a TypeError occurs because _listenerController is not properly initialized on deserialized input slots.

Changes

  • Add proper type checking before calling abort() on _listenerController
  • Applied in 3 locations: #addSubgraphInputListeners, configure, and onRemoved

Testing

  • Load a workflow with promoted DOM widgets
  • Verify no TypeError occurs
  • Verify event listeners are still properly cleaned up when needed

…rkflows

- Add proper type checking before calling abort() on _listenerController
- Fixes TypeError when loading workflows with promoted widgets
- Input slots from deserialization don't have AbortController instances

Fixes #1130
Copy link
Contributor

@webfiltered webfiltered left a comment

Choose a reason for hiding this comment

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

What on earth is going on that causes abort to not be a function?

This should never be an issue. If this PR is fixing some symptom, the root cause should instead be found.

@christian-byrne
Copy link
Contributor Author

It's described in the linked issue (#1130).

@christian-byrne
Copy link
Contributor Author

Try loading this workflow on HEAD of litegraph.js master:

subgraph-with-promoted-text-widget.json

@webfiltered
Copy link
Contributor

But what is causing it? That is very clearly not how it is typed. So the PR is patching a symptom, but we'd still have completely invalid state. We'd just be ignoring it much more effectively.

Probably quite easy to trace with a breakpoint on uncaught.

@christian-byrne
Copy link
Contributor Author

Can you investigate?

@christian-byrne christian-byrne merged commit 7e41834 into master Jul 19, 2025
4 checks passed
@christian-byrne christian-byrne deleted the fix/abort-controller-workflow-load branch July 19, 2025 21:25
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.

[bug] TypeError when loading workflows with promoted widgets - _listenerController.abort not a function
2 participants