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

SwiftUI preview crash: Sentry does not contain a slice for arm64e-apple-macosx21.1 #4350

Closed
1 task done
DominikPalo opened this issue Sep 19, 2024 · 19 comments
Closed
1 task done

Comments

@DominikPalo
Copy link

DominikPalo commented Sep 19, 2024

🛑 Blocked by


Platform

macOS

Environment

Develop

Installed

Swift Package Manager

Version

8.36.0

Xcode Version

16.0 (16A242d)

Did it work on previous versions?

Yes (Xcode 15)

Steps to Reproduce

We have a macOS SwiftUI app that references the Sentry framework. Since I updated Xcode to 16.0, the SwiftUI preview has stopped working. When I open any SwiftUI view file containing a PreviewProvider implementation, the Xcode preview window crashes. However, we can build and run the app without any issues.

Expected Result

SwiftUI preview window shows a mocked preview of the opened view.

Actual Result

SwiftUI preview fails with the Sentry does not contain a slice for arm64e-apple-macosx21.1 error:

Image

== PREVIEW UPDATE ERROR:

    FailedToLaunchAppError: Failed to launch com.slido.SlidoApp
    
    /Users/dpalo/Library/Developer/Xcode/DerivedData/SlidoAddin-fddfekbcupxqcceaxbdflfzoaani/Build/Products/Debug/Slido.app
    
    ==================================
    
    |  [Remote] JITError
    |  
    |  ==================================
    |  
    |  |  [Remote] LLVMError
    |  |  
    |  |  LLVMError: LLVMError(description: "Universal binary /Users/dpalo/Library/Developer/Xcode/DerivedData/SlidoAddin-fddfekbcupxqcceaxbdflfzoaani/Build/Products/Debug/Sentry.framework/Sentry does not contain a slice for arm64e-apple-macosx21.1")

Are you willing to submit a PR?

No response

@brustolin
Copy link
Contributor

Hello @DominikPalo, thanks for reaching out, I was able to reproduce the problem, we will investigate a solution for it.

@brustolin
Copy link
Contributor

We need to build our framework with Xcode 16 to use the standard architectures, which includes arm64e now.
We plan to make a new release next week.

Im so sorry about the inconvenience.

@brustolin brustolin linked a pull request Sep 20, 2024 that will close this issue
@brustolin
Copy link
Contributor

This is blocked by #3398

@tonyarnold
Copy link
Contributor

I am seeing this in my project too. Good to hear that work is underway to fix the underlying issue.

@brustolin
Copy link
Contributor

brustolin commented Oct 4, 2024

This was solved in #3398, and will be available in the next release.

@kushsolitary
Copy link

This was solved in #3398, and will be available in the next release.

Hi, even on the latest commit, I am facing the same issue. I've tried clearing derived data and cache but the issue persists.

@brustolin
Copy link
Contributor

Hello @kushsolitary, did you tried direct from main?
Because we did not released a version with fix yet.

@kushsolitary
Copy link

Hello @kushsolitary, did you tried direct from main? Because we did not released a version with fix yet.

Yes, it's on the main branch and preview is crashing with the same error: Sentry.framework/Sentry does not contain a slice for arm64e-apple-macosx21.1

@brustolin
Copy link
Contributor

brustolin commented Oct 7, 2024

Ow, my bad, it won't work using main, because main points to the latest released binary.
We really need to make a new release. Sorry about the trouble.
We're probably making a new release today.

@kushsolitary
Copy link

Ow, my bad, it won't work using main, because main points to the latest released binary. We really need to make a new release. Sorry about the trouble. We're probably making a new release today.

No worries, thanks for the update.

@tonyarnold
Copy link
Contributor

Did this go out with 8.37.0? I just updated, and my previews are still broken:

Universal binary /Users/tonyarnold/Library/Developer/Xcode/DerivedData/Reveal-bfyimdvyberhixdfsrrbidcdmyuz/Build/Products/Debug/Sentry.framework/Sentry does not contain a slice for arm64e-apple-macosx21.1

@kushsolitary
Copy link

The release notes don't mention this PR so it looks like it isn't included 😦

@tonyarnold
Copy link
Contributor

What kind of release schedule is Sentry on? This is a pretty critical issue.

@kushsolitary
Copy link

@brustolin any ETA on when will this be released? It's really hampering our development speed.

@brustolin
Copy link
Contributor

brustolin commented Oct 8, 2024

Hello, @kushsolitary and @tonyarnold.

Our release process is twofold, designed to prevent releasing bugs as much as possible. Yesterday, we promoted the latest beta version to release, and today we will release the unreleased features as a Beta so we can test them in real apps. Users can also try them, knowing it is a beta version.

We will have it in the next few hours. I will let you know in here.

@brustolin
Copy link
Contributor

8.38.0-beta.1 was released.

You need to use the exact version in Xcode

Image

@tonyarnold
Copy link
Contributor

Brilliant, thanks @brustolin — that works for me in my project. SwiftUI is up and running again!

@tonyarnold
Copy link
Contributor

Thanks @indragiek for me as well — I see you there, buddy 😂

@DominikPalo
Copy link
Author

DominikPalo commented Oct 8, 2024

@brustolin & @indragiek thank you guys! I've just updated our project to 8.38.0-beta.1, and I can confirm that the SwiftUI preview is working as expected 👍

guarani added a commit to Automattic/Automattic-Tracks-iOS that referenced this issue Nov 5, 2024
This Sentry update includes a fix for SwiftUI previews on the Mac platform: getsentry/sentry-cocoa#4350 (comment).
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

Successfully merging a pull request may close this issue.

5 participants