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

'new' is unavailable build failure after XCode 14.3 update #7014

Closed
2 of 7 tasks
my-name-is-nheo opened this issue Mar 31, 2023 · 2 comments · Fixed by #7017
Closed
2 of 7 tasks

'new' is unavailable build failure after XCode 14.3 update #7014

my-name-is-nheo opened this issue Mar 31, 2023 · 2 comments · Fixed by #7017
Labels
impact: build-error Behaviour causing build failure platform: ios plugin: app-check Firebase AppCheck type: bug New bug report

Comments

@my-name-is-nheo
Copy link

my-name-is-nheo commented Mar 31, 2023

Issue

Describe your issue here

After updating to Xcode 14.3, I am encountering a build error while attempting to build my app. Specifically, the error message states that "'init' has been explicitly marked available here."

Project Files

Javascript

  const initializeAppCheckHandler = async () => {
    const provider = firebase.appCheck().newReactNativeFirebaseAppCheckProvider();

    provider.configure({
      android: {
        provider: process.env.NODE_ENV === 'development' ? 'debug' : 'playIntegrity',
        debugToken: config.APP_CHECK_DEBUG_ANDROID_TOKEN,
      },
      apple: {
        provider:
          process.env.NODE_ENV === 'development' ? 'debug' : 'appAttestWithDeviceCheckFallback',
        debugToken: config.iOS_APP_CHECK_DEBUG_TOKEN,
      },
    });

    firebase.appCheck().initializeAppCheck({ provider, isTokenAutoRefreshEnabled: true });
  };

package.json:

    "@react-native-firebase/app": "^17.4.0",
    "@react-native-firebase/app-check": "^17.4.0",
    "@react-native-firebase/auth": "^17.4.0",
    "@react-native-firebase/messaging": "^17.4.0",  
    "react-native": "^0.67.5",

I'm trying not to release too much information as this is for a company project. Please let me know if there is anything more you need. I uploaded as much as I could

Bug Photos

image

image

image

image

Amazing how there are only 34 pending issues in this project. Thank you to all contributers

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '16.0'
target 'Test - Dev' do
  use_modular_headers!
  $RNFirebaseAsStaticFramework = true

  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
end
target 'Test - Demo' do
  use_modular_headers!
  $RNFirebaseAsStaticFramework = true

  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
end
target 'Test - Prod' do
  use_modular_headers!
  $RNFirebaseAsStaticFramework = true

  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
end

use_flipper!({ "Flipper-DoubleConversion" => "1.1.7" })

post_install do |installer|
  react_native_post_install(installer)
end
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 17.4.0
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID <- apologies but where can i find this?
  • Are you using TypeScript?
    • Y & ^4.9.4

Environment

Click To Expand

react-native info output:

System:
    OS: macOS 13.1
    CPU: (8) x64 Apple M1 Pro
    Memory: 17.79 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
    Watchman: 2023.01.02.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.12.0 - /Users/hello/.rvm/gems/ruby-3.0.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.10 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.67.5 => 0.67.5 
    react-native-macos: Not Found
  npmGlobalPackages: < -- using PNPM
    *react-native*: Not Found

@my-name-is-nheo my-name-is-nheo added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Mar 31, 2023
@mikehardy
Copy link
Collaborator

That looks pretty serious! Build errors are always a high priority. Thanks for reporting.

I'm just updating my dev environments to Xcode 14.3 now and will take a look

@mikehardy mikehardy added platform: ios impact: build-error Behaviour causing build failure Workflow: Needs Review Pending feedback or review from a maintainer. plugin: app-check Firebase AppCheck labels Mar 31, 2023
mikehardy added a commit that referenced this issue Mar 31, 2023
The new version of Xcode enforces firebase-ios-sdk API `UNAVAILABLE`
directives (as it should!) and the initial implementation here was
incorrectly relying on unavailable things

Fixes #7014
@mikehardy
Copy link
Collaborator

mikehardy commented Mar 31, 2023

Wow, that took forever! Xcode updates are a bear. Also a requirement, though, so it's done now.

It's a silly coding error on my part. Those three news that are causing problems should all be allocs

Patch + release landing in a moment, if you're following along you'll see the PR linked here on the issue, and in that PR if you need a patch immediately vs updating the packages, our CI generates a set of patch-package compatible patches you may apply.

@mikehardy mikehardy added Resolution: Solution Provided and removed help: needs-triage Issue needs additional investigation/triaging. Workflow: Needs Review Pending feedback or review from a maintainer. labels Mar 31, 2023
mikehardy added a commit that referenced this issue Apr 1, 2023
The new version of Xcode enforces firebase-ios-sdk API `UNAVAILABLE`
directives (as it should!) and the initial implementation here was
incorrectly relying on unavailable things

Fixes #7014
mikehardy added a commit that referenced this issue Apr 1, 2023
The new version of Xcode enforces firebase-ios-sdk API `UNAVAILABLE`
directives (as it should!) and the initial implementation here was
incorrectly relying on unavailable things

Fixes #7014
exaby73 pushed a commit that referenced this issue Aug 8, 2023
The new version of Xcode enforces firebase-ios-sdk API `UNAVAILABLE`
directives (as it should!) and the initial implementation here was
incorrectly relying on unavailable things

Fixes #7014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: build-error Behaviour causing build failure platform: ios plugin: app-check Firebase AppCheck type: bug New bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants