firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
223 stars 37 forks source link

[Bug] 'headerValue()' is unavailable in Swift: Use asyncHeaderValue() #1130

Open Kharion opened 4 hours ago

Kharion commented 4 hours ago

Description

Xcode is unable to build our game. We did not made any changes to Firebase or any other SDK since October 9th. The builds stopped working overnight with following error:

build/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift:112:40: error: 'headerValue()' is unavailable in Swift: Use `asyncHeaderValue() async -> String?` instead.
      request.setValue(heartbeatLogger.headerValue(), forHTTPHeaderField: "X-Firebase-Client")
                                       ^~~~~~~~~~~
FirebaseCoreExtension.FIRHeartbeatLoggerProtocol:12:10: note: 'headerValue()' has been explicitly marked unavailable here
    func headerValue() -> String?

We use EDM 1.2.183, Firebase Unity SDK 12.3.0. Not even downgrade to 12.2.1 helps. Google Mobile Ads version 9.2.0 (unity package). This is very unfortunate since we are in the release week. Please give us workaround instructions.

Reproducing the issue

Install Firebase SDK, and try to build iOS project in the Xcode

Firebase Unity SDK Version

12.3.0

Unity editor version

2022.3.40f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Authentication

Other Firebase Component(s) in use

Analytics, Crashlytics, Messaging

Additional SDKs you are using

Facebook (17.0.1), AdMob (9.2.0), AppLovin 7.0.0, Singular, TapJoy

Targeted Platform(s)

Apple Platforms

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

build/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift:112:40: error: 'headerValue()' is unavailable in Swift: Use `asyncHeaderValue() async -> String?` instead.
      request.setValue(heartbeatLogger.headerValue(), forHTTPHeaderField: "X-Firebase-Client")
                                       ^~~~~~~~~~~
FirebaseCoreExtension.FIRHeartbeatLoggerProtocol:12:10: note: 'headerValue()' has been explicitly marked unavailable here
    func headerValue() -> String?
         ^

RegisterExecutionPolicyException /Users/build/Library/Developer/Xcode/DerivedData/Unity-iPhone-

If using CocoaPods for Apple platforms, the project's Podfile.lock

PODS:

DEPENDENCIES:

SPEC REPOS: https://github.com/CocoaPods/Specs.git:

SPEC CHECKSUMS: AppLovinMediationFacebookAdapter: a569c3015e24b5e00049a46bb344ba00894b3541 AppLovinMediationGoogleAdapter: cfe4d8971d01cc3fc31bfb3850243e37bc02812d AppLovinMediationIronSourceAdapter: 780e901f72f69bade8e53a645a9c07bb220a8f01 AppLovinMediationMintegralAdapter: 9952d52bcec54fe038b690bf9a29375d5728419a AppLovinMediationUnityAdsAdapter: 715fccd4edd58ed8b42708f6cd6229888db0226f AppLovinMediationVungleAdapter: ae90969e09a9d69dced0b56f2f0dee9e7a958b03 AppLovinSDK: c0ecb434df24008b6ecdd7f1e5b8587bc45ff381 FBAEMKit: 9900b2edd99a2d21629a6277e6166f14c6215799 FBAudienceNetwork: 2457a89b45e2596241fd81b0c2fd8cb6f6053869 FBSDKCoreKit: 0791f8f68a8630931a4c12aa23a56cc021551596 FBSDKCoreKit_Basics: 46d6b472c0dd0a5a7e972c025033d1c567f54eb4 FBSDKGamingServicesKit: 599a63c235776b7c6288d5dfd7c02edab9a1d3b7 FBSDKLoginKit: b4a4eba1d62eb452544411824f41689adabd5bd2 FBSDKShareKit: eb1169eafe3c06f881dc6deed2d7979585b16959 Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9 FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a FirebaseAppCheckInterop: 1b9643ae2f1ee214488caa2f8e32b7bc2f0f3735 FirebaseAuth: d5cf28be74d7e82257f6a3f717509eff70d3cf4a FirebaseAuthInterop: 9ac948965ac13ec9d8a080f39490ddb2bda30520 FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383 FirebaseCoreExtension: 4445e4cd877e0790c4af33bedca61eaef27b7513 FirebaseCoreInternal: 5c2b016f06a96fbf20d9b443459f80427a827d7b FirebaseCrashlytics: 745d8f0221fe49c62865391d1bf56f5a12eeec0b FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414 FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742 FirebaseRemoteConfigInterop: e76f46ffa4d6a65e273d4dfebb6a79e588cec136 FirebaseSessions: 655ff17f3cc1a635cbdc2d69b953878001f9e25b Google-Mobile-Ads-SDK: 13e6e98edfd78ad8d8a791edb927658cc260a56f GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUserMessagingPlatform: 0c3a08353e53ce8c2feab7addd0b652cde522450 GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 IronSourceSDK: 557a0edad39c2a48a225af07b491c672ca5acd36 MintegralAdSDK: 7e05f9ab5f555b7049435a9477d457d7bf9b5473 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 TapjoySDK: 30df1515a5a0a16076c6610c517911657164b2c2 UnityAds: 32596c2f76856d643b50d3da51c47a552b80d5a4 VungleAds: d7cf66a6dfd390a583ea2b2cfb9af1043b686e58

PODFILE CHECKSUM: ba7e215eea7f89c0da8ea5779d17b06f7113f98d

COCOAPODS: 1.14.2

google-oss-bot commented 4 hours ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

yepMad commented 3 hours ago

The same happens here, even in builds that previously worked and were untouched. https://github.com/invertase/react-native-firebase/issues/8073

argzdev commented 3 hours ago

Hey folks, thanks for bringing this to our attention and also linking the react native thread.

Let me bring this up to our engineers, and see if we can come up with a fix.

yepMad commented 1 hour ago

I've found a workaround for this, based on the answers the React Native Firebase folks provided.

In /Firebase/Editor inside all the Dependencies.xml you have (eg. AppDependencies.xml, AuthDependencies.xml, FirestoreDependencies.xml) change the “version” of <iosPod ... /> to 11.4.0. This should solve the problem for now.

Example:

<iosPods>
    <iosPod name="Firebase/Auth" version="11.4.0" minTargetSdk="13.0">
    </iosPod>
</iosPods>