-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
[pigeon] ArgumentError when using a Map with enum keys #93464
Comments
Reproducible using sample provided by OP above. /cc @gaaclarke flutter doctor -v[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-arm, locale en-GB)
• Flutter version 2.5.3 at /Users/nexus/dev/sdks/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (4 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/nexus/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.0, Build version 13A233
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.28.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 11.6 20G165 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69
• No issues found! [✓] Flutter (Channel master, 2.6.0-12.0.pre.688, on macOS 11.6 20G165 darwin-arm, locale en-GB)
• Flutter version 2.6.0-12.0.pre.688 at /Users/nexus/dev/sdks/flutters
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f7053eb8ba (8 hours ago), 2021-11-10 21:31:32 -0500
• Engine revision d5cadd28b0
• Dart version 2.15.0 (build 2.15.0-285.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/nexus/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.28.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 11.6 20G165 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69
• No issues found! |
Based on flutter/packages#527, it looks like there were two issues here:
So, closing this issue — it's partly been fixed, and what's left is now a duplicate of #133728. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
YourEnum
YourObject
with aMap<YourEnum?,String?>
fieldYourObject
as inputYourObject
, fill the map field and call your methodYou can also check this repository with a sample app:
test/pigeon_test.dart
Expected results: I expected to use a Map with enum as key
Actual results: The Map can't be encoded
Code sample
Pigeon API definition:
API use:
A working sample is available in this repository.
Logs
Flutter Analyze:
The text was updated successfully, but these errors were encountered: