You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
【pigeon】Error: This project cannot run with sound null safety, because one or more project dependencies do not #70355
Unhandled exception:
IsolateSpawnException: Unable to spawn isolate: Error: This project cannot run with sound null safety, because one or more project dependencies do not
support null safety:
- package:pigeon
- package:args
Run 'pub outdated --mode=null-safety' to determine if versions of your
dependencies supporting null safety are available.
Instance of '_StringStackTrace'pub finished with exit code 255
Here is my pubspec.yaml:
dev_dependencies:
flutter_test:
sdk: flutter
# Pigeon is a code generator tool to make communication between Flutter and the host platform type-safe and easier.
pigeon: ^0.1.14
and flutter version
Flutter (Channel master, 1.24.0-8.0.pre.191
Flutter version 1.24.0-8.0.pre.191
Framework revision 281522bc87
Engine revision c5cbbb000f
Dart version 2.12.0 (build 2.12.0-31.0.dev)
----
Any suggestion is appreciation.
@gaaclarke
Looks like Isolate.spawnUri is spawning a null-safety isolate by default now. Pigeon supports generating null-safe code but itself hasn't been migrated to null-safety. I'll try to switch spawnUri otherwise I'll have to bite the bullet and migrate Pigeon.
This may have fixed running pigeon without flags, and possibly otherwise if your input file had a language annotation. The next version of pigeon will address moving the import. If anyone is running into this after 0.1.15 let me know, please.
flutter pub run pigeon --input pigeons/message.dart --dart_out lib/pigeon.dart --objc_header_out ios/Runner/pigeon.h --objc_source_out ios/Runner/pigeon.m --java_out ./android/app/src/main/java/dev/flutter/pigeon/Pigeon.java --java_package "dev.flutter.pigeon"
Unhandled exception:
IsolateSpawnException: Unable to spawn isolate: pigeons/message.dart: Error: A library can't opt out of null safety by default, when using sound null safety.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.24.0-8.0.pre.304, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Android Studio
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
[✓] VS Code (version 1.51.1)
[✓] Connected device (1 available)
Version 0.1.16 published with a fix. This is still a blindspot for Pigeon's CI unfortunately since it requires unstable versions of Dart. I think it will sort itself out once NNDB hits stable.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
pedromassangocode commentedon Nov 12, 2020
I will consider this as proposal since as far as I know Pigeon is not migrated to null-safety yet.
gaaclarke commentedon Nov 12, 2020
Looks like
Isolate.spawnUriis spawning a null-safety isolate by default now. Pigeon supports generating null-safe code but itself hasn't been migrated to null-safety. I'll try to switch spawnUri otherwise I'll have to bite the bullet and migrate Pigeon.gaaclarke commentedon Nov 19, 2020
This might still be broken. We ran into a problem elsewhere and it seems the language annotation is in the wrong spot: https://github.com/flutter/packages/blob/6cd84e20d974614dbd473f0e00b84b2655a9cc60/packages/pigeon/bin/pigeon.dart#L37
This may have fixed running pigeon without flags, and possibly otherwise if your input file had a language annotation. The next version of pigeon will address moving the import. If anyone is running into this after 0.1.15 let me know, please.
belinwu commentedon Nov 20, 2020
Still be broken on pigeon 0.1.15
flutter pub run pigeon --input pigeons/message.dart --dart_out lib/pigeon.dart --objc_header_out ios/Runner/pigeon.h --objc_source_out ios/Runner/pigeon.m --java_out ./android/app/src/main/java/dev/flutter/pigeon/Pigeon.java --java_package "dev.flutter.pigeon"
Unhandled exception:
IsolateSpawnException: Unable to spawn isolate: pigeons/message.dart: Error: A library can't opt out of null safety by default, when using sound null safety.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
For solutions, see https://dart.dev/go/unsound-null-safety
Instance of '_StringStackTrace'pub finished with exit code 255
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.24.0-8.0.pre.304, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Android Studio
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
[✓] VS Code (version 1.51.1)
[✓] Connected device (1 available)
mitchross commentedon Nov 23, 2020
Same as @belinwu
cc @gaaclarke
alr2413 commentedon Nov 25, 2020
i get the same exception message.
cc @gaaclarke
gaaclarke commentedon Nov 30, 2020
Version 0.1.16 published with a fix. This is still a blindspot for Pigeon's CI unfortunately since it requires unstable versions of Dart. I think it will sort itself out once NNDB hits stable.
github-actions commentedon Aug 9, 2021
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
flutter doctor -vand a minimal reproduction of the issue.