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_app_check] Semantic Issue (Xcode): 'new' is unavailable after upgrading xcode #10694

Closed
mdddj opened this issue Mar 31, 2023 · 24 comments · Fixed by #10734
Closed
Assignees
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) plugin: app_check resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@mdddj
Copy link

mdddj commented Mar 31, 2023

image

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.3 22E252 darwin-arm64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)                           [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.3)
[✓] VS Code (version 1.76.2)
[!] Proxy Configuration
    ! NO_PROXY does not contain ::1
[✓] Connected device (4 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.
@mdddj mdddj added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Mar 31, 2023
@baekjungkim
Copy link

same issue.
I changed it to 'alloc' and using it.

@danagbemava-nc danagbemava-nc added the triage Issue is currently being triaged. label Mar 31, 2023
@danagbemava-nc
Copy link

Hi @mdddj, is this error only on Xcode 14.3? or did you get this error before the upgrade?

@danagbemava-nc danagbemava-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Mar 31, 2023
@mdddj
Copy link
Author

mdddj commented Mar 31, 2023

Yes, it didn't appear until xcode was upgraded.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Mar 31, 2023
@jpetro416
Copy link

Same issue here

@jpetro416
Copy link

same issue. I changed it to 'alloc' and using it.

Will this "stick" for the compile process? Or does compiling ignore a manual change like that?

@Albertbol
Copy link

same here

@Jethro87
Copy link

Same issue here since upgrading xcode:

Failed to build iOS app
Could not build the precompiled application for the device.
Semantic Issue (Xcode): 'new' is unavailable

@YDA93
Copy link

YDA93 commented Apr 1, 2023

Happened to me after I upgraded Xcode.
I updated my iPhone and Mac as well but no results.

@YDA93
Copy link

YDA93 commented Apr 1, 2023

My current workaround is to switch to older version of Xcode.

And here is how:

https://stackoverflow.com/questions/14756026/how-to-downgrade-xcode-to-previous-version

@StevenSnary
Copy link

Same issue here - I can confirm this occurred after updating to the latest Xcode version 14.3 (14E222b).
Note: I am also using iOS 16.4

@Theunodb
Copy link

Theunodb commented Apr 3, 2023

same issue.
I changed it to 'alloc' and using it.

This tmp workaround will get your app to compile while we wait for an update

@danagbemava-nc danagbemava-nc changed the title 🐛 [firebase_app_check] pub: 0.1.2, xcode: 14.3, ios: 16.4 run error 🐛 [firebase_app_check] Semantic Issue (Xcode): 'new' is unavailable after upgrading xcode Apr 3, 2023
@danagbemava-nc
Copy link

I attempted to reproduce this locally but I'm running into an issue with cocoapods. Similar to CocoaPods/CocoaPods#11808 (comment)

Labeling for further investigation from the team.

cc @Lyokone

Launching lib/main.dart on Nexus in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: X8NNQ9CYL2
Running pod install...
Running Xcode build...
Xcode build done.                                            6.1s
Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): File not found: /Applications/Xcode-14.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

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

Error launching application on Nexus.

@danagbemava-nc danagbemava-nc added impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) plugin: app_check and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Apr 3, 2023
@Lyokone Lyokone self-assigned this Apr 3, 2023
@thedalelakes
Copy link

thedalelakes commented Apr 3, 2023

I attempted to reproduce this locally but I'm running into an issue with cocoapods. Similar to CocoaPods/CocoaPods#11808 (comment)

Labeling for further investigation from the team.

cc @Lyokone

Launching lib/main.dart on Nexus in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: X8NNQ9CYL2
Running pod install...
Running Xcode build...
Xcode build done.                                            6.1s
Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): File not found: /Applications/Xcode-14.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

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

Error launching application on Nexus.

This has to do with flutter/flutter#123903 . Solution (for now...) is to upgrade min deployment target for all Pods to 11.0 (or greater) by adding the following to your Podfile:

installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
         end
    end
  end

The issue is, once you do this and get past the CocoaPods error, if you depend on firebase_app_check, you get the Semantic Issue (Xcode): 'new' is unavailable error.

@thedalelakes
Copy link

thedalelakes commented Apr 3, 2023

In the meantime, I'm personally just downgrading to XCode 14.2 until Flutter + CocoaPods update to not require these workarounds. Easier than trying to play whack-a-mole w/ different libraries 😄

@StevenSnary
Copy link

StevenSnary commented Apr 3, 2023

I attempted to reproduce this locally but I'm running into an issue with cocoapods. Similar to CocoaPods/CocoaPods#11808 (comment)

Labeling for further investigation from the team.

cc @Lyokone

Launching lib/main.dart on Nexus in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: X8NNQ9CYL2
Running pod install...
Running Xcode build...
Xcode build done.                                            6.1s
Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): File not found: /Applications/Xcode-14.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

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

Error launching application on Nexus.

I also ran into this error after upgrading... updating the Minimum Deployments - iOS value from 8.0 default to 11.0 or higher for the 'leveldb-library' Pod - got rid of this error in my case.

Screenshot 2023-04-03 at 11 13 02 AM

NOTE: This manual setting change is no longer required as there has been an updated to the cocoapod that sets the default value to a Minimum Deployment version of 11.0

@loolooii
Copy link

loolooii commented Apr 3, 2023

Every time there's an update from Xcode we are forced to download it (because we can't run the app on our device), it's at least 7GB large, it's slow, AND it causes problems every time. Apple should be more careful about doing this.

A temporary solution is to replace those new keywords to alloc.

@danagbemava-nc
Copy link

After working around the issue with level-db, I can reproduce the issue.

Changing new to alloc at the lines in the error allowed the app to run.

Launching lib/main.dart on Nexus in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: X8NNQ9CYL2
Running Xcode build...
Xcode build done.                                           164.4s
Failed to build iOS app
Could not build the precompiled application for the device.
Semantic Issue (Xcode): 'new' is unavailable
/Users/nexus/.pub-cache/hosted/pub.dev/firebase_app_check-0.1.2/ios/Classes/FLTAppCheckProvider.m:18:55

Semantic Issue (Xcode): 'new' is unavailable
/Users/nexus/.pub-cache/hosted/pub.dev/firebase_app_check-0.1.2/ios/Classes/FLTAppCheckProvider.m:22:53

Semantic Issue (Xcode): 'new' is unavailable
/Users/nexus/.pub-cache/hosted/pub.dev/firebase_app_check-0.1.2/ios/Classes/FLTAppCheckProvider.m:30:57


Error launching application on Nexus.

@Lyokone
Copy link
Contributor

Lyokone commented Apr 6, 2023

Flutter issued a new release supposed to fix this: https://groups.google.com/g/flutter-announce/c/9qZL8GOVNb4
Can you check if it also fixes the issue with firebase_app_check?

@mdddj
Copy link
Author

mdddj commented Apr 6, 2023

Flutter issued a new release supposed to fix this: https://groups.google.com/g/flutter-announce/c/9qZL8GOVNb4 Can you check if it also fixes the issue with firebase_app_check?

After updating to version 3.3.10, there were no noticeable changes.

@StevenSnary
Copy link

Flutter issued a new release supposed to fix this: https://groups.google.com/g/flutter-announce/c/9qZL8GOVNb4
Can you check if it also fixes the issue with firebase_app_check?

The error with firebase_app_check is still present - setting the 3 instances of 'new' to 'alloc' as mentioned previously will allow the build to complete.

This latest update to Flutter 3.7.10 fixes another bug that would stop the 'flutter build ipa' command from completing successfully.

@AresVampire
Copy link

it still happens with Flutter 3.7.10

@otopba
Copy link

otopba commented Apr 12, 2023

Same issue

@danagbemava-nc danagbemava-nc added the resolution: fixed A fix has been merged or is pending merge from a PR. label Apr 12, 2023
@FetFrumos
Copy link

when can we expect an update?

@Lyokone
Copy link
Contributor

Lyokone commented Apr 13, 2023

It has been released as part of firebase_app_check version 0.1.2+1

@firebase firebase locked and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) plugin: app_check resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.