Skip to content
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

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

Open
ikarelin opened this issue Aug 1, 2024 · 7 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@ikarelin
Copy link

ikarelin commented Aug 1, 2024

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

  • SDK version: parse_server_sdk_flutter-8.0.0
  • Flutter version: Flutter 3.22.3 • channel stable
  • Dart version: Dart SDK version: 3.4.4 (stable)
  • Operating system version: Mac OS Sonoma 14.5 (23F79)

Server

  • Parse Server version: 6.5.4

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.

Copy link

parse-github-assistant bot commented Aug 1, 2024

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@ikarelin
Copy link
Author

ikarelin commented Aug 2, 2024

[ +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)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1394:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:212:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:372:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5)

#8 run.. (package:flutter_tools/runner.dart:130:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

#10 main (package:flutter_tools/executable.dart:93:3)

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

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Aug 2, 2024
@mtrezza mtrezza changed the title Cannot build application App fails to build in Xcode with incorrect parameter type for ParseConnectivityResult Aug 2, 2024
@mtrezza
Copy link
Member

mtrezza commented Aug 2, 2024

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

@ikarelin
Copy link
Author

ikarelin commented Aug 3, 2024

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
Copy link
Member

mtrezza commented Aug 3, 2024

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

@ikarelin
Copy link
Author

ikarelin commented Aug 4, 2024

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
Copy link
Author

ikarelin commented Aug 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants