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

[Bug]: Fails to build on IOS Simulator with connectivity_plus #1806

Closed
7 tasks done
Stardusted1 opened this issue May 11, 2023 · 7 comments
Closed
7 tasks done

[Bug]: Fails to build on IOS Simulator with connectivity_plus #1806

Stardusted1 opened this issue May 11, 2023 · 7 comments
Labels
bug Something isn't working triage

Comments

@Stardusted1
Copy link

Platform

Xcode 14.3, Xcode 14.3

Plugin

connectivity_plus

Version

4.0.0

Flutter SDK

Flutter 3.10.0

Steps to reproduce

  1. flutter create {project_name}
  2. add connectivity_plus: ^4.0.0 to pubspec.yaml
  3. flutter run

Code Sample

No actions are required, just add the dependency to the project

Logs

[   +1 ms] executing: [/Users/markoa/Documents/src/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +20 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 84a1e904f44f9b0e9c4510138010edcc653163f8
[        ] executing: [/Users/markoa/Documents/src/flutter/] git tag --points-at 84a1e904f44f9b0e9c4510138010edcc653163f8
[  +77 ms] Exit code 0 from: git tag --points-at 84a1e904f44f9b0e9c4510138010edcc653163f8
[        ] 3.10.0
[   +1 ms] executing: [/Users/markoa/Documents/src/flutter/] git rev-parse --abbrev-ref HEAD
[   +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[        ] executing: sw_vers -productName
[   +8 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[   +6 ms] Exit code 0 from: sw_vers -productVersion
[        ] 13.3.1
[        ] executing: sw_vers -buildVersion
[   +6 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 22E772610a
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] arm64
[   +3 ms] executing: sysctl hw.optional.arm64
[   +2 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[   +3 ms] executing: [/Users/markoa/Documents/src/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[  +10 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/stable
[        ] executing: [/Users/markoa/Documents/src/flutter/] git ls-remote --get-url origin
[   +8 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +41 ms] executing: sysctl hw.optional.arm64
[   +3 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[        ] executing: /usr/bin/arch -arm64e xcrun xcodebuild -version
[ +172 ms] Exit code 0 from: /usr/bin/arch -arm64e xcrun xcodebuild -version
[        ] Xcode 14.3
           Build version 14E222b
[   +1 ms] executing: /usr/bin/arch -arm64e xcrun xcdevice list --timeout 5
[   +3 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +23 ms] executing: /Users/markoa/Library/Android/sdk/platform-tools/adb devices -l
[        ] executing: /usr/bin/arch -arm64e xcrun xcdevice list --timeout 2
[        ] /usr/bin/arch -arm64e xcrun simctl list devices booted iOS --json
[        ] executing: /usr/bin/arch -arm64e xcrun simctl list devices booted iOS --json
[   +1 ms] executing: /usr/bin/arch -arm64e xcrun simctl list devices booted
[  +76 ms] Exit code 0 from: /usr/bin/arch -arm64e xcrun simctl list devices booted
[        ] == Devices ==
           -- iOS 16.4 --
               iPhone 14 (10DFDFA6-FD8D-413D-8CD1-803C0C9F1966) (Booted)
[  +26 ms] List of devices attached
[ +112 ms] {
                      "devices" : {
                        "com.apple.CoreSimulator.SimRuntime.iOS-16-4" : [
                          {
                            "lastBootedAt" : "2023-05-08T19:12:39Z",
                            "dataPath" :
                            "\/Users\/markoa\/Library\/Developer\/CoreSimulator\/Devices\/10DFDFA6-FD8D-413D-8CD1-803C0C9F1966\/data",
                            "dataPathSize" : 3731496960,
                            "logPath" : "\/Users\/markoa\/Library\/Logs\/CoreSimulator\/10DFDFA6-FD8D-413D-8CD1-803C0C9F1966",
                            "udid" : "10DFDFA6-FD8D-413D-8CD1-803C0C9F1966",
                            "isAvailable" : true,
                            "logPathSize" : 811008,
                            "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-14",
                            "state" : "Booted",
                            "name" : "iPhone 14"
                          }
                        ]
                      }
                    }
[+2448 ms] [
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPad14,5",
                        "identifier" : "1568ADC6-0641-4B24-A1E6-D13BD6CC35FA",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.ipad-pro-12point9-6th-1",
                        "modelName" : "iPad Pro (12.9-inch) (6th generation)",
                        "name" : "iPad Pro (12.9-inch) (6th generation)",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone14,8",
                        "identifier" : "A13B5D2B-B7AF-4546-BA66-F1DF208C4CDD",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.iphone-14-plus-1",
                        "modelName" : "iPhone 14 Plus",
                        "name" : "iPhone 14 Plus",
                        "ignored" : false
                      },
                      {
                        "ignored" : false,
                        "modelCode" : "MacBookPro17,1",
                        "simulator" : false,
                        "modelName" : "MacBook Pro",
                        "operatingSystemVersion" : "13.3.1 (22E261)",
                        "identifier" : "00008103-001955DA11BB001E",
                        "platform" : "com.apple.platform.macosx",
                        "architecture" : "arm64e",
                        "interface" : "usb",
                        "available" : true,
                        "name" : "My Mac",
                        "modelUTI" : "com.apple.macbookpro-13-retina-touchid-late-2020"
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPad14,3",
                        "identifier" : "3FA9ED6E-2C79-4DCB-9F10-8943EC718372",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.ipad-pro-11-4th-1",
                        "modelName" : "iPad Pro (11-inch) (4th generation)",
                        "name" : "iPad Pro (11-inch) (4th generation)",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPad14,1",
                        "identifier" : "6AF28D44-391C-46AE-AF00-030E16F126B1",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.ipad-mini6-1",
                        "modelName" : "iPad mini (6th generation)",
                        "name" : "iPad mini (6th generation)",
                        "ignored" : false
                      },
                      {
                        "ignored" : false,
                        "modelCode" : "iPhone14,6",
                        "simulator" : false,
                        "modelName" : "iPhone SE (3rd generation)",
                        "error" : {
                          "code" : -13,
                          "failureReason" : "",
                          "underlyingErrors" : [
                            {
                              "code" : 4,
                              "failureReason" : "",
                              "description" : "iPhone (Marko) is locked.",
                              "recoverySuggestion" : "To use iPhone (Marko) with Xcode, unlock it.",
                              "domain" : "DVTDeviceIneligibilityErrorDomain"
                            }
                          ],
                          "description" : "iPhone (Marko) is not connected",
                          "recoverySuggestion" : "Xcode will continue when iPhone (Marko) is connected and unlocked.",
                          "domain" : "com.apple.platform.iphoneos"
                        },
                        "operatingSystemVersion" : "16.3.1 (20D67)",
                        "identifier" : "00008110-000430DC3653801E",
                        "platform" : "com.apple.platform.iphoneos",
                        "architecture" : "arm64e",
                        "interface" : "usb",
                        "available" : false,
                        "name" : "iPhone (Marko)",
                        "modelUTI" : "com.apple.iphone-se3-6"
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone14,7",
                        "identifier" : "10DFDFA6-FD8D-413D-8CD1-803C0C9F1966",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.iphone-14-1",
                        "modelName" : "iPhone 14",
                        "name" : "iPhone 14",
                        "ignored" : false
                      },
                      {
                        "ignored" : false,
                        "modelCode" : "iPad14,1",
                        "simulator" : false,
                        "modelName" : "iPad mini (6th generation)",
                        "operatingSystemVersion" : "16.4.1 (20E252)",
                        "identifier" : "00008110-00044C2E3446401E",
                        "platform" : "com.apple.platform.iphoneos",
                        "architecture" : "arm64e",
                        "interface" : "usb",
                        "available" : true,
                        "name" : "IPad Mini (Marko)",
                        "modelUTI" : "com.apple.ipad-mini6-6"
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone14,6",
                        "identifier" : "3FD58081-6820-47E2-A76E-F1C98338173C",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.iphone-se3-1",
                        "modelName" : "iPhone SE (3rd generation)",
                        "name" : "iPhone SE (3rd generation)",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone15,3",
                        "identifier" : "DBD5FDF3-5A39-4A4D-9711-2B94051C8AAC",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.iphone-14-pro-max-1",
                        "modelName" : "iPhone 14 Pro Max",
                        "name" : "iPhone 14 Pro Max",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPad13,17",
                        "identifier" : "A30C3C99-AB7B-4FA8-8E91-5138712FB8F1",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.ipad-air5-1",
                        "modelName" : "iPad Air (5th generation)",
                        "name" : "iPad Air (5th generation)",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPad13,18",
                        "identifier" : "A4C3B518-FD9B-4759-8209-62B965BA08B3",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.ipad-10-1",
                        "modelName" : "iPad (10th generation)",
                        "name" : "iPad (10th generation)",
                        "ignored" : false
                      },
                      {
                        "simulator" : true,
                        "operatingSystemVersion" : "16.4 (20E247)",
                        "available" : true,
                        "platform" : "com.apple.platform.iphonesimulator",
                        "modelCode" : "iPhone15,2",
                        "identifier" : "461A0127-C8D7-4AAC-AD46-51C7C1A3A7F6",
                        "architecture" : "arm64",
                        "modelUTI" : "com.apple.iphone-14-pro-1",
                        "modelName" : "iPhone 14 Pro",
                        "name" : "iPhone 14 Pro",
                        "ignored" : false
                      }
                    ]

                    2023-05-12 01:32:35.818 xcdevice[18205:2465576] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via
                    user default (DVTEnableCoreDevice=disabled)
[   +4 ms] Error: iPhone (Marko) is not connected. Xcode will continue when iPhone (Marko) is connected and unlocked. (code -13)
[   +5 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +16 ms] "flutter run" took 2,918ms.
[  +11 ms] Error: No pubspec.yaml file found.
           This command should be run from the root of your Flutter project.
[        ] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      FlutterCommand.validateCommand (package:flutter_tools/src/runner/flutter_command.dart:1641:9)
           #2      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:529:19)
           #3      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1523:11)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
           <asynchronous suspension>
           #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
           <asynchronous suspension>
           #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #12     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>
           
           
[ +192 ms] ensureAnalyticsSent: 189ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

Flutter Doctor

[✓] Flutter (Channel stable, 3.10.0, on macOS 13.3.1 22E772610a darwin-arm64, locale en-UA)
    • Flutter version 3.10.0 on channel stable at /Users/markoa/Documents/src/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (2 days ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/markoa/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/markoa/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/markoa/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/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.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/markoa/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841/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 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.77.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.64.0

[✓] Connected device (4 available)
    • IPad Mini (Marko) (mobile) • 00008110-00044C2E3446401E            • ios            • iOS 16.4.1 20E252
    • iPhone 14 (mobile)         • 10DFDFA6-FD8D-413D-8CD1-803C0C9F1966 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4
      (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.3.1 22E772610a darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 113.0.5672.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@vbuberen
Copy link
Collaborator

Thanks for reporting. It seems that the issue is similar to #1672.

As I found out in the Flutter repo 3.10 is missing fixes for issues building on iOS that were resolved in 3.7.12. For example, here is one of such mentions: flutter/flutter#126549

So I would suggest to revert to Flutter 3.7.12 and check if the issue still persists.

@Stardusted1
Copy link
Author

Yep, thank you, that's what I did on the spot.

@vbuberen
Copy link
Collaborator

So everything works fine with Flutter 3.7.12 for you?

@pranavo72bex
Copy link

Thanks for reporting. It seems that the issue is similar to #1672.

As I found out in the Flutter repo 3.10 is missing fixes for issues building on iOS that were resolved in 3.7.12. For example, here is one of such mentions: flutter/flutter#126549

So I would suggest to revert to Flutter 3.7.12 and check if the issue still persists.

Build issue on ios is fixed in flutter 3.10.1. Please consider migrating to 3.10.1 🙏

@vbuberen
Copy link
Collaborator

@Stardusted1 Can you confirm that 3.7.12 or 3.10.1 resolved the build issue for you?

@Stardusted1
Copy link
Author

absolutely, works completely fine!
God, bless the Flutter team

@dew-achlesh
Copy link

Verify your project, If any of your module is using connectivity package internally.
Then replace it with connectivity_plus package. This will fix your issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

4 participants