SwiftUI: Failed to update preview

Essentially swift ui previews does not load even when I first launch my app. (no pods installed) It works on simulator and my actual device just not previews.

Error Messages below:

Error encountered when sending 'previewInstances' message to agent.

Full error message below




| RemoteHumanReadableError
|
| LoadingError: failed to load library at path "/Volumes/.../XcodeProjects/Derived Data/project-duzduuzmzlidwucngqbeqpvftqak/Build/Intermediates.noindex/Previews/project/Intermediates.noindex/project.build/Debug-iphonesimulator/project.build/Objects-normal/x8664/HomeView.2.preview-thunk.dylib": Optional(dlopen(/Volumes/.../XcodeProjects/Derived Data/project-duzduuzmzlidwucngqbeqpvftqak/Build/Intermediates.noindex/Previews/project/Intermediates.noindex/project.build/Debug-iphonesimulator/project.build/Objects-normal/x8664/HomeView.2.preview-thunk.dylib, 2): no suitable image found. Did find:
| /Volumes/.../XcodeProjects/Derived Data/project-duzduuzmzlidwucngqbeqpvftqak/Build/Intermediates.noindex/Previews/project/Intermediates.noindex/project.build/Debug-iphonesimulator/project.build/Objects-normal/x8664/HomeView.2.preview-thunk.dylib: open() failed with errno=1)




Hi,

Sorry to hear you are having problems getting previews working. We will need the diagnostics Xcode Previews generates in order to make sure we fully understand the error the previews system is encountering.
  1. When you get an error in Xcode Previews, an error banner appears in the canvas

  2. Click the "Diagnostics" button in that banner

  3. In the sheet that appears, click "Generate Report" in the bottom left of the sheet

  4. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)

If you report back here with the feedback ID I will make sure the bug gets to the right folks as soon as possible.
I generated the report and see a file named:
previews-diagnostics-20210...
which contains numerous other folders.
For some reason I cannot attach the folder here.

Also where can I find the feedback ID, feedback assistant? if so it is shown below.
(My feedback assistant ID: FB8815944 ))

Thank you so much for your help.

SwiftUI: Failed to update preview
 
 
Q