Hey,
I've opened an existing project with Xcode 16 Beta 1 (I'm also running macOS Sequoia).
None of my previews work anymore. They simply crash with an error I don't quite understand:
JITError
==================================
| NoBuiltTargetDescriptionCouldBeFound
|
| translationUnit: PreviewTranslationUnit(moduleNamePrefix: "Previews_ErrorView", sourceIdentifier: file:///Users/dennis/Code/Project/Project/Components/ErrorView.swift -> ErrorView.swift, parseTree: ParseTree(version: 1848, statements: 5, providers: 0), update: nil, changesContextMemoizer: PreviewsPipeline.PreviewTranslationUnit.(unknown context at $3561fdc4c).ChangesContextMemoizer(parseTree: ParseTree(version: 1848, statements: 5, providers: 0), sourceIdentifier: file:///Users/dennis/Code/Project/Project/Components/ErrorView.swift -> ErrorView.swift, cachedValue: os.OSAllocatedUnfairLock<Swift.Optional<PreviewsModel.ParseTree.PreviewChangesContext>>(__lock: Swift.ManagedBuffer<Swift.Optional<PreviewsModel.ParseTree.PreviewChangesContext>, __C.os_unfair_lock_s>)), registryDeclarationMemoizer: PreviewsPipeline.PreviewTranslationUnit.(unknown context at $3561fdbec).RegistryDeclarationMemoizer)
|
| builtTargetDescriptions:
The app builds and runs fun on a simulator and on device.
Any ideas what this error means? Is this just an early Beta 1 bug or might there be anything I can do in my project to fix this?
The WWDC24 demo projects all work fine and their previews are working as well.
Thanks!
Hi Quantm
Sorry to hear you are having problems getting previews working in beta 1.
We will need more diagnostics to troubleshoot the problem you are seeing. It would be great if you could file a feedback with diagnostics so we can take a look.
Steps to generate helpful diagnostics:
- Download and install the logging profile on all devices involved. Instructions and profiles are available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift
- Reproduce the issue
- Click the "Diagnostics" button in the error banner in Previews' Canvas area (or if the banner is missing you can use the menu: Editor > Canvas > Diagnostics)
- In the sheet that appears, click "Generate Report" in the bottom left of the sheet
- Attach (or make from the folder) the resulting zip file to the bug report (will be named something like
previews-diagnostics-0123456789.zip
) - Generate the sysdiagnose(s) and attach those too