flutterfire_cli icon indicating copy to clipboard operation
flutterfire_cli copied to clipboard

[bug]: (Xcode): Undefined symbols: IOS crashes Flutter 3.24.3 with Analytics Error

Open tyypgzl opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

CLI Version

1.0.0

Firebase Tools version

13.0.3

Flutter Doctor Output

    • Flutter version 3.24.3 on channel stable at /Users/tayyipguzel/fvm/versions/3.24.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (6 hafta önce), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/tayyipguzel/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/tayyipguzel/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/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.6b829.9-10027231)

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

[✓] Connected device (5 available)
    • Tayyip iPhone’u (mobile)        • 00008030-00035842362BC02E            • ios            • iOS 17.6.1 21G93
    • iPhone 11 (mobile)              • 009054A7-39E8-4D42-9133-74D060F29E13 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.2.1 23C71 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 130.0.6723.69

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

• No issues found!

Description

I create new flutter project with this command fvm flutter create . --project-name mypretty --org dev.tagstudio --platform=android,ios -e. Adding firebase deps on pubspec with this version.

  firebase_core: ^3.6.0
  firebase_crashlytics: ^4.1.3
  firebase_analytics: ^11.3.3

and run this command flutterfire configure. select project ...etc Everythink is succesful until this step. I run project in ios 17.0 and throw this exception message.

Launching lib/main.dart on iPhone 11 in debug mode...
Xcode build done.                                           16.6s
Failed to build iOS app
Error (Xcode): Undefined symbols:

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Could not build the application for the simulator.
Error launching application on iPhone 11.

Exited (1).

Steps to reproduce

I create new flutter project with this command fvm flutter create . --project-name mypretty --org dev.tagstudio --platform=android,ios -e. Adding firebase deps on pubspec with this version.

  firebase_core: ^3.6.0
  firebase_crashlytics: ^4.1.3
  firebase_analytics: ^11.3.3

and run this command flutterfire configure. select project ...etc Everythink is succesful until this step. I run project in ios 17.0 and throw this exception message.

Launching lib/main.dart on iPhone 11 in debug mode...
Xcode build done.                                           16.6s
Failed to build iOS app
Error (Xcode): Undefined symbols:

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Could not build the application for the simulator.
Error launching application on iPhone 11.

Exited (1).

Expected behavior

run successful on ios emulator

Screenshots

No response

Additional context and comments

No response

tyypgzl avatar Oct 23 '24 13:10 tyypgzl

resolved to remove analytics package, why not running with analytics on ios?

tyypgzl avatar Oct 23 '24 15:10 tyypgzl

flutter run -v result

                   {
                     "_type" : {
                       "_name" : "IssueSummary"
                     },
                     "documentLocationInCreatingWorkspace" : {
                       "_type" : {
                         "_name" : "DocumentLocation"
                       },
                       "concreteTypeName" : {
                         "_type" : {
                           "_name" : "String"
                         },
                         "_value" : "Xcode3ProjectDocumentLocation"
                       },
                       "url" : {
                         "_type" : {
                           "_name" : "String"
                         },
                         "_value" :
                         "file:\/\/\/Users\/tayyipguzel\/Desktop\/brick_test\/ios\/Pods\/Pods.xcodeproj#Timestamp=751443174.883219&XcodeLocation=%7
                         B%22Selection%22:%7B%22Editor%22:%22Xcode3BuildSettingsEditor%22,%22Target%22:%22PromisesSwift%22,%22Xcode3BuildSettingsEd
                         itorLocations%22:%5B%7B%22Selected%20Build%20Properties%22:%5B%22IPHONEOS_DEPLOYMENT_TARGET%22%5D%7D%5D%7D%7D"
                       }
                     },
                     "issueType" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Target Integrity"
                     },
                     "message" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported
                       deployment target versions is 12.0 to 17.0.99."
                     }
                   },
                   {
                     "_type" : {
                       "_name" : "IssueSummary"
                     },
                     "issueType" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Warning"
                     },
                     "message" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Run script build phase 'FlutterFire: \"flutterfire upload-crashlytics-symbols\"' will be run during every build
                       because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or
                       configure it to run in every build by unchecking \"Based on dependency analysis\" in the script phase."
                     }
                   },
                   {
                     "_type" : {
                       "_name" : "IssueSummary"
                     },
                     "issueType" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Warning"
                     },
                     "message" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Ignoring duplicate libraries: '-lc++'"
                     }
                   },
                   {
                     "_type" : {
                       "_name" : "IssueSummary"
                     },
                     "issueType" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Warning"
                     },
                     "message" : {
                       "_type" : {
                         "_name" : "String"
                       },
                       "_value" : "Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found"
                     }
                   }
                 ]
               }
             },
             "metadataRef" : {
               "_type" : {
                 "_name" : "Reference"
               },
               "id" : {
                 "_type" : {
                   "_name" : "String"
                 },
                 "_value" : "0~z9UqQ8xptk9BAlIH-ZC2oW4POL5gstqteLJCG0H2zUKeTnHCJro-sHilkREtAnx5iIU48tgLr1t3YxAW2N99vA=="
               },
               "targetType" : {
                 "_type" : {
                   "_name" : "TypeDefinition"
                 },
                 "name" : {
                   "_type" : {
                     "_name" : "String"
                   },
                   "_value" : "ActionsInvocationMetadata"
                 }
               }
             },
             "metrics" : {
               "_type" : {
                 "_name" : "ResultMetrics"
               },
               "errorCount" : {
                 "_type" : {
                   "_name" : "Int"
                 },
                 "_value" : "2"
               },
               "warningCount" : {
                 "_type" : {
                   "_name" : "Int"
                 },
                 "_value" : "7"
               }
             }
           }
[   +5 ms] Failed to build iOS app
[   +1 ms] Error (Xcode): Undefined symbols:
           
[   +1 ms] Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)
           
[        ] Could not build the application for the simulator.
[        ] Error launching application on iPhone 11.
[   +1 ms] "flutter run" took 23,721ms.
[  +22 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:874:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408: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:420: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:364: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>
           
           
[ +204 ms] ensureAnalyticsSent: 203ms
[        ] Running 2 shutdown hooks
[   +7 ms] Shutdown hooks complete
[   +2 ms] exiting with code 1

tyypgzl avatar Oct 24 '24 06:10 tyypgzl

Same issue. can't run flutter on ios or macos

ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

dorklein avatar Oct 31 '24 10:10 dorklein

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Nov 28 '24 11:11 github-actions[bot]