Repository navigation
Description
Steps to reproduce
It's a good news that flutter support native multiple windows on desktop.
I've tried multiple_windows in examples, based on new main channel(2026-02-05), it works good on macos.
After I add some third party plugins, such as shared_preferences(2.5.4) or device_info_plus(12.3.0),there are some error while invoking method:
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.shared_preferences_foundation.LegacyUserDefaultsApi.getAll"., null, null)
I've checked 'macos/Flutter/GeneratedPluginRegistrant.swift', code was generated correctly:
import FlutterMacOS
import Foundation
import shared_preferences_foundation
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
}
It seems 'RegisterGeneratedPlugins' was not called, so plugin was not actual register.
Expected results
print device info correct.
Actual results
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method getDeviceInfo on channel dev.fluttercommunity.plus/device_info)
Code sample
Code sample
final deviceInfoPlugin = DeviceInfoPlugin();
final deviceInfo = await deviceInfoPlugin.deviceInfo;
final allInfo = deviceInfo.data;
print("get device info: ${allInfo}");Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel main, 3.42.0-1.0.pre-62, on macOS 15.4.1 24E263
darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version
35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Connected device (2 available)
! Error: Browsing on the local area network for iPhonexs. Ensure the device
is unlocked and attached with a cable or associated with the same local
area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources
• No issues found!
Activity
saurabh-mirajkar commentedon Feb 16, 2026
Hi @MrWait, Thanks for the report.
Kindly check #169977 (comment) for the solution.
Closing as it is duplicate issue.
Thank you.
stuartmorgan-g commentedon Feb 16, 2026
The steps here do not involve any dev dependencies, so it's not clear to me why this was marked as a duplicate. Re-opening for triage and investigation.
MrWait commentedon Feb 17, 2026
Right.
I pushed my code into this repo, please check:
https://github.com/MrWait/DemoMultiWindow
output:
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method getDeviceInfo on channel dev.fluttercommunity.plus/device_info) #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:364:7) <asynchronous suspension> #1 MethodChannelDeviceInfo.deviceInfo (package:device_info_plus_platform_interface/method_channel/method_channel_device_info.dart:20:8) <asynchronous suspension> #2 DeviceInfoPlugin.macOsInfo (package:device_info_plus/device_info_plus.dart:91:10) <asynchronous suspension> #3 _MultiWindowAppState.initState.<anonymous closure> (package:multiple_windows/main.dart:53:26) <asynchronous suspension>Code in macos/Runner/AppDelegate.swift was different with other examples, which maybe root cause.
saurabh-mirajkar commentedon Feb 17, 2026
@MrWait Thanks for sharing the Github repository. I'm unable to run the cloned project, however below are the observations :
Output of
flutter run -d macosGeneratedPluginRegistrant.swift
Flutter Doctor Output
Can you please try adding both
device_info_plus&shared_preferencesplugins under dev_dependencies instead of dependencies in my pubspec.yaml? Please check and confirm accordingly.MrWait commentedon Feb 17, 2026
Hi @saurabh-mirajkar, thanks for reply, seem you have some problem to run my code.
There is another way for You to reproduce:
That's what I did for all.
8 remaining items
flutter-triage-bot commentedon Aug 11, 2026
This issue is assigned to @knopp but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Oct 27, 2026
This issue was assigned to @knopp but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
cbracken commentedon Nov 5, 2026
/cc @knopp were you planning to pick this up?
/cc @mattkae
(triage)
[macOS] Register plugins in multiple_windows example (flutter#196068)