Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 13.4.1 error: unable to attach DB: error: accessing build database (react native)

**error** Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening app.xcworkspace.

**error**: unable to attach DB: error: accessing build database "/Users/user/Library/Developer/Xcode/DerivedData/app-cdawdoxdzwfdgueqnyshuhonxndw/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.

tried almost everything build cleans, reinstalling pods etc

react native version: 0.67.3 Xcode version: 13.4.1

like image 817
Muhammad Qasim Qadri Avatar asked Jul 09 '26 01:07

Muhammad Qasim Qadri


2 Answers

After almost one day of debugging this issue, came to know about this article which solves the problem for me, although article has more than one steps but I just tried the last one and it worked, mentioning the steps below,

rm -rf ~/Library/Developer/Xcode/DerivedData/
cd ios
pod deintegrate
pod update
cd..
yarn run ios or npm run ios
like image 115
Muhammad Qasim Qadri Avatar answered Jul 11 '26 16:07

Muhammad Qasim Qadri


I only did the "rm -rf ~/Library/Developer/Xcode/DerivedData/" and it fixed it for me.

like image 30
dkimble Avatar answered Jul 11 '26 16:07

dkimble



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!