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

[iOS] Error on Xcode 16 #2303

Closed
mduccc opened this issue Sep 20, 2024 · 15 comments
Closed

[iOS] Error on Xcode 16 #2303

mduccc opened this issue Sep 20, 2024 · 15 comments
Assignees

Comments

@mduccc
Copy link

mduccc commented Sep 20, 2024

Platform

Flutter Mobile

Obfuscation

Disabled

Debug Info

Enabled

Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.12, on macOS 14.5 23F79 darwin-arm64, locale en-VN)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more
details.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[!] Android Studio (version 2023.2)
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.93.1)
[✓] Connected device (4 available)
! Error: Browsing on the local area network for iPhone 12pro max test kvonline
😁😁😁_|~}qẻ1. Ensure the device is unlocked and attached with a cable or
associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.

Version

6.22.0

Steps to Reproduce

  1. flutter pub get
  2. flutter run

Expected Result

Run IOS success

Actual Result

 ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
    	/var/folders/js/2qmlk4w15m7fsdhghcx4xwlr74_ykf/T/flutter_tools.mvqYe5/flutter_ios_build_temp_diruOYvNZ/temporary_xcresult_bundle
    /Users/duc.nm4/Documents/Projects/xxx/example/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp:59:13: error: no type named 'terminate_handler' in namespace 'std'
       59 | static std::terminate_handler g_originalTerminateHandler;

Are you willing to submit a PR?

None

@rirjkl19
Copy link

Same issue. Any temporary fix?

@kahest
Copy link
Member

kahest commented Sep 20, 2024

Hey @mduccc @rirjkl19 for building with Xcode 16, a number of changes had to be made to the underlying sentry-cocoa SDK. These changes are all included in sentry-dart 8.8.0 or newer.

@Klucherev
Copy link

Same issue

@buenaflor
Copy link
Contributor

Same issue

Have you tried the mentioned fix above? Using sentry dart version 8.8.0 or higher

@Klucherev
Copy link

Same issue

Have you tried the mentioned fix above? Using sentry dart version 8.8.0 or higher

I'm using 8.9.0 from pub.dev

@buenaflor
Copy link
Contributor

buenaflor commented Sep 23, 2024

@denrase apparently it still does not work even on 8.9.0, ptal

It works starting from 8.8.0

@denrase
Copy link
Collaborator

denrase commented Sep 23, 2024

So i cannot reproduce this, building works for me with the current Xcode Version 16.0 (16A242d).

This is my flutter doctor:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale de-AT)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] IntelliJ IDEA Community Edition (version 2022.2)
[✓] VS Code (version 1.93.1)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for Wohnzimmer. Ensure the device is unlocked and associated with
      the same local area network as this Mac. (code -27)
    ! Error: Browsing on the local area network for iPad Pro. Ensure the device is unlocked and attached with a
      cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

@Klucherev Could you try the following:

  • Updating your Flutter version
flutter upgrade
  • Delete the DerivedData folder of Xcode, there might be old build artefacts left.
rm -rf ~/Library/Developer/Xcode/DerivedData/*
  • Then run again
flutter pub get
flutter run

Please report back if this resolves your issue. Thank you.

@Klucherev
Copy link

After cleaning project it's working now!
flutter clean
flutter pub get
pod update

@denrase
Copy link
Collaborator

denrase commented Sep 23, 2024

@Klucherev Nice, so it was probably the usual Xcode hickups, glad it's working for you.

@dilraj007
Copy link

is there any fix for SDK 6.22.0 ?
I can only use this version as my Flutter app is.

Flutter 2.10.5 • channel unknown • unknown source
Framework • revision 5464c5bac7 (2 years, 5 months ago) • 2022-04-18 09:55:37 -0700
Engine • revision 57d3bac3dd
Tools • Dart 2.16.2 • DevTools 2.9.2

@buenaflor
Copy link
Contributor

buenaflor commented Oct 1, 2024

@dilraj007 I haven't tried it or checked it out but the only thing that comes to my mind is if you somehow manage to override the Sentry Cocoa pod dependency to the latest version (if even possible).

Even if you successfully do that, there's no guarantee for any stability in the SDK

@dilraj007
Copy link

@buenaflor I see, thanks for the reply.

If it's breaks on Xcode 16, does it mean right now my app that are using this Sentry SDK version is not running on IOS 18?
So it will not send data from these IOS 18 devices.

@buenaflor
Copy link
Contributor

buenaflor commented Oct 2, 2024

No, it only reports an error when compiling with xcode 16 because apple changed things although I cannot tell you which exact changes were relevant - thats why we had to make adjustments in our Sentry Cocoa SDK. Your existing apps in prod using the SDK are fine. Those two are unrelated

@Mugilan-Codes
Copy link

So, what is the solution for this?

@rirjkl19
Copy link

rirjkl19 commented Oct 9, 2024

Update the pods.

If not working

Sentry package. Or update your flutter version 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

8 participants