MixinNetwork / MixinNetwork/flutter-plugins
Error sending live update: WindowChannelException(CHANNEL_UNREGISTERED, Channel "subwindow_channel" not accessible (may be unregistered, bidirectional pair, or permission denied))
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 512
- Forks
- 292
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 7
Description
I am unable to send an invokeMethod over a channel.
Whenever I try, the error from the title shows up.
I've ran this in a new project, this being the only dependency I use.
I have a button that runst he following code:
Future<void> _openOrUpdateSubWindow() async {
setState(() {
_counter++;
});
final payload = 'Patient Data Update #$_counter';
final activeWindows = await WindowController.getAll();
for (final controller in activeWindows) {
final args = controller.arguments as String? ?? '';
if (args.startsWith('subwindow')) {
await controller.show();
try {
await _channel.invokeMethod('updateData', payload);
} catch (e) {
debugPrint('Error sending live update: $e');
}
return;
}
}
final controller = await WindowController.create(
WindowConfiguration(
hiddenAtLaunch: false,
arguments: 'subwindow:$payload',
),
);
await controller.show();
}
It just doesn't update, and I get the debugPrint every single time.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported flow in a new project using _openOrUpdateSubWindow, WindowController.getAll/create, show, and _channel.invokeMethod('updateData'). Trace how the subwindow_channel is registered and how the updateData handler is connected; done means the existing subwindow receives the payload without CHANNEL_UNREGISTERED.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100