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

[firebase_analytics: 11.3.0]: In Flutter version 3.24.2: Error (Xcode): Linker command failed with exit code 1 #13277

Open
1 task done
phamquoctrongnta opened this issue Sep 5, 2024 · 18 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: analytics type: bug Something isn't working

Comments

@phamquoctrongnta
Copy link

phamquoctrongnta commented Sep 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

No response

Which platforms are affected?

No response

Description

When I update to firebase_analytics 11.3.0 getting an error.

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 15 Pro Max.

image

Reproducing the issue

  1. Create new Flutter project.
  2. Add to pubspec.yaml:
  firebase_core: ^3.4.0
  firebase_analytics: ^11.3.0
  1. Update ios/Podfile to:
platform :ios, '13.0'
  1. Run command:
  • flutter pub get
  • cd to /ios and run pod install.
  1. Run project in iOS simulator with Flutter version 3.24.2.

Firebase Core version

3.4.0

Flutter Version

3.24.2

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@phamquoctrongnta phamquoctrongnta added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 5, 2024
@SelaseKay
Copy link
Contributor

Hi @phamquoctrongnta , this issue does not seem to be pointing to firebase_analytics in any way. I'm going to go ahead and close this issue since it's out of scope for this repo.

@phamquoctrongnta
Copy link
Author

@SelaseKay
When I delete firebase_analytics, my project works. Does this related?

@SelaseKay
Copy link
Contributor

Try deleting your Podfile.lock and running pod install.

@phamquoctrongnta
Copy link
Author

@SelaseKay
I ran pod install with no problem. But when I ran the project, I got an error.
Which platform did you check? Android or iOS? Please check on an iOS device.

@phamquoctrongnta
Copy link
Author

phamquoctrongnta commented Sep 6, 2024

@SelaseKay
Reproducing the issue:

  1. Create new Flutter project.
  2. Add to pubspec.yaml:
  firebase_core: ^3.4.0
  firebase_analytics: ^11.3.0
  1. Update ios/Podfile to: ( firebase_analytics 11.3.0 required iOS platform version 13.0)
platform :ios, '13.0'
  1. Run command:
  • flutter pub get
  • cd to /ios and run pod install.
  1. Run project in iOS simulator with Flutter version 3.24.2.
    As you can see, I didn’t change anything, but the project still getting an error when I run it.

@RoberRaf
Copy link

RoberRaf commented Sep 8, 2024

I have a quite similar issue.
the error message is :
Error (Xcode): Undefined symbol: OBJC_CLASS$_FIRMessaging

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

this issue appeared only after updating to flutter 3.24.2

@SelaseKay
Copy link
Contributor

SelaseKay commented Sep 9, 2024

@phamquoctrongnta, What Xcode version are you experiencing this on?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. plugin: analytics platform: ios Issues / PRs which are specifically for iOS. labels Sep 9, 2024
@hasen6
Copy link

hasen6 commented Sep 9, 2024

What Xcode version are you experiencing this on?

15.0.1

It's the same for me as the OP, removing firebase_analytics from dependencies enables the app to load fine, it's definitely due to firebase_analytics. Also the error on an xcode build for me is:

fatal error: module 'firebase_analytics' not found
@import firebase_analytics;

I also had to set minimum platform :ios, '13.0' in the podfile.

@SelaseKay
Copy link
Contributor

I'm unable to reproduce this on Xcode version 15.2. Kindly try updating your Xcode and test again.

@hasen6
Copy link

hasen6 commented Sep 9, 2024

I'm unable to reproduce this on Xcode version 15.2. Kindly try updating your Xcode and test again.

Yes that fixed the problem. Please update your documentation to make it clear xcode 15.2 or more is required (if it's not already there). Not sure what version the OP was using but it's likely it would solve the problem too.

@RoberRaf
Copy link

RoberRaf commented Sep 9, 2024

I'm unable to reproduce this on Xcode version 15.2. Kindly try updating your Xcode and test again.

for me I' using xcode version 15.4
the last stable version

is there in keys ?

@SelaseKay
Copy link
Contributor

@RoberRaf , does version 15.4 resolve your issue?

@RoberRaf
Copy link

@RoberRaf , does version 15.4 resolve your issue?

I resolved the problem by re-using an ios folder of an old version of my project.
It wasn't related to xcode version, nor firebase plugins. I think It was related to some xcode configuration. Can't specify which one.

Thank you anyway 🌸

@youpelegrace
Copy link

Hello is anyone still facing this issue?

i'm having this error and i have tried xcode 15.2 and 15.3 nd also 15 but the error persists

Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC' not found
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
_FIRConsentStatusDenied, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
_FIRConsentStatusGranted, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
_FIRConsentTypeAdPersonalization, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
_FIRConsentTypeAdStorage, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
_FIRConsentTypeAdUserData, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
_FIRConsentTypeAnalyticsStorage, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics4
OBJC_CLASS$_FIRAnalytics, referenced from:
in firebase_analytics4
_swift_FORCE_LOAD$_swiftXPC, referenced from:
_swift_FORCE_LOAD$swiftXPC$_FBAudienceNetwork in FBAudienceNetwork415
clang: error: linker command failed with exit code 1 (use -v to see invocation)

this is my error

@hafidzaini
Copy link

same error with me.
CoreAudioType and undefined symbol

@youpelegrace
Copy link

@hafidzaini you might want to remove firebase analytics plugin and run the app, if it runs successfully
add $FirebaseSDKVersion = '10.29.0' to your podfile and re add the plugin back

@hafidzaini
Copy link

thanks, i'try.

this problem happen after i do flutter clean and then do arch -x86_64 pod install on mac M1
last week still no problem and didnt change any plugin version and didnt update xcode.
but it was before a warning on xcode "Conversion to Swift available"
now its break. strange.. 😰🤔

@hafidzaini
Copy link

never change package version, this error happen after flutter clean.
Solve this issue by update xCode to latest version, from 15.0 to 15.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: analytics type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants