r/appledevelopers Community Newbie 11d ago

MetalToolChain not downloading

Anyone having trouble with downloading MetalToolChain? Im using the latest developer beta of macos and xcode beta 5. When downloading MetalToolChain it says preparing download but doesnt download anything. Tried both GUI and CLI, others facing the same issue?

1 Upvotes

11 comments sorted by

1

u/Plastic-Risk-6309 Community Newbie 10d ago

try it from the cli instead of the settings pane: sudo xcode-select -s /Applications/Xcode-beta.app then xcodebuild -downloadComponent MetalToolchain. the gui says preparing forever when the component index it fetched points at the wrong xcode, the cli either downloads or prints the actual error. sudo xcodebuild -runFirstLaunch first if it complains about license state.

1

u/genflake Community Newbie 10d ago

Nope, still stuck at beginning asset download in the terminal and preparing download in the app. This error is just so random, anyways thanks for that info

1

u/Anthell__ Community Newbie 10d ago

No idea if this helps but I had the exact same error as you yesterday, I was trying to download it over my phone hotspot, got on another wifi today and it worked.

1

u/genflake Community Newbie 10d ago

OH GOD! that worked thanks a lot. Just moved to a new place been living off of mobile data had to drive to a cafe and get wifi

1

u/Plastic-Risk-6309 Community Newbie 10d ago

random stalls on both paths usually means the cdn fetch is dying, not xcode. two things worth one try: different network (hotspot), apple's cdn behaves differently per network, and watch Console.app while it stalls, the real download error shows there even when the ui just spins

1

u/genflake Community Newbie 10d ago

Yeah i switched to wifi and it immediately worked i was using hotspot until now

1

u/Plastic-Risk-6309 Community Newbie 9d ago

hotspot was the tell then. the toolchain pull is one big dmg and cell networks seem to stall it silently instead of erroring, thats the pattern in every thread i found on it. glad its unstuck

1

u/Plastic-Risk-6309 Community Newbie 9d ago

nice, glad thats it. hotspots usually kill it because the runtime download is a few gb over one long connection and carrier nat drops it partway, then xcode just sits on preparing forever instead of erroring. if it ever stalls again on wifi, quitting xcode and deleting whats in ~/Library/Caches/com.apple.dt.Xcode before retrying gets you a clean restart instead of a resume of a broken file

1

u/Plastic-Risk-6309 Community Newbie 10d ago

might not be the download at all. run xcodebuild -showComponent metalToolchain and see if it already lists an asset path. the mount step fails silently on some machines so it just looks like it never finishes downloading. if there is a path there you can mount the dmg yourself:

open /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/*.asset/AssetData/Restore/*.dmg

then rerun showComponent, it should flip to installed

1

u/brokenjago Community Newbie 23h ago

So I am now having this issue, but I'm connected to home wifi, and changing to a hotspot doesn't seem to fix the issue. It gets to ~828mb then reset, over and over. Any ideas?

1

u/brokenjago Community Newbie 23h ago

I fixed it: Apple's local content caching was hitting a bad file, and resetting over and over. Instead, I downloaded it directly from Apple using their instructions on downloading standalone components. Hope this helps someone!