leanflutter / flutter_distributor

An all-in-one Flutter application packaging and distribution tool, providing you with a one-stop solution to meet various distribution needs.
https://distributor.leanflutter.dev/
MIT License
763 stars 104 forks source link

[msix]: type 'Null' is not a subtype of type 'FutureOr<String>' #182

Closed kjxbyz closed 1 month ago

kjxbyz commented 2 months ago
  1. The command was executed twice
  2. An error was reported during packaging
Run flutter_distributor package --platform windows --targets msix --artifact-name picguard.msix
$ flutter clean
Deleting .dart_tool...                                               1ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                                0ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         0ms
Packaging picguard 1.0.0+1 as msix:
$ C:\hostedtoolcache\windows\flutter\stable-3.19.6-x64\bin\flutter build windows --dart-define FLUTTER_BUILD_NAME=1.0.0 --dart-define FLUTTER_BUILD_NUMBER=1
Resolving dependencies...
  _fe_analyzer_shared 64.0.0 (68.0.0 available)
  analyzer 6.2.0 (6.5.0 available)
  archive 3.4.10 (3.5.0 available)
  args 2.4.2 (2.5.0 available)
  built_value 8.9.0 (8.9.2 available)
  csv 5.1.1 (6.0.0 available)
  dart_style 2.3.4 (2.3.6 available)
  ffi 2.1.0 (2.1.2 available)
  flutter_plugin_android_lifecycle 2.0.1[7](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:8) (2.0.19 available)
  frontend_server_client 3.2.0 (4.0.0 available)
  http 0.13.6 (1.2.1 available)
  image_picker_android 0.[8](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:9).9+3 (0.8.11 available)
  image_picker_for_web 3.0.2 (3.0.4 available)
  image_picker_ios 0.8.[9](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:10)+1 (0.8.10+1 available)
  intl 0.18.1 (0.19.0 available)
  js 0.6.7 (0.7.1 available)
  json_annotation 4.8.1 (4.9.0 available)
  leak_tracker [10](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:11).0.0 (10.0.5 available)
  leak_tracker_flutter_testing 2.0.1 (3.0.5 available)
  leak_tracker_testing 2.0.1 (3.0.1 available)
  material_color_utilities 0.8.0 (0.[11](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:12).1 available)
  meta 1.11.0 (1.14.0 available)
  permission_handler_android [12](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:13).0.3 (12.0.6 available)
  permission_handler_platform_interface 4.2.0 (4.2.1 available)
  pointycastle 3.7.4 (3.9.0 available)
  shared_preferences_android 2.2.1 (2.2.2 available)
  test_api 0.6.1 (0.7.1 available)
  url_launcher_android 6.3.0 (6.3.1 available)
  url_launcher_ios 6.2.4 (6.2.5 available)
  url_launcher_web 2.3.0 (2.3.1 available)
! uuid 4.4.0 (overridden)
  vm_service [13](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:14).0.0 (14.2.1 available)
  web_socket_channel 2.4.0 (2.4.5 available)
  win32 5.2.0 (5.5.0 available)
  win32_registry 1.1.2 (1.1.3 available)
Got dependencies!
34 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Building Windows application...                                 
CMake Deprecation Warning at D:/a/picguard/picguard/build/windows/x64/extracted/firebase_cpp_sdk_windows/CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Building Windows application...                                   170.3s
√  Built build\windows\x64\runner\Release\PicGuard.exe (0.7MB).
{
  "config": {
    "mode": "release",
    "arguments": {
      "dart-define": {}
    }
  },
  "outputDirectory": "build/windows/x64/runner/Release",
  "duration": 172434,
  "outputFiles": []
}
Successfully built Directory: 'build/windows/x64/runner/Release' in 172s
building msix files...                  /-\|/-\0.5s
packing msix files...                   /-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\ 

Unhandled exception:
type 'Null' is not a subtype of type 'FutureOr<String>'
#0      _AsyncCompleter.complete (dart:async/future_impl.dart:44:41)
#1      Prompter.prompt.<anonymous closure>.<anonymous closure> (package:console/src/prompt.dart:222:19)
#2      new Future.<anonymous closure> (dart:async/future.dart:256:37)
#3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Do you want to install the certificate: "test_certificate.pfx" ? (y/N) $ flutter clean
Deleting build...                                                  339ms
Deleting .dart_tool...                                               3ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                               12ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         0ms
Packaging picguard 1.0.0+1 as msix:
$ C:\hostedtoolcache\windows\flutter\stable-3.19.6-x64\bin\flutter build windows --dart-define FLUTTER_BUILD_NAME=1.0.0 --dart-define FLUTTER_BUILD_NUMBER=1
Resolving dependencies...
  _fe_analyzer_shared 64.0.0 (68.0.0 available)
  analyzer 6.2.0 (6.5.0 available)
  archive 3.4.10 (3.5.0 available)
  args 2.4.2 (2.5.0 available)
  built_value 8.9.0 (8.9.2 available)
  csv 5.1.1 (6.0.0 available)
  dart_style 2.3.4 (2.3.6 available)
  ffi 2.1.0 (2.1.2 available)
  flutter_plugin_android_lifecycle 2.0.17 (2.0.19 available)
  frontend_server_client 3.2.0 (4.0.0 available)
  http 0.13.6 (1.2.1 available)
  image_picker_android 0.8.9+3 (0.8.11 available)
  image_picker_for_web 3.0.2 (3.0.4 available)
  image_picker_ios 0.8.9+1 (0.8.10+1 available)
  intl 0.18.1 (0.19.0 available)
  js 0.6.7 (0.7.1 available)
  json_annotation 4.8.1 (4.9.0 available)
  leak_tracker 10.0.0 (10.0.5 available)
  leak_tracker_flutter_testing 2.0.1 (3.0.5 available)
  leak_tracker_testing 2.0.1 (3.0.1 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.11.0 (1.[14](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:15).0 available)
  permission_handler_android 12.0.3 (12.0.6 available)
  permission_handler_platform_interface 4.2.0 (4.2.1 available)
  pointycastle 3.7.4 (3.9.0 available)
  shared_preferences_android 2.2.1 (2.2.2 available)
  test_api 0.6.1 (0.7.1 available)
  url_launcher_android 6.3.0 (6.3.1 available)
  url_launcher_ios 6.2.4 (6.2.5 available)
  url_launcher_web 2.3.0 (2.3.1 available)
! uuid 4.4.0 (overridden)
  vm_service 13.0.0 (14.2.1 available)
  web_socket_channel 2.4.0 (2.4.5 available)
  win32 5.2.0 (5.5.0 available)
  win32_registry 1.1.2 (1.1.3 available)
Got dependencies!
34 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Building Windows application...                                 
CMake Deprecation Warning at D:/a/picguard/picguard/build/windows/x64/extracted/firebase_cpp_sdk_windows/CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Building Windows application...                                    97.2s
√  Built build\windows\x64\runner\Release\PicGuard.exe (0.7MB).
{
  "config": {
    "mode": "release",
    "arguments": {
      "dart-define": {}
    }
  },
  "outputDirectory": "build/windows/x64/runner/Release",
  "duration": 99379,
  "outputFiles": []
}
Successfully built Directory: 'build/windows/x64/runner/Release' in 99s
building msix files...                  /-\|/0.4s
packing msix files...                   /-\|/-\|/-\|/-\|/-\|/-\| 

Unhandled exception:
type 'Null' is not a subtype of type 'FutureOr<String>'
#0      _AsyncCompleter.complete (dart:async/future_impl.dart:44:41)
#1      Prompter.prompt.<anonymous closure>.<anonymous closure> (package:console/src/prompt.dart:222:19)
#2      new Future.<anonymous closure> (dart:async/future.dart:256:37)
#3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:[15](https://github.com/picguard/picguard/actions/runs/8920584400/job/24498926292#step:8:16))
#4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Do you want to install the certificate: "test_certificate.pfx" ? (y/N)
lijy91 commented 1 month ago

It seems related to this https://github.com/YehudaKremer/msix/issues/230#issuecomment-1812927687