Xcode Workspace "Internal error: missingPackageDescriptionModule"

After updating Xcode to version 13.2 i can't build my project anymore. I have a strange error "Internal error: missingPackageDescriptionModule" related to my Workspace file.

It's definitely related to SPM because Xcode is not loading SPM packages also. I tried to "Reset package caches", "Resolve package caches" and also "Updating to latest package caches" but after all of these operating nothing happens. Deleting derived data, cleaning didn't help too...

enter image description here

I tried also to resolve packages from Terminal using xcodebuild -resolvePackageDependencies but I get error message:

--- xcodebuild: WARNING: The directory /Users/ptocicki/Developer/KFC/kfc-ios also contains the legacy project 'project.pbxproj' - ignoring it and using 'KFC.xcodeproj'.


xcodebuild: error: Could not resolve package dependencies:
Internal error: missingPackageDescriptionModule"
6711 次浏览

Apple is aware of the issue.

We're currently investigating this issue — thank you to those who have filed bug reports so far. To workaround this issue, please re-download Xcode 13.2 directly from the Downloads page.

https://developer.apple.com/forums/thread/696504?answerId=698142022#698142022

I just got the issues late at night after Xcode updated on its own while I was working on my project, which was not a cool surprise. It appears to be affecting all dependencies. You are not alone in this it's affecting everyone. I did what they recommended and downloaded Xcode directly from the Apples developer site and it fixed all my issues super happy right now!!!!!!!

https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes

If you’re using Swift packages either standalone or as dependencies in an Xcode project or workspace, the Mac App Store version of Xcode fails during package resolution with the error “Internal error: missingPackageDescriptionModule.” (86435800)

Workaround: Download Xcode 13.2 directly from the Apple Developer website.

Seems local package still working. So there is a temporary solution: We can download the dependencies then add them to the project as local paclages.

  • If you’re using Swift packages either standalone or as dependencies in an Xcode project or workspace, the Mac App Store version of Xcode fails during package resolution with the error “Internal error: missingPackageDescriptionModule.” (86435800)

Workaround: Download Xcode 13.2 directly from the Apple Developer website.

🎊 Fixed on v13.2.1 and you can download from here


Explaination

This bug is reported and the v13.2.1 AppStore version but As  Apple suggest here, you should download the Xcode manually from the developer center

Manual download of any Apple developer software

✅ The always working and preferred workaround!

Download directly from Apple:

Then extract and move it where you like. This has so many benefits compared to AppStore updates. (like the ability to resume download, not replacing the old one, not wasting hidden directories and etc.)

Note that you should use safari to download it.


⚠️ Important note for developers like me!

The page you’re looking for can’t be found.

If you The page you’re looking for can’t be found message, you may need to use a VPN if you are in a country that the US sanctioned like mine. Because Apple is blocking some IP address ranges.

XCode was updated to 13.2.1 at 12/19 which fix the issue.

Please update to Xcode 13.2.1. enter image description here

If not, download Xcode 13.2 from the Apple Developer website.

Updating from Xcode 13.2 to 13.2.1 from App Store fixed the issue for me.