parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 187 forks source link

App fails to build in Xcode with incorrect parameter type for `ParseConnectivityResult` #1004

Open ikarelin opened 1 month ago

ikarelin commented 1 month ago

New Issue Checklist

Issue Description

Cannot build flutter application with parse server plugin

Steps to reproduce

Run application build in IntelliJ IDEA

Actual Outcome

Running Xcode build...
Xcode build done. 34.8s Failed to build iOS app Error (Xcode): ../../.pub-cache/hosted/pub.dev/parse_server_sdk_flutter-8.0.0/lib/parse_server_sdk_flutter.dart:126:53: Error: The argument type 'ParseConnectivityResult Function(ConnectivityResult)' can't be assigned to the parameter type 'ParseConnectivityResult Function(List)'.

Encountered error while building for device.

Expected Outcome

Normal build and run application

Environment

Parse Flutter SDK

Server

Logs

Running Xcode build... Xcode build done. 31.4s Failed to build iOS app Error (Xcode): ../../.pub-cache/hosted/pub.dev/parse_server_sdk_flutter-8.0.0/lib/parse_server_sdk_flutter.dart:126:53: Error: The argument type 'ParseConnectivityResult Function(ConnectivityResult)' can't be assigned to the parameter type 'ParseConnectivityResult Function(List)'.

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

parse-github-assistant[bot] commented 1 month ago

Thanks for opening this issue!

ikarelin commented 1 month ago

[ +94 ms] Failed to build iOS app [ +2 ms] Error (Xcode): [+2988 ms] ../../.pub-cache/hosted/pub.dev/parse_server_sdk_flutter-8.0.0/lib/parse_server_sdk_flutter.dart:126:53: Error: The argument type 'ParseConnectivityResult Function(ConnectivityResult)' can't be assigned to the parameter type 'ParseConnectivityResult Function(List)'.

[ +3 ms] Could not build the application for the simulator. [ ] Error launching application on iPhone 15 Pro Max. [ +3 ms] "flutter run" took 83,473ms. [ +6 ms]

0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)

       #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:840:9)
       <asynchronous suspension>
       #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1394:27)
       <asynchronous suspension>
       #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
       <asynchronous suspension>
       #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
       <asynchronous suspension>
       #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:372:9)
       <asynchronous suspension>
       #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
       <asynchronous suspension>
       #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5)
       <asynchronous suspension>
       #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
       <asynchronous suspension>
       #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
       <asynchronous suspension>
       #10     main (package:flutter_tools/executable.dart:93:3)
       <asynchronous suspension>

[ +99 ms] ensureAnalyticsSent: 98ms [ ] Running 1 shutdown hook [ +2 ms] Shutdown hooks complete [ ] exiting with code 1

mtrezza commented 1 month ago

Do you have any code to share that is causing this?

ikarelin commented 1 month ago

It's not in the code, the code cannot compile. It's in the plugin code:

[ +96 ms] Failed to build iOS app [ +2 ms] Error (Xcode): [+1408 ms] ../../.pub-cache/hosted/pub.dev/parse_server_sdk_flutter-8.0.0/lib/parse_server_sdk_flutter.dart:126:53: Error: The argument type 'ParseConnectivityResult Function(ConnectivityResult)' can't be assigned to the parameter type 'ParseConnectivityResult Function(List)'.

mtrezza commented 1 month ago

So you are only adding the Parse SDK to a new project without any code and then this error occurs during compile time?

ikarelin commented 1 month ago

No, empty Flutter project works fine with just parse_server_sdk_flutter installed. I've found the problem is with connectivity_plus flutter plugin, when I'm disabling it in my project, build going normally.

ikarelin commented 1 month ago

Seems the also project build normally with connectivity_plus version 5.0.2, but not with the latest 6.0.4 version