Opening a SwiftUI "Hello World" unaltered project in Xcode 11 beta 5 running on Catalina beta 4 produces a "Loading a plug-in failed" dialog warning.
Has anyone else experienced this or know how to solve it? I deleted Xcode, redownloaded it, reinstalled it and I'm still getting the same error.
No idea how to fix other than deleting the offending module, but that can't be right.
Error details:
Details
Loading a plug-in failed.
Domain: DVTPlugInErrorDomain
Code: 2
Failure Reason: The plug-in “com.apple.dt.UVKit” at path “/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework” could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged.
Recovery Suggestion: The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled.
User Info: {
DVTPlugInDYLDErrorMessageErrorKey = "dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit, 0): Symbol not found: _$s2IDs12IdentifiablePTl\n Referenced from: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit\n Expected in: /usr/lib/swift/libswiftCore.dylib\n in /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
DVTPlugInExecutablePathErrorKey = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
DVTPlugInIdentifierErrorKey = "com.apple.dt.UVKit";
NSFilePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework";
}
--
The bundle “UVKit” couldn’t be loaded.
Domain: NSCocoaErrorDomain
Code: 3588
Failure Reason: The bundle couldn’t be loaded.
Recovery Suggestion: Try reinstalling the bundle.
User Info: {
NSBundlePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework";
NSDebugDescription = "dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit, 265): Symbol not found: _$s2IDs12IdentifiablePTl\n Referenced from: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit\n Expected in: /usr/lib/swift/libswiftCore.dylib\n in /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
NSFilePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
}
--
I was able to get my SwiftUI project running on Catalina beta 4 with Xcode beta 5. I too got the warning mentioned by OP.
And as mentioned in comments, the only negative impact I've seen is being unable to use the preview canvas. Other than that, everything else in my project is running well. Just using the simulator more ;)
Problem is gone on Catalina build 19A558d when installing Xcode 11 GM Seed (build 11A419c, released September 10, 2019)
this will get rid of the error message but will not bring canvas back.
based on:
https://forums.developer.apple.com/thread/120614
Please go to: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework and delete all the shortcut files in all folders of UVKit.framework (Be sure DONOT delete orginal files).
Related
When I am running application on simulator or device and try to use PO command during debug. Xcode is throwing error instead of printing value. It is happening after I have updated Xcode 12.
error: virtual filesystem overlay file
/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
What is the solution for this ?
Any help would be appreciated.
Go to /Users/<YOUR_USER>/Library/Developer/Xcode/ and delete "DerivedData" folder.
If in the path of the missing file is the name of a framework e.g. Usabilla.build/Release-iphonesimulator/Usabilla.build/all-product-headers.yaml
Try using an older version, using version 6.4.7 of Usabilla fixed the issue for me.
If the above fixes don't work, here are some info that might help:
https://steipete.com/posts/couldnt-irgen-expression/
I'm developing a Safari App Extension. Previously it worked fine. When I run the project in Xcode, and enable Allow Unsigned Extensions in Safari, I can see my extension in Safari Preferences -> Extensions page.
After I merged code with one of my team member, suddenly the Extension cannot get installed.
I have tried:
Clean the build folder in Xcode, and run again. But no luck.
Restart Xcode doesn't help either.
Use command pluginkit -mAvvv -p com.apple.Safari.extension to check installed Safari extensions list. My extension is not in the list.
There are some errors in Xcode output, but I can't link them with the issue I'm facing:
objc[49476]: Class AMSupportURLConnectionDelegate is implemented in both /System/Library/PrivateFrameworks/EmbeddedOSInstall.framework/Versions/A/EmbeddedOSInstall (0x7fff9a2aa748) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108db2600). One of the two will be used. Which one is undefined.
objc[49476]: Class AMSupportURLSession is implemented in both /System/Library/PrivateFrameworks/OSPersonalization.framework/Versions/A/OSPersonalization (0x7fff9b5d49f0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108db2650). One of the two will be used. Which one is undefined.
2018-12-13 16:25:46.003099+0800 Safari[49476:1264277] Could not connect action, target class SecurityPreferences does not respond to -toggleJavaScriptCanOpenWindows:
2018-12-13 16:25:46.163130+0800 Safari[49476:1264277] AssertMacros: 0 (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKitXPCClient.m, line: 75
2018-12-13 16:25:46.163219+0800 Safari[49476:1264277] AssertMacros: 0 (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKitXPCClient.m, line: 396
2018-12-13 16:25:46.163465+0800 Safari[49476:1264277] [Framework-Internal-Legacy] AssertMacros: _xpcClient (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKit.m, line: 137
2018-12-13 16:25:47.060959+0800 Safari[49476:1264368] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2018-12-13 16:25:47.128105+0800 Safari[49476:1264277] Scheduling the NSURLConnection loader is no longer supported.
2018-12-13 16:25:47.491811+0800 Safari[49476:1264370] NSURLConnection finished with error - code -1100
2018-12-13 16:25:47.799590+0800 Safari[49476:1264514] [CloudBookmarks] Error fetching remote migration state: Error Domain=com.apple.SafariBookmarksSync.CloudBookmarksErrorDomain Code=0 "(null)"
2018-12-13 16:25:47.953259+0800 Safari[49476:1264277] [WebKit2Callbacks] Page (pid: 0) did become unresponsive
2018-12-13 16:25:47.970927+0800 Safari[49476:1264512] NSURLConnection finished with error - code -1100
2018-12-13 16:25:48.032647+0800 Safari[49476:1264425] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2018-12-13 16:25:48.125530+0800 Safari[49476:1264426] Calling IOPPFGetProperty simulator_utility_clamp!
2018-12-13 16:25:48.840769+0800 Safari[49476:1264277] [WebKit2Callbacks] Page (pid: 49481) did become responsive
Now I'm running out of options. It lacks official documentation in Apple Developer site.
Is there regular steps to troubleshoot this kind of issue? Is there any kind of system logs which can help me address the error? Any suggestion is appreciated.
Make sure that the extension .appex is listed as embedded content for your App Extension target. Otherwise it doesn't get bundled when you build from Xcode. Look in the project editor under Target_Name > General > Frameworks, Libraries and Embedded Content. The extension should be listed there.
Also check under the Build Phases tab > Dependencies that your extension is added there as well.
Check to see if the code signature of your app is valid. Safari will refuse to list your extension otherwise. Run codesign on your built app as follows:
codesign -d --verify --verbose=3 ~/Library/Developer/Xcode/DerivedData/OnePassword-epeydspviethpabprcrsqenrkiin/Build/Products/Debug_WebStore/1Password\ 7.app
It should show valid on disk and satisfies its Designated Requirement. If it doesn't, Safari will ignore your extension completely, even when Allow Unsigned Extensions is enabled.
I had a similar problem more recently after updating to Xcode 13.2.1 and a I think a MacOS update. My Safari web extensions I was developing stopped showing up in Safari (even with unsigned extensions enabled).
In a Terminal/CLI shell, I ended up running:
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Safari.app
And suddenly my extensions started showing up again in Safari. Something screwy happened with Safari and LaunchServices.
I'm getting the following during the bundle resources copying phase in xcodebuild (XCode 7.1):
2015-11-03 22:16:28.218 xcodebuild[28202:300463] DVTAssertions:
Warning in
/Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-9061/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:739
Details: unexpected successful exit code from cancelled command
<C0505:'CpResource Foo.json':P10> Object: <PBXTargetBuildContext:
0x7faec015a440> Method:
-createCommandInvocationRecordFromInvocation: Thread: <NSThread: 0x7faebc8cc070>{number = 10, name = (null)} Please file a bug at
http://bugreport.apple.com with this warning message and any useful
information you can provide.
I have ~170 items I'm copying, but for some reason a few of them give me this error.
EDIT - I just ran the command again and now it works, so it doesn't seem deterministic.
The issue was a duplicate folder in the Copy Bundle Resources section. It used to be two different files, but they were moved so XCode decided to change them both to the folder they got moved into. Go figure.
Had this issue a couple of months ago. Today that error made it's comback.
I have it only if I try to emulate from ionic (--livereload) on a iOS-Device. Seem like if you have Xcode running it occurs. Close Xcode. That fixes it.
I just used Xcode 7's migration tool to migrate a project from Swift 1.2 to 2. After fixing up errors missed and such, all is well except for an error which prevents me from even building: Command failed due to signal: illegal instruction 4.
I have tried the help in these articles (Xcode 7 and Swift 2.0 : Command failed due to signal: Abort trap: 6, and Command failed due to signal: Abort trap: 6) which are not identical issues to mine, but nevertheless they were not able to fix the issue.
I have cleaned the build and removed the derived data folder. I have up to date CocoaPods installation, Xcode tools are at 7.0, and I Swift compile optimization is at None. Is there anything else I'm missing?
Thanks!
So an answer was found thanks to the help of a coworker. We found the offending file in the build error, but there was no line provided. Through process of elimination, we found it to be a line that was declaring a new constant to the result of getting a JSON dictionary ([String : AnyObject], typealiased to JSONDictionary), from inside an optional dictionary. Here is the line:
let objectsDictionary = maybeJSON?[key] as? JSONDictionary
Changed this to two guard statements:
guard let goodJSON = maybeJSON as? JSONDictionary else { return ... }
guard let objectsDictionary = goodJSON[key] as? JSONDictionary else { return ... }
This line worked in Xcode 6.3.2 as it would just provide an optional value, but for some reason, some change in Xcode 7 didn't like this. I hope this can help anyone else who runs across this.
'Illegal instruction' simply means that your binary contains instructions that are invalid for the type of architecture you are trying to run the code with. Start looking at the minimum version in your project build settings.
I get the following message from Xcode when I try to run my tests:
2013-11-13 09:02:57.849 MyProject[378:303] Error loading /Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests: dlopen(/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests, 262): no suitable image found. Did find:
/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests: open() failed with errno=1
IDEBundleInjection.c: Error loading bundle '/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest'
This question has already been asked here: Xcode 5 throws "Library not loaded" error when adding a test target
but the solution doesn't apply to me as this is a Mac app. Any ideas?
Do you have App Sandbox under Capabilities for your target enabled? Switching that off worked for me.
This is because of sandboxing.
Same issue also happens with OCUnit (in both Xcode 4 and 5): XCTest - "Test failed"
There's instructions for testing a sandboxed app here:
http://marcschwieterman.com/blog/testing-in-the-sandbox/